@tinyshed/tinystore 0.1.0-rc.4 → 0.1.0-rc.6

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 (122) hide show
  1. package/README.md +37 -37
  2. package/bin/tinystore.js +12 -1
  3. package/dist/backup.d.ts +33 -0
  4. package/dist/backup.js +49 -0
  5. package/dist/blobs.d.ts +160 -79
  6. package/dist/blobs.js +510 -217
  7. package/dist/channels.d.ts +90 -0
  8. package/dist/channels.js +291 -0
  9. package/dist/clock.js +3 -3
  10. package/dist/config.d.ts +209 -86
  11. package/dist/config.js +581 -538
  12. package/dist/connection.d.ts +64 -2
  13. package/dist/connection.js +201 -16
  14. package/dist/console.d.ts +27 -3
  15. package/dist/console.js +165 -12
  16. package/dist/dotenv.d.ts +7 -0
  17. package/dist/dotenv.js +79 -0
  18. package/dist/errors.d.ts +61 -1
  19. package/dist/errors.js +81 -1
  20. package/dist/handles.d.ts +44 -2
  21. package/dist/handles.js +81 -2
  22. package/dist/index.d.ts +17 -11
  23. package/dist/index.js +5 -3
  24. package/dist/instruments.d.ts +177 -0
  25. package/dist/instruments.js +819 -0
  26. package/dist/jobs.d.ts +335 -239
  27. package/dist/jobs.js +716 -536
  28. package/dist/json.d.ts +2 -0
  29. package/dist/json.js +122 -0
  30. package/dist/kv.d.ts +130 -243
  31. package/dist/kv.js +273 -640
  32. package/dist/limits.d.ts +80 -0
  33. package/dist/limits.js +139 -0
  34. package/dist/locks.d.ts +62 -0
  35. package/dist/locks.js +237 -0
  36. package/dist/logger.d.ts +45 -9
  37. package/dist/logger.js +150 -38
  38. package/dist/metrics.d.ts +210 -209
  39. package/dist/metrics.js +319 -556
  40. package/dist/once.d.ts +19 -18
  41. package/dist/once.js +74 -63
  42. package/dist/query.d.ts +181 -0
  43. package/dist/query.js +788 -0
  44. package/dist/records.d.ts +241 -150
  45. package/dist/records.js +507 -291
  46. package/dist/runtime/addon.d.ts +14 -0
  47. package/dist/runtime/addon.js +69 -0
  48. package/dist/runtime/bun.js +5 -7
  49. package/dist/runtime/node.js +5 -7
  50. package/dist/runtime/pipe.d.ts +17 -0
  51. package/dist/runtime/pipe.js +133 -0
  52. package/dist/runtime/shared.d.ts +6 -0
  53. package/dist/runtime/shared.js +19 -0
  54. package/dist/runtime.d.ts +5 -2
  55. package/dist/search.d.ts +189 -0
  56. package/dist/search.js +281 -0
  57. package/dist/session.d.ts +31 -3
  58. package/dist/session.js +153 -41
  59. package/dist/sql.d.ts +228 -78
  60. package/dist/sql.js +745 -240
  61. package/dist/store.d.ts +244 -24
  62. package/dist/store.js +270 -67
  63. package/dist/time.d.ts +5 -1
  64. package/dist/time.js +22 -2
  65. package/dist/tx.d.ts +61 -0
  66. package/dist/tx.js +314 -0
  67. package/dist/wire/codec.d.ts +23 -7
  68. package/dist/wire/codec.js +56 -35
  69. package/dist/wire/frame.d.ts +2 -0
  70. package/dist/wire/frame.js +31 -14
  71. package/dist/wire/messages.d.ts +259 -0
  72. package/dist/wire/messages.js +22 -0
  73. package/dist/wire/msgpack.d.ts +49 -1
  74. package/dist/wire/msgpack.js +293 -56
  75. package/dist/wire/protocol.d.ts +2683 -0
  76. package/dist/wire/protocol.js +10846 -0
  77. package/package.json +39 -38
  78. package/src/backup.ts +81 -0
  79. package/src/blobs.ts +678 -301
  80. package/src/channels.ts +377 -0
  81. package/src/clock.ts +4 -4
  82. package/src/config.ts +902 -612
  83. package/src/connection.ts +279 -21
  84. package/src/console.ts +180 -12
  85. package/src/dotenv.ts +82 -0
  86. package/src/errors.ts +105 -0
  87. package/src/handles.ts +157 -8
  88. package/src/index.ts +158 -52
  89. package/src/instruments.ts +1042 -0
  90. package/src/jobs.ts +1017 -733
  91. package/src/json.ts +133 -0
  92. package/src/kv.ts +424 -847
  93. package/src/limits.ts +202 -0
  94. package/src/locks.ts +320 -0
  95. package/src/logger.ts +209 -40
  96. package/src/metrics.ts +557 -752
  97. package/src/once.ts +86 -83
  98. package/src/query.ts +1005 -0
  99. package/src/records.ts +795 -418
  100. package/src/runtime/addon.ts +99 -0
  101. package/src/runtime/bun.ts +5 -7
  102. package/src/runtime/node.ts +5 -7
  103. package/src/runtime/pipe.ts +178 -0
  104. package/src/runtime/shared.ts +20 -0
  105. package/src/runtime.ts +5 -2
  106. package/src/search.ts +480 -0
  107. package/src/session.ts +187 -41
  108. package/src/sql.ts +993 -306
  109. package/src/store.ts +473 -78
  110. package/src/time.ts +48 -3
  111. package/src/tx.ts +426 -0
  112. package/src/wire/codec.ts +78 -37
  113. package/src/wire/frame.ts +44 -14
  114. package/src/wire/messages.ts +25 -0
  115. package/src/wire/msgpack.ts +327 -56
  116. package/src/wire/protocol.ts +11709 -0
  117. package/dist/limiter.d.ts +0 -45
  118. package/dist/limiter.js +0 -68
  119. package/dist/quota.d.ts +0 -44
  120. package/dist/quota.js +0 -98
  121. package/src/limiter.ts +0 -99
  122. package/src/quota.ts +0 -137
@@ -0,0 +1,2683 @@
1
+ import { type Raw, type Read, type SqlValue } from './codec.ts';
2
+ export declare const methods: {
3
+ readonly 'backup.write': 2049;
4
+ readonly 'blobs.open': 1025;
5
+ readonly 'blobs.put': 1026;
6
+ readonly 'blobs.upload': 1027;
7
+ readonly 'blobs.get': 1028;
8
+ readonly 'blobs.head': 1029;
9
+ readonly 'blobs.delete': 1030;
10
+ readonly 'blobs.copy': 1031;
11
+ readonly 'blobs.rename': 1032;
12
+ readonly 'blobs.expire': 1033;
13
+ readonly 'blobs.list': 1034;
14
+ readonly 'blobs.usage': 1035;
15
+ readonly 'blobs.clear': 1036;
16
+ readonly 'blobs.read': 1037;
17
+ /**
18
+ * Answers once the store has the message, not once anyone handled it; in a
19
+ * database's transaction, it is handed over once the transaction commits.
20
+ */
21
+ readonly 'channels.publish': 2561;
22
+ /**
23
+ * Answers once the subscription is registered, then sends batches within the
24
+ * client's credit until it cancels: a client that grants none falls behind.
25
+ */
26
+ readonly 'channels.subscribe': 2562;
27
+ readonly 'config.open': 1793;
28
+ /**
29
+ * The config's value now, then each time it changes, until the client
30
+ * cancels: one stream a config a process, whose value every handle and
31
+ * watcher of it there takes.
32
+ */
33
+ readonly 'config.follow': 1794;
34
+ readonly 'config.update': 1795;
35
+ readonly 'config.reset': 1796;
36
+ readonly 'jobs.queue.open': 513;
37
+ readonly 'jobs.schedule.open': 514;
38
+ readonly 'jobs.add': 515;
39
+ readonly 'jobs.set': 516;
40
+ readonly 'jobs.update': 517;
41
+ readonly 'jobs.cancel': 518;
42
+ readonly 'jobs.get': 519;
43
+ readonly 'jobs.list': 520;
44
+ readonly 'jobs.work': 521;
45
+ readonly 'jobs.step': 522;
46
+ readonly 'jobs.keep': 523;
47
+ readonly 'jobs.watch': 524;
48
+ readonly 'jobs.tx': 525;
49
+ readonly 'kv.bucket.open': 257;
50
+ readonly 'kv.get': 258;
51
+ readonly 'kv.has': 259;
52
+ readonly 'kv.set': 260;
53
+ readonly 'kv.create': 261;
54
+ readonly 'kv.take': 262;
55
+ readonly 'kv.delete': 263;
56
+ readonly 'kv.expire': 264;
57
+ readonly 'kv.clear': 265;
58
+ readonly 'kv.list': 266;
59
+ readonly 'kv.counters.open': 272;
60
+ readonly 'kv.counters.add': 273;
61
+ readonly 'kv.counters.get': 274;
62
+ readonly 'kv.counters.delete': 275;
63
+ readonly 'kv.counters.clear': 276;
64
+ readonly 'kv.rateLimit.open': 288;
65
+ readonly 'kv.quota.open': 289;
66
+ readonly 'kv.allow': 290;
67
+ readonly 'kv.peek': 291;
68
+ readonly 'kv.reset': 292;
69
+ readonly 'kv.refund': 293;
70
+ readonly 'kv.once.open': 304;
71
+ readonly 'kv.once.run': 305;
72
+ readonly 'kv.once.get': 306;
73
+ readonly 'kv.once.delete': 307;
74
+ readonly 'kv.tx': 320;
75
+ /**
76
+ * Answers once the key is held, or held past the wait, `in_use`; a CANCEL
77
+ * takes the ask out of its line.
78
+ */
79
+ readonly 'locks.hold': 2305;
80
+ /**
81
+ * A lease that ran out or was revoked is `lost`.
82
+ */
83
+ readonly 'locks.renew': 2306;
84
+ readonly 'locks.release': 2307;
85
+ readonly 'metrics.read': 1537;
86
+ readonly 'metrics.latest': 1538;
87
+ readonly 'metrics.aggregate': 1539;
88
+ readonly 'metrics.explain': 1540;
89
+ readonly 'metrics.names': 1541;
90
+ readonly 'metrics.labelNames': 1542;
91
+ readonly 'metrics.labelValues': 1543;
92
+ readonly 'metrics.description': 1544;
93
+ readonly 'metrics.damaged': 1545;
94
+ readonly 'metrics.ingest': 1546;
95
+ readonly 'metrics.describe': 1547;
96
+ readonly 'metrics.delete': 1548;
97
+ readonly 'metrics.flush': 1549;
98
+ readonly 'metrics.instruments': 1550;
99
+ readonly 'records.open': 1281;
100
+ readonly 'records.append': 1282;
101
+ readonly 'records.list': 1283;
102
+ readonly 'records.count': 1284;
103
+ readonly 'records.top': 1285;
104
+ readonly 'records.aggregate': 1286;
105
+ readonly 'records.streams': 1287;
106
+ readonly 'records.fieldNames': 1288;
107
+ readonly 'records.poll': 1289;
108
+ readonly 'records.tail': 1290;
109
+ readonly 'records.lines': 1291;
110
+ readonly 'records.damaged': 1292;
111
+ readonly 'records.drop': 1293;
112
+ readonly 'search.open': 2817;
113
+ readonly 'search.set': 2818;
114
+ readonly 'search.setMany': 2819;
115
+ /**
116
+ * Answers whether the index held the document.
117
+ */
118
+ readonly 'search.delete': 2820;
119
+ readonly 'search.get': 2821;
120
+ readonly 'search.search': 2822;
121
+ readonly 'search.status': 2823;
122
+ /**
123
+ * Drops an index and every document it holds, in the background.
124
+ */
125
+ readonly 'search.dropIndex': 2824;
126
+ readonly 'search.list': 2825;
127
+ /**
128
+ * Stops the server as its closing does: the streams running finish, every
129
+ * connection is told GOAWAY, and a sidecar gives back SERVE and its directory.
130
+ */
131
+ readonly 'server.stop': 1;
132
+ readonly 'server.clock': 2;
133
+ readonly 'sql.open': 769;
134
+ readonly 'sql.query': 770;
135
+ readonly 'sql.exec': 771;
136
+ readonly 'sql.batch': 772;
137
+ readonly 'sql.tx': 773;
138
+ readonly 'sql.columns': 774;
139
+ };
140
+ export type Method = keyof typeof methods;
141
+ /**
142
+ * What a backup takes beside every engine's files: the files of the
143
+ * program's it includes, by their paths inside the store's directory, and
144
+ * whether it includes the store's encryption key.
145
+ */
146
+ export declare const BackupWrite: import("./codec.ts").Message<{
147
+ readonly include: readonly [1, import("./codec.ts").Codec<string[], readonly string[]>];
148
+ readonly includeEncryptionKey: readonly [2, import("./codec.ts").Codec<boolean, boolean>];
149
+ }>;
150
+ /**
151
+ * A piece of the zip, in order.
152
+ */
153
+ export declare const BackupPiece: import("./codec.ts").Message<{
154
+ readonly bytes: readonly [1, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
155
+ }>;
156
+ /**
157
+ * What the backup holds, once its zip has gone whole.
158
+ */
159
+ export declare const BackupWritten: import("./codec.ts").Message<{
160
+ readonly files: readonly [1, import("./codec.ts").Codec<number, number>];
161
+ readonly bytes: readonly [2, import("./codec.ts").Codec<number, number>];
162
+ /** the store seals values with a key the backup does not hold */
163
+ readonly keyLeftOut: readonly [3, import("./codec.ts").Codec<boolean, boolean>];
164
+ }>;
165
+ /**
166
+ * Opens a set of files by name, made the first time.
167
+ */
168
+ export declare const BlobsOpen: import("./codec.ts").Message<{
169
+ /** [a-z0-9][a-z0-9_-]{0,63} */
170
+ readonly name: readonly [1, import("./codec.ts").Codec<string, string>];
171
+ /** the term of every file written without its own */
172
+ readonly ttl: readonly [2, import("./codec.ts").Codec<number, number>];
173
+ /** the largest file a write may leave */
174
+ readonly maxFileSize: readonly [3, import("./codec.ts").Codec<number, number>];
175
+ }>;
176
+ /**
177
+ * Where a call stands: the files, a folder's segments, a path within it.
178
+ */
179
+ export declare const BlobsAt: import("./codec.ts").Message<{
180
+ readonly handle: readonly [1, import("./codec.ts").Codec<number, number>];
181
+ readonly folder: readonly [2, import("./codec.ts").Codec<string[], readonly string[]>];
182
+ readonly path: readonly [3, import("./codec.ts").Codec<string, string>];
183
+ }>;
184
+ /**
185
+ * What a file carries: what serving it needs.
186
+ */
187
+ export declare const BlobsInfo: import("./codec.ts").Message<{
188
+ /** within the folder the call stood in */
189
+ readonly path: readonly [1, import("./codec.ts").Codec<string, string>];
190
+ readonly size: readonly [2, import("./codec.ts").Codec<number, number>];
191
+ /** the SHA-256 of its bytes in hex, quoted */
192
+ readonly etag: readonly [3, import("./codec.ts").Codec<string, string>];
193
+ readonly contentType: readonly [4, import("./codec.ts").Codec<string, string>];
194
+ readonly lastModified: readonly [5, import("./codec.ts").Codec<number, number>];
195
+ readonly expires: readonly [6, import("./codec.ts").Codec<number, number>];
196
+ readonly meta: readonly [7, import("./codec.ts").Codec<Record<string, string>, Record<string, string>>];
197
+ }>;
198
+ /**
199
+ * A write of a whole file: a put, or with create a write only where no file
200
+ * is. Its bytes are in the message, or, for an upload, the DATA that follow.
201
+ */
202
+ export declare const BlobsWrite: import("./codec.ts").Message<{
203
+ readonly handle: readonly [1, import("./codec.ts").Codec<number, number>];
204
+ readonly folder: readonly [2, import("./codec.ts").Codec<string[], readonly string[]>];
205
+ readonly path: readonly [3, import("./codec.ts").Codec<string, string>];
206
+ readonly contentType: readonly [4, import("./codec.ts").Codec<string, string>];
207
+ readonly meta: readonly [5, import("./codec.ts").Codec<Record<string, string>, Record<string, string>>];
208
+ /** the file's own term, from its write */
209
+ readonly ttl: readonly [6, import("./codec.ts").Codec<number, number>];
210
+ /** the ETag of the one file it may replace */
211
+ readonly ifMatch: readonly [7, import("./codec.ts").Codec<string, string>];
212
+ /** the body's length: one longer or shorter is refused */
213
+ readonly size: readonly [8, import("./codec.ts").Codec<number, number>];
214
+ /** writes only where no file is */
215
+ readonly create: readonly [9, import("./codec.ts").Codec<boolean, boolean>];
216
+ /** a put's whole body; nothing for an upload */
217
+ readonly bytes: readonly [10, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
218
+ }>;
219
+ /**
220
+ * What a write wrote: none when a create found a file there.
221
+ */
222
+ export declare const BlobsWritten: import("./codec.ts").Message<{
223
+ readonly info: readonly [1, import("./codec.ts").Message<{
224
+ /** within the folder the call stood in */
225
+ readonly path: readonly [1, import("./codec.ts").Codec<string, string>];
226
+ readonly size: readonly [2, import("./codec.ts").Codec<number, number>];
227
+ /** the SHA-256 of its bytes in hex, quoted */
228
+ readonly etag: readonly [3, import("./codec.ts").Codec<string, string>];
229
+ readonly contentType: readonly [4, import("./codec.ts").Codec<string, string>];
230
+ readonly lastModified: readonly [5, import("./codec.ts").Codec<number, number>];
231
+ readonly expires: readonly [6, import("./codec.ts").Codec<number, number>];
232
+ readonly meta: readonly [7, import("./codec.ts").Codec<Record<string, string>, Record<string, string>>];
233
+ }>];
234
+ }>;
235
+ /**
236
+ * A piece of a file's bytes: an upload's DATA from the client, a read's from
237
+ * the server.
238
+ */
239
+ export declare const BlobsPiece: import("./codec.ts").Message<{
240
+ readonly bytes: readonly [1, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
241
+ }>;
242
+ /**
243
+ * A get's answer: what the file carries, none when there is no file, and all
244
+ * its bytes when they fit one message; a larger file's are left to blobs.read,
245
+ * so that a read of a range sends no byte before it.
246
+ */
247
+ export declare const BlobsGot: import("./codec.ts").Message<{
248
+ readonly info: readonly [1, import("./codec.ts").Message<{
249
+ /** within the folder the call stood in */
250
+ readonly path: readonly [1, import("./codec.ts").Codec<string, string>];
251
+ readonly size: readonly [2, import("./codec.ts").Codec<number, number>];
252
+ /** the SHA-256 of its bytes in hex, quoted */
253
+ readonly etag: readonly [3, import("./codec.ts").Codec<string, string>];
254
+ readonly contentType: readonly [4, import("./codec.ts").Codec<string, string>];
255
+ readonly lastModified: readonly [5, import("./codec.ts").Codec<number, number>];
256
+ readonly expires: readonly [6, import("./codec.ts").Codec<number, number>];
257
+ readonly meta: readonly [7, import("./codec.ts").Codec<Record<string, string>, Record<string, string>>];
258
+ }>];
259
+ /** the whole file, or nothing when it is larger */
260
+ readonly bytes: readonly [2, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
261
+ }>;
262
+ /**
263
+ * A read of a file's bytes, as S3's GET with a range and If-Match: the whole
264
+ * file, checked, its last piece sent once its bytes matched their SHA-256 and a
265
+ * changed byte ending the stream corrupt instead; or a range, not checked.
266
+ */
267
+ export declare const BlobsRead: import("./codec.ts").Message<{
268
+ readonly handle: readonly [1, import("./codec.ts").Codec<number, number>];
269
+ readonly folder: readonly [2, import("./codec.ts").Codec<string[], readonly string[]>];
270
+ readonly path: readonly [3, import("./codec.ts").Codec<string, string>];
271
+ /** the ETag a get gave: another file there, or none, is a conflict */
272
+ readonly ifMatch: readonly [4, import("./codec.ts").Codec<string, string>];
273
+ /** from the first byte when absent */
274
+ readonly offset: readonly [5, import("./codec.ts").Codec<number, number>];
275
+ /** to the last byte when absent */
276
+ readonly length: readonly [6, import("./codec.ts").Codec<number, number>];
277
+ }>;
278
+ export declare const BlobsHead: import("./codec.ts").Message<{
279
+ readonly info: readonly [1, import("./codec.ts").Message<{
280
+ /** within the folder the call stood in */
281
+ readonly path: readonly [1, import("./codec.ts").Codec<string, string>];
282
+ readonly size: readonly [2, import("./codec.ts").Codec<number, number>];
283
+ /** the SHA-256 of its bytes in hex, quoted */
284
+ readonly etag: readonly [3, import("./codec.ts").Codec<string, string>];
285
+ readonly contentType: readonly [4, import("./codec.ts").Codec<string, string>];
286
+ readonly lastModified: readonly [5, import("./codec.ts").Codec<number, number>];
287
+ readonly expires: readonly [6, import("./codec.ts").Codec<number, number>];
288
+ readonly meta: readonly [7, import("./codec.ts").Codec<Record<string, string>, Record<string, string>>];
289
+ }>];
290
+ }>;
291
+ export declare const BlobsDelete: import("./codec.ts").Message<{
292
+ readonly handle: readonly [1, import("./codec.ts").Codec<number, number>];
293
+ readonly folder: readonly [2, import("./codec.ts").Codec<string[], readonly string[]>];
294
+ readonly path: readonly [3, import("./codec.ts").Codec<string, string>];
295
+ readonly ifMatch: readonly [4, import("./codec.ts").Codec<string, string>];
296
+ }>;
297
+ /**
298
+ * A copy or a rename: from a path to another of the same folder. A file at
299
+ * to is a conflict, unless ifMatch names the version to replace.
300
+ */
301
+ export declare const BlobsMove: import("./codec.ts").Message<{
302
+ readonly handle: readonly [1, import("./codec.ts").Codec<number, number>];
303
+ readonly folder: readonly [2, import("./codec.ts").Codec<string[], readonly string[]>];
304
+ readonly from: readonly [3, import("./codec.ts").Codec<string, string>];
305
+ readonly to: readonly [4, import("./codec.ts").Codec<string, string>];
306
+ readonly ifMatch: readonly [5, import("./codec.ts").Codec<string, string>];
307
+ }>;
308
+ export declare const BlobsExpire: import("./codec.ts").Message<{
309
+ readonly handle: readonly [1, import("./codec.ts").Codec<number, number>];
310
+ readonly folder: readonly [2, import("./codec.ts").Codec<string[], readonly string[]>];
311
+ readonly path: readonly [3, import("./codec.ts").Codec<string, string>];
312
+ readonly after: readonly [4, import("./codec.ts").Codec<number, number>];
313
+ }>;
314
+ export declare const BlobsFound: import("./codec.ts").Message<{
315
+ readonly found: readonly [1, import("./codec.ts").Codec<boolean, boolean>];
316
+ }>;
317
+ /**
318
+ * A page of a folder's files, in the byte order of their paths.
319
+ */
320
+ export declare const BlobsList: import("./codec.ts").Message<{
321
+ readonly handle: readonly [1, import("./codec.ts").Codec<number, number>];
322
+ readonly folder: readonly [2, import("./codec.ts").Codec<string[], readonly string[]>];
323
+ /** text within the folder */
324
+ readonly prefix: readonly [3, import("./codec.ts").Codec<string, string>];
325
+ /** a page's next */
326
+ readonly after: readonly [4, import("./codec.ts").Codec<string, string>];
327
+ /** 1000 at most, and when absent */
328
+ readonly limit: readonly [5, import("./codec.ts").Codec<number, number>];
329
+ }>;
330
+ export declare const BlobsPage: import("./codec.ts").Message<{
331
+ readonly files: readonly [1, import("./codec.ts").Codec<Read<{
332
+ /** within the folder the call stood in */
333
+ readonly path: readonly [1, import("./codec.ts").Codec<string, string>];
334
+ readonly size: readonly [2, import("./codec.ts").Codec<number, number>];
335
+ /** the SHA-256 of its bytes in hex, quoted */
336
+ readonly etag: readonly [3, import("./codec.ts").Codec<string, string>];
337
+ readonly contentType: readonly [4, import("./codec.ts").Codec<string, string>];
338
+ readonly lastModified: readonly [5, import("./codec.ts").Codec<number, number>];
339
+ readonly expires: readonly [6, import("./codec.ts").Codec<number, number>];
340
+ readonly meta: readonly [7, import("./codec.ts").Codec<Record<string, string>, Record<string, string>>];
341
+ }>[], readonly import("./codec.ts").Written<{
342
+ /** within the folder the call stood in */
343
+ readonly path: readonly [1, import("./codec.ts").Codec<string, string>];
344
+ readonly size: readonly [2, import("./codec.ts").Codec<number, number>];
345
+ /** the SHA-256 of its bytes in hex, quoted */
346
+ readonly etag: readonly [3, import("./codec.ts").Codec<string, string>];
347
+ readonly contentType: readonly [4, import("./codec.ts").Codec<string, string>];
348
+ readonly lastModified: readonly [5, import("./codec.ts").Codec<number, number>];
349
+ readonly expires: readonly [6, import("./codec.ts").Codec<number, number>];
350
+ readonly meta: readonly [7, import("./codec.ts").Codec<Record<string, string>, Record<string, string>>];
351
+ }>[]>];
352
+ readonly next: readonly [2, import("./codec.ts").Codec<string, string>];
353
+ }>;
354
+ export declare const BlobsFolder: import("./codec.ts").Message<{
355
+ readonly handle: readonly [1, import("./codec.ts").Codec<number, number>];
356
+ readonly folder: readonly [2, import("./codec.ts").Codec<string[], readonly string[]>];
357
+ }>;
358
+ export declare const BlobsUsage: import("./codec.ts").Message<{
359
+ readonly count: readonly [1, import("./codec.ts").Codec<number, number>];
360
+ readonly size: readonly [2, import("./codec.ts").Codec<number, number>];
361
+ }>;
362
+ /**
363
+ * A message published on a channel's branch, as docs/guides/channels/README.md has
364
+ * it: every subscription listening there now receives it.
365
+ */
366
+ export declare const ChannelsPublish: import("./codec.ts").Message<{
367
+ /** [a-z0-9][a-z0-9_-]{0,63} */
368
+ readonly name: readonly [1, import("./codec.ts").Codec<string, string>];
369
+ /** the branch's owners, 1 KiB together at most */
370
+ readonly under: readonly [2, import("./codec.ts").Codec<string[], readonly string[]>];
371
+ /** the message, 1 MiB at most */
372
+ readonly value: readonly [3, import("./codec.ts").Codec<string, string>];
373
+ }>;
374
+ /**
375
+ * A subscription of a branch, or of it and every branch below it.
376
+ */
377
+ export declare const ChannelsSubscribe: import("./codec.ts").Message<{
378
+ readonly name: readonly [1, import("./codec.ts").Codec<string, string>];
379
+ readonly under: readonly [2, import("./codec.ts").Codec<string[], readonly string[]>];
380
+ readonly recursive: readonly [3, import("./codec.ts").Codec<boolean, boolean>];
381
+ }>;
382
+ export declare const ChannelsMessage: import("./codec.ts").Message<{
383
+ /** the branch it was published under */
384
+ readonly under: readonly [1, import("./codec.ts").Codec<string[], readonly string[]>];
385
+ readonly value: readonly [2, import("./codec.ts").Codec<string, string>];
386
+ }>;
387
+ /**
388
+ * A config a program opens: its declaration and its layers as data, as
389
+ * docs/guides/config/README.md has them, with what the program read itself, a file's
390
+ * text and its variables, since those belong to it and not to the server.
391
+ */
392
+ export declare const ConfigOpen: import("./codec.ts").Message<{
393
+ /** [a-z0-9][a-z0-9_-]{0,63} */
394
+ readonly name: readonly [1, import("./codec.ts").Codec<string, string>];
395
+ /** each setting's kind, rules, default and marks */
396
+ readonly declaration: readonly [2, import("./codec.ts").Codec<string, string>];
397
+ /** objects, files and the environment, in the order written */
398
+ readonly layers: readonly [3, import("./codec.ts").Codec<string, string>];
399
+ /** a kept change that no longer fits refuses the open */
400
+ readonly strict: readonly [4, import("./codec.ts").Codec<boolean, boolean>];
401
+ }>;
402
+ /**
403
+ * A setting's line of explain.
404
+ */
405
+ export declare const ConfigLine: import("./codec.ts").Message<{
406
+ readonly path: readonly [1, import("./codec.ts").Codec<string, string>];
407
+ /** as JSON, a span spelled, a secret as *** */
408
+ readonly value: readonly [2, import("./codec.ts").Codec<string, string>];
409
+ readonly from: readonly [3, import("./codec.ts").Codec<string, string>];
410
+ /** the values it went over, newest first */
411
+ readonly over: readonly [4, import("./codec.ts").Codec<string[], readonly string[]>];
412
+ }>;
413
+ /**
414
+ * A change of live settings, made on the version the program's value had.
415
+ */
416
+ export declare const ConfigUpdate: import("./codec.ts").Message<{
417
+ readonly handle: readonly [1, import("./codec.ts").Codec<number, number>];
418
+ /** a change made since is a conflict */
419
+ readonly version: readonly [2, import("./codec.ts").Codec<number, number>];
420
+ /** the settings it changes, in the declaration's shape */
421
+ readonly changes: readonly [3, import("./codec.ts").Codec<string, string>];
422
+ }>;
423
+ /**
424
+ * Drops the changes kept of a setting or of a group, or of every setting.
425
+ */
426
+ export declare const ConfigReset: import("./codec.ts").Message<{
427
+ readonly handle: readonly [1, import("./codec.ts").Codec<number, number>];
428
+ /** empty for every change */
429
+ readonly path: readonly [2, import("./codec.ts").Codec<string, string>];
430
+ }>;
431
+ /**
432
+ * What a client says first.
433
+ */
434
+ export declare const Hello: import("./codec.ts").Message<{
435
+ /** the newest the client speaks */
436
+ readonly protocol: readonly [1, import("./codec.ts").Codec<number, number>];
437
+ /** a name and version, for logs */
438
+ readonly client: readonly [2, import("./codec.ts").Codec<string, string>];
439
+ /** required on TCP */
440
+ readonly token: readonly [3, import("./codec.ts").Codec<string, string>];
441
+ /** the largest body the client takes; the server's when absent */
442
+ readonly maxBody: readonly [4, import("./codec.ts").Codec<number, number>];
443
+ /** the DATA the server may send a stream before the client grants more; 2 MiB when absent */
444
+ readonly streamCredit: readonly [5, import("./codec.ts").Codec<number, number>];
445
+ /** 16 random bytes, when the client found the server through SERVE */
446
+ readonly challenge: readonly [6, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
447
+ }>;
448
+ /**
449
+ * What a server answers HELLO with: what the connection agrees.
450
+ */
451
+ export declare const Welcome: import("./codec.ts").Message<{
452
+ /** the one this connection speaks */
453
+ readonly protocol: readonly [1, import("./codec.ts").Codec<number, number>];
454
+ /** its version */
455
+ readonly server: readonly [2, import("./codec.ts").Codec<string, string>];
456
+ /** 16 random bytes a start */
457
+ readonly instance: readonly [3, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
458
+ /** admin, data or read */
459
+ readonly capability: readonly [4, import("./codec.ts").Codec<string, string>];
460
+ /** the largest body either side sends */
461
+ readonly maxBody: readonly [5, import("./codec.ts").Codec<number, number>];
462
+ /** the streams a client may have open at once */
463
+ readonly inFlight: readonly [6, import("./codec.ts").Codec<number, number>];
464
+ /** the REQUEST and DATA bytes a client may send before credit comes back */
465
+ readonly connectionCredit: readonly [7, import("./codec.ts").Codec<number, number>];
466
+ /** the DATA bytes a client may send a stream before credit comes back */
467
+ readonly streamCredit: readonly [8, import("./codec.ts").Codec<number, number>];
468
+ /** what this server serves */
469
+ readonly engines: readonly [9, import("./codec.ts").Codec<string[], readonly string[]>];
470
+ /** the store's clock */
471
+ readonly now: readonly [10, import("./codec.ts").Codec<number, number>];
472
+ /** the HMAC-SHA256 of HELLO's challenge, keyed with SERVE's secret */
473
+ readonly proof: readonly [11, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
474
+ /** full or os, when the store was opened with one: how far its files' commits go */
475
+ readonly durability: readonly [12, import("./codec.ts").Codec<string, string>];
476
+ }>;
477
+ /**
478
+ * How a host opens the store in its own process: the pipe's open takes it,
479
+ * and a server reads the same from its command line.
480
+ */
481
+ export declare const StoreOptions: import("./codec.ts").Message<{
482
+ /** full or os: how far a commit of the store's files goes before it returns; each engine's own when absent */
483
+ readonly durability: readonly [1, import("./codec.ts").Codec<string, string>];
484
+ /** the file of the store's encryption key, which the store only reads; encryption.key of its directory, made when needed, when absent */
485
+ readonly encryptionKeyFile: readonly [2, import("./codec.ts").Codec<string, string>];
486
+ /** makes the store a node, which keeps a log of each file it writes; from or serve make it one too */
487
+ readonly node: readonly [3, import("./codec.ts").Codec<boolean, boolean>];
488
+ /** where the node takes the files it copies, host:port, tried in order */
489
+ readonly from: readonly [4, import("./codec.ts").Codec<string[], readonly string[]>];
490
+ /** where other nodes take files from this one, host:port */
491
+ readonly serve: readonly [5, import("./codec.ts").Codec<string, string>];
492
+ /** the files it copies, as kv.db or sql/app.db; every file but its own records and metrics when empty */
493
+ readonly files: readonly [6, import("./codec.ts").Codec<string[], readonly string[]>];
494
+ /** what it says to the node it takes from, and asks of the nodes that take from it */
495
+ readonly token: readonly [7, import("./codec.ts").Codec<string, string>];
496
+ /** a write of a file it writes answers once a node copying it holds the commit */
497
+ readonly synchronous: readonly [8, import("./codec.ts").Codec<boolean, boolean>];
498
+ /** it is the home of the catalog, which names each file's home */
499
+ readonly catalog: readonly [9, import("./codec.ts").Codec<boolean, boolean>];
500
+ /** where other nodes reach it, host:port; the address serve listens on when absent */
501
+ readonly advertise: readonly [10, import("./codec.ts").Codec<string, string>];
502
+ /** the nodes, by address or id, a synchronous commit waits for one of; any when empty */
503
+ readonly synchronousWith: readonly [11, import("./codec.ts").Codec<string[], readonly string[]>];
504
+ /** plain TCP on links beyond this machine, which anyone on the way reads */
505
+ readonly insecure: readonly [12, import("./codec.ts").Codec<boolean, boolean>];
506
+ /** measures the store into its own metrics.db, under names that start with tinystore_ */
507
+ readonly selfMetrics: readonly [13, import("./codec.ts").Codec<boolean, boolean>];
508
+ /** with selfMetrics, leaves out the machine it runs on: its process's memory and processor, the system's */
509
+ readonly withoutSystem: readonly [14, import("./codec.ts").Codec<boolean, boolean>];
510
+ }>;
511
+ /**
512
+ * The last frame of a connection.
513
+ */
514
+ export declare const GoAway: import("./codec.ts").Message<{
515
+ readonly code: readonly [1, import("./codec.ts").Codec<string, string>];
516
+ readonly message: readonly [2, import("./codec.ts").Codec<string, string>];
517
+ }>;
518
+ /**
519
+ * A stream's last frame when it failed, with ERROR set: its kind's code, what
520
+ * failed, and the item it names. A message refused is one too.
521
+ */
522
+ export declare const Failure: import("./codec.ts").Message<{
523
+ readonly code: readonly [1, import("./codec.ts").Codec<string, string>];
524
+ readonly message: readonly [2, import("./codec.ts").Codec<string, string>];
525
+ readonly what: readonly [3, import("./codec.ts").Codec<Record<string, string>, Record<string, string>>];
526
+ }>;
527
+ /**
528
+ * What a call that opens something answers: its handle, which later calls name.
529
+ */
530
+ export declare const Handle: import("./codec.ts").Message<{
531
+ readonly handle: readonly [1, import("./codec.ts").Codec<number, number>];
532
+ }>;
533
+ /**
534
+ * A message with nothing to say.
535
+ */
536
+ export declare const Empty: import("./codec.ts").Message<{}>;
537
+ /**
538
+ * How many jobs of a queue run at once: in all, across every worker of the
539
+ * store, and in each group.
540
+ */
541
+ export declare const JobsConcurrency: import("./codec.ts").Message<{
542
+ readonly total: readonly [1, import("./codec.ts").Codec<number, number>];
543
+ readonly group: readonly [2, import("./codec.ts").Codec<number, number>];
544
+ }>;
545
+ /**
546
+ * The wait before a retry: initial, doubling each time up to max.
547
+ */
548
+ export declare const JobsBackoff: import("./codec.ts").Message<{
549
+ readonly initial: readonly [1, import("./codec.ts").Codec<number, number>];
550
+ readonly max: readonly [2, import("./codec.ts").Codec<number, number>];
551
+ }>;
552
+ /**
553
+ * Jobs started in any span of per.
554
+ */
555
+ export declare const JobsRate: import("./codec.ts").Message<{
556
+ readonly count: readonly [1, import("./codec.ts").Codec<number, number>];
557
+ readonly per: readonly [2, import("./codec.ts").Codec<number, number>];
558
+ }>;
559
+ /**
560
+ * Opens a queue; an option left out takes its default.
561
+ */
562
+ export declare const JobsQueueOpen: import("./codec.ts").Message<{
563
+ /** [a-z0-9][a-z0-9_-]{0,63} */
564
+ readonly name: readonly [1, import("./codec.ts").Codec<string, string>];
565
+ /** 10 when absent, the first run counted */
566
+ readonly attempts: readonly [2, import("./codec.ts").Codec<number, number>];
567
+ /** 1 s doubling to 1 h when absent */
568
+ readonly backoff: readonly [3, import("./codec.ts").Message<{
569
+ readonly initial: readonly [1, import("./codec.ts").Codec<number, number>];
570
+ readonly max: readonly [2, import("./codec.ts").Codec<number, number>];
571
+ }>];
572
+ /** how long one run may take: a minute when absent */
573
+ readonly timeout: readonly [4, import("./codec.ts").Codec<number, number>];
574
+ /** one at a time in each worker when absent */
575
+ readonly concurrency: readonly [5, import("./codec.ts").Message<{
576
+ readonly total: readonly [1, import("./codec.ts").Codec<number, number>];
577
+ readonly group: readonly [2, import("./codec.ts").Codec<number, number>];
578
+ }>];
579
+ readonly rate: readonly [6, import("./codec.ts").Message<{
580
+ readonly count: readonly [1, import("./codec.ts").Codec<number, number>];
581
+ readonly per: readonly [2, import("./codec.ts").Codec<number, number>];
582
+ }>];
583
+ /** how long a done job's id stays taken */
584
+ readonly dedupe: readonly [7, import("./codec.ts").Codec<number, number>];
585
+ /** how long a failed job stays: a week when absent */
586
+ readonly keep: readonly [8, import("./codec.ts").Codec<number, number>];
587
+ /** ten million when absent */
588
+ readonly maxWaiting: readonly [9, import("./codec.ts").Codec<number, number>];
589
+ /** a database's handle: the queue lives in its file; jobs.db when absent */
590
+ readonly database: readonly [10, import("./codec.ts").Codec<number, number>];
591
+ }>;
592
+ /**
593
+ * Opens a schedule: one repeating job the code owns, under its name, whose
594
+ * repeat replaces the one kept.
595
+ */
596
+ export declare const JobsScheduleOpen: import("./codec.ts").Message<{
597
+ readonly name: readonly [1, import("./codec.ts").Codec<string, string>];
598
+ readonly every: readonly [2, import("./codec.ts").Codec<number, number>];
599
+ /** five fields, with timeZone */
600
+ readonly cron: readonly [3, import("./codec.ts").Codec<string, string>];
601
+ /** an IANA name, UTC among them */
602
+ readonly timeZone: readonly [4, import("./codec.ts").Codec<string, string>];
603
+ readonly attempts: readonly [5, import("./codec.ts").Codec<number, number>];
604
+ readonly backoff: readonly [6, import("./codec.ts").Message<{
605
+ readonly initial: readonly [1, import("./codec.ts").Codec<number, number>];
606
+ readonly max: readonly [2, import("./codec.ts").Codec<number, number>];
607
+ }>];
608
+ readonly timeout: readonly [7, import("./codec.ts").Codec<number, number>];
609
+ }>;
610
+ /**
611
+ * A call on one job: an add, a set or an update.
612
+ */
613
+ export declare const JobsCall: import("./codec.ts").Message<{
614
+ readonly handle: readonly [1, import("./codec.ts").Codec<number, number>];
615
+ /** 1 to 1024 bytes; a set and an update need one */
616
+ readonly id: readonly [2, import("./codec.ts").Codec<string, string>];
617
+ readonly value: readonly [3, import("./codec.ts").Codec<string, string>];
618
+ readonly at: readonly [4, import("./codec.ts").Codec<number, number>];
619
+ /** from now; not beside at */
620
+ readonly delay: readonly [5, import("./codec.ts").Codec<number, number>];
621
+ readonly group: readonly [6, import("./codec.ts").Codec<string, string>];
622
+ /** a repeat, which needs an id */
623
+ readonly every: readonly [7, import("./codec.ts").Codec<number, number>];
624
+ readonly cron: readonly [8, import("./codec.ts").Codec<string, string>];
625
+ readonly timeZone: readonly [9, import("./codec.ts").Codec<string, string>];
626
+ }>;
627
+ /**
628
+ * The job under an id.
629
+ */
630
+ export declare const JobsId: import("./codec.ts").Message<{
631
+ readonly handle: readonly [1, import("./codec.ts").Codec<number, number>];
632
+ readonly id: readonly [2, import("./codec.ts").Codec<string, string>];
633
+ }>;
634
+ /**
635
+ * Whether a call did what it asked: an add added, an update changed, a cancel
636
+ * found a job.
637
+ */
638
+ export declare const JobsChanged: import("./codec.ts").Message<{
639
+ readonly changed: readonly [1, import("./codec.ts").Codec<boolean, boolean>];
640
+ }>;
641
+ /**
642
+ * A job as its queue holds it.
643
+ */
644
+ export declare const JobsJob: import("./codec.ts").Message<{
645
+ readonly found: readonly [1, import("./codec.ts").Codec<boolean, boolean>];
646
+ readonly id: readonly [2, import("./codec.ts").Codec<string, string>];
647
+ readonly value: readonly [3, import("./codec.ts").Codec<string, string>];
648
+ /** scheduled, waiting, running, done, failed or cancelled */
649
+ readonly state: readonly [4, import("./codec.ts").Codec<string, string>];
650
+ /** when it runs next; for one done or failed, when its last run was for */
651
+ readonly at: readonly [5, import("./codec.ts").Codec<number, number>];
652
+ readonly attempt: readonly [6, import("./codec.ts").Codec<number, number>];
653
+ /** the jobs that run before a waiting one, up to 10,000 */
654
+ readonly ahead: readonly [7, import("./codec.ts").Codec<number, number>];
655
+ readonly progress: readonly [8, import("./codec.ts").Codec<string, string>];
656
+ readonly error: readonly [9, import("./codec.ts").Codec<string, string>];
657
+ readonly group: readonly [10, import("./codec.ts").Codec<string, string>];
658
+ /** as the job keeps it: @every 30s +6178ms, 10 3 * * * Europe/Berlin */
659
+ readonly repeat: readonly [11, import("./codec.ts").Codec<string, string>];
660
+ /** the last run a handler finished */
661
+ readonly startedAt: readonly [12, import("./codec.ts").Codec<number, number>];
662
+ readonly endedAt: readonly [13, import("./codec.ts").Codec<number, number>];
663
+ }>;
664
+ /**
665
+ * A page of a queue's jobs: those whose ids start with a prefix, in the byte
666
+ * order of their ids, or with no prefix and the failed state, the last failed
667
+ * first.
668
+ */
669
+ export declare const JobsList: import("./codec.ts").Message<{
670
+ readonly handle: readonly [1, import("./codec.ts").Codec<number, number>];
671
+ readonly prefix: readonly [2, import("./codec.ts").Codec<string, string>];
672
+ /** scheduled, waiting, running or failed */
673
+ readonly state: readonly [3, import("./codec.ts").Codec<string, string>];
674
+ /** the page before's next */
675
+ readonly after: readonly [4, import("./codec.ts").Codec<string, string>];
676
+ /** 100 when absent, 1000 at most */
677
+ readonly limit: readonly [5, import("./codec.ts").Codec<number, number>];
678
+ }>;
679
+ export declare const JobsPage: import("./codec.ts").Message<{
680
+ readonly jobs: readonly [1, import("./codec.ts").Codec<Read<{
681
+ readonly found: readonly [1, import("./codec.ts").Codec<boolean, boolean>];
682
+ readonly id: readonly [2, import("./codec.ts").Codec<string, string>];
683
+ readonly value: readonly [3, import("./codec.ts").Codec<string, string>];
684
+ /** scheduled, waiting, running, done, failed or cancelled */
685
+ readonly state: readonly [4, import("./codec.ts").Codec<string, string>];
686
+ /** when it runs next; for one done or failed, when its last run was for */
687
+ readonly at: readonly [5, import("./codec.ts").Codec<number, number>];
688
+ readonly attempt: readonly [6, import("./codec.ts").Codec<number, number>];
689
+ /** the jobs that run before a waiting one, up to 10,000 */
690
+ readonly ahead: readonly [7, import("./codec.ts").Codec<number, number>];
691
+ readonly progress: readonly [8, import("./codec.ts").Codec<string, string>];
692
+ readonly error: readonly [9, import("./codec.ts").Codec<string, string>];
693
+ readonly group: readonly [10, import("./codec.ts").Codec<string, string>];
694
+ /** as the job keeps it: @every 30s +6178ms, 10 3 * * * Europe/Berlin */
695
+ readonly repeat: readonly [11, import("./codec.ts").Codec<string, string>];
696
+ /** the last run a handler finished */
697
+ readonly startedAt: readonly [12, import("./codec.ts").Codec<number, number>];
698
+ readonly endedAt: readonly [13, import("./codec.ts").Codec<number, number>];
699
+ }>[], readonly import("./codec.ts").Written<{
700
+ readonly found: readonly [1, import("./codec.ts").Codec<boolean, boolean>];
701
+ readonly id: readonly [2, import("./codec.ts").Codec<string, string>];
702
+ readonly value: readonly [3, import("./codec.ts").Codec<string, string>];
703
+ /** scheduled, waiting, running, done, failed or cancelled */
704
+ readonly state: readonly [4, import("./codec.ts").Codec<string, string>];
705
+ /** when it runs next; for one done or failed, when its last run was for */
706
+ readonly at: readonly [5, import("./codec.ts").Codec<number, number>];
707
+ readonly attempt: readonly [6, import("./codec.ts").Codec<number, number>];
708
+ /** the jobs that run before a waiting one, up to 10,000 */
709
+ readonly ahead: readonly [7, import("./codec.ts").Codec<number, number>];
710
+ readonly progress: readonly [8, import("./codec.ts").Codec<string, string>];
711
+ readonly error: readonly [9, import("./codec.ts").Codec<string, string>];
712
+ readonly group: readonly [10, import("./codec.ts").Codec<string, string>];
713
+ /** as the job keeps it: @every 30s +6178ms, 10 3 * * * Europe/Berlin */
714
+ readonly repeat: readonly [11, import("./codec.ts").Codec<string, string>];
715
+ /** the last run a handler finished */
716
+ readonly startedAt: readonly [12, import("./codec.ts").Codec<number, number>];
717
+ readonly endedAt: readonly [13, import("./codec.ts").Codec<number, number>];
718
+ }>[]>];
719
+ readonly next: readonly [2, import("./codec.ts").Codec<string, string>];
720
+ }>;
721
+ /**
722
+ * Starts the queue's worker for the client: the server claims its jobs as they
723
+ * fall due and hands each over as a held job, no more at once than the
724
+ * client's handlers, and the client answers each. A stop, or the server's
725
+ * GOAWAY, hands no job more, and the server ends the stream with DATA·END once
726
+ * the jobs the client holds are answered and written. The client's DATA·END
727
+ * ends the worker at once, the attempt of a job it still holds failing.
728
+ */
729
+ export declare const JobsWork: import("./codec.ts").Message<{
730
+ readonly handle: readonly [1, import("./codec.ts").Codec<number, number>];
731
+ /** the handlers the client runs at once, 1024 at most: the queue's total, or one */
732
+ readonly concurrency: readonly [2, import("./codec.ts").Codec<number, number>];
733
+ /** runDue: the server ends the stream once no job is due and none is held */
734
+ readonly untilIdle: readonly [3, import("./codec.ts").Codec<boolean, boolean>];
735
+ }>;
736
+ /**
737
+ * A job the server hands the client's worker. Its run's number names it to the
738
+ * answer, a step and a keep; a cancel sends it again, cancelled, so that its
739
+ * handler stops.
740
+ */
741
+ export declare const JobsHeld: import("./codec.ts").Message<{
742
+ readonly run: readonly [1, import("./codec.ts").Codec<number, number>];
743
+ readonly id: readonly [2, import("./codec.ts").Codec<string, string>];
744
+ readonly value: readonly [3, import("./codec.ts").Codec<string, string>];
745
+ /** when the run was due */
746
+ readonly at: readonly [4, import("./codec.ts").Codec<number, number>];
747
+ /** the first being 1 */
748
+ readonly attempt: readonly [5, import("./codec.ts").Codec<number, number>];
749
+ readonly group: readonly [6, import("./codec.ts").Codec<string, string>];
750
+ readonly cancelled: readonly [7, import("./codec.ts").Codec<boolean, boolean>];
751
+ }>;
752
+ /**
753
+ * The client's answer for a held job: how its run ended, or how far it got,
754
+ * which settles nothing; or a stop, which names no run. An answer for a job a
755
+ * cancel took settles nothing.
756
+ */
757
+ export declare const JobsAnswer: import("./codec.ts").Message<{
758
+ readonly run: readonly [1, import("./codec.ts").Codec<number, number>];
759
+ /** done, retry, snooze, fail, back, progress or stop */
760
+ readonly how: readonly [2, import("./codec.ts").Codec<string, string>];
761
+ /** when a retry or a snooze runs again; a retry without one waits its backoff */
762
+ readonly at: readonly [3, import("./codec.ts").Codec<number, number>];
763
+ /** why a retry or a failure */
764
+ readonly error: readonly [4, import("./codec.ts").Codec<string, string>];
765
+ /** 4 KiB at most */
766
+ readonly progress: readonly [5, import("./codec.ts").Codec<string, string>];
767
+ /** from now on the server's clock; not beside at */
768
+ readonly delay: readonly [6, import("./codec.ts").Codec<number, number>];
769
+ }>;
770
+ /**
771
+ * A step of a held job's run: jobs.step asks for its kept answer, jobs.keep
772
+ * keeps one.
773
+ */
774
+ export declare const JobsStep: import("./codec.ts").Message<{
775
+ readonly run: readonly [1, import("./codec.ts").Codec<number, number>];
776
+ /** 1 to 256 bytes */
777
+ readonly name: readonly [2, import("./codec.ts").Codec<string, string>];
778
+ /** jobs.keep's: 1 MiB at most */
779
+ readonly answer: readonly [3, import("./codec.ts").Codec<string, string>];
780
+ }>;
781
+ export declare const JobsKept: import("./codec.ts").Message<{
782
+ readonly found: readonly [1, import("./codec.ts").Codec<boolean, boolean>];
783
+ readonly answer: readonly [2, import("./codec.ts").Codec<string, string>];
784
+ }>;
785
+ /**
786
+ * One write of a transaction: an add, a set or an update with its call, or a
787
+ * cancel with its id.
788
+ */
789
+ export declare const JobsOp: import("./codec.ts").Message<{
790
+ /** jobs.add, jobs.set, jobs.update or jobs.cancel */
791
+ readonly method: readonly [1, import("./codec.ts").Codec<number, number>];
792
+ readonly call: readonly [2, import("./codec.ts").Message<{
793
+ readonly handle: readonly [1, import("./codec.ts").Codec<number, number>];
794
+ /** 1 to 1024 bytes; a set and an update need one */
795
+ readonly id: readonly [2, import("./codec.ts").Codec<string, string>];
796
+ readonly value: readonly [3, import("./codec.ts").Codec<string, string>];
797
+ readonly at: readonly [4, import("./codec.ts").Codec<number, number>];
798
+ /** from now; not beside at */
799
+ readonly delay: readonly [5, import("./codec.ts").Codec<number, number>];
800
+ readonly group: readonly [6, import("./codec.ts").Codec<string, string>];
801
+ /** a repeat, which needs an id */
802
+ readonly every: readonly [7, import("./codec.ts").Codec<number, number>];
803
+ readonly cron: readonly [8, import("./codec.ts").Codec<string, string>];
804
+ readonly timeZone: readonly [9, import("./codec.ts").Codec<string, string>];
805
+ }>];
806
+ readonly id: readonly [3, import("./codec.ts").Message<{
807
+ readonly handle: readonly [1, import("./codec.ts").Codec<number, number>];
808
+ readonly id: readonly [2, import("./codec.ts").Codec<string, string>];
809
+ }>];
810
+ }>;
811
+ /**
812
+ * A transaction of jobs.db across the wire: its writes, all applied or none.
813
+ * One that fails names its place in what, as write.
814
+ */
815
+ export declare const JobsTx: import("./codec.ts").Message<{
816
+ readonly writes: readonly [1, import("./codec.ts").Codec<Read<{
817
+ /** jobs.add, jobs.set, jobs.update or jobs.cancel */
818
+ readonly method: readonly [1, import("./codec.ts").Codec<number, number>];
819
+ readonly call: readonly [2, import("./codec.ts").Message<{
820
+ readonly handle: readonly [1, import("./codec.ts").Codec<number, number>];
821
+ /** 1 to 1024 bytes; a set and an update need one */
822
+ readonly id: readonly [2, import("./codec.ts").Codec<string, string>];
823
+ readonly value: readonly [3, import("./codec.ts").Codec<string, string>];
824
+ readonly at: readonly [4, import("./codec.ts").Codec<number, number>];
825
+ /** from now; not beside at */
826
+ readonly delay: readonly [5, import("./codec.ts").Codec<number, number>];
827
+ readonly group: readonly [6, import("./codec.ts").Codec<string, string>];
828
+ /** a repeat, which needs an id */
829
+ readonly every: readonly [7, import("./codec.ts").Codec<number, number>];
830
+ readonly cron: readonly [8, import("./codec.ts").Codec<string, string>];
831
+ readonly timeZone: readonly [9, import("./codec.ts").Codec<string, string>];
832
+ }>];
833
+ readonly id: readonly [3, import("./codec.ts").Message<{
834
+ readonly handle: readonly [1, import("./codec.ts").Codec<number, number>];
835
+ readonly id: readonly [2, import("./codec.ts").Codec<string, string>];
836
+ }>];
837
+ }>[], readonly import("./codec.ts").Written<{
838
+ /** jobs.add, jobs.set, jobs.update or jobs.cancel */
839
+ readonly method: readonly [1, import("./codec.ts").Codec<number, number>];
840
+ readonly call: readonly [2, import("./codec.ts").Message<{
841
+ readonly handle: readonly [1, import("./codec.ts").Codec<number, number>];
842
+ /** 1 to 1024 bytes; a set and an update need one */
843
+ readonly id: readonly [2, import("./codec.ts").Codec<string, string>];
844
+ readonly value: readonly [3, import("./codec.ts").Codec<string, string>];
845
+ readonly at: readonly [4, import("./codec.ts").Codec<number, number>];
846
+ /** from now; not beside at */
847
+ readonly delay: readonly [5, import("./codec.ts").Codec<number, number>];
848
+ readonly group: readonly [6, import("./codec.ts").Codec<string, string>];
849
+ /** a repeat, which needs an id */
850
+ readonly every: readonly [7, import("./codec.ts").Codec<number, number>];
851
+ readonly cron: readonly [8, import("./codec.ts").Codec<string, string>];
852
+ readonly timeZone: readonly [9, import("./codec.ts").Codec<string, string>];
853
+ }>];
854
+ readonly id: readonly [3, import("./codec.ts").Message<{
855
+ readonly handle: readonly [1, import("./codec.ts").Codec<number, number>];
856
+ readonly id: readonly [2, import("./codec.ts").Codec<string, string>];
857
+ }>];
858
+ }>[]>];
859
+ }>;
860
+ /**
861
+ * What each write of a transaction did, in their order: whether an add added,
862
+ * an update changed or a cancel found a job; a set changes always.
863
+ */
864
+ export declare const JobsTxResults: import("./codec.ts").Message<{
865
+ readonly outcomes: readonly [1, import("./codec.ts").Codec<Read<{
866
+ readonly changed: readonly [1, import("./codec.ts").Codec<boolean, boolean>];
867
+ }>[], readonly import("./codec.ts").Written<{
868
+ readonly changed: readonly [1, import("./codec.ts").Codec<boolean, boolean>];
869
+ }>[]>];
870
+ }>;
871
+ /**
872
+ * Opens a bucket of values by key. Its keys expire ttl after they are written,
873
+ * or idle after they were last read or written; not both.
874
+ */
875
+ export declare const KvBucketOpen: import("./codec.ts").Message<{
876
+ /** [a-z0-9][a-z0-9_-]{0,63} */
877
+ readonly name: readonly [1, import("./codec.ts").Codec<string, string>];
878
+ readonly ttl: readonly [2, import("./codec.ts").Codec<number, number>];
879
+ readonly idle: readonly [3, import("./codec.ts").Codec<number, number>];
880
+ /** a database's handle: the bucket lives in its file; kv.db when absent */
881
+ readonly database: readonly [4, import("./codec.ts").Codec<number, number>];
882
+ /** its values are sealed with the server's encryption key; a read connection opens none */
883
+ readonly encrypted: readonly [5, import("./codec.ts").Codec<boolean, boolean>];
884
+ }>;
885
+ /**
886
+ * A call on one key of a handle's branch.
887
+ */
888
+ export declare const KvCall: import("./codec.ts").Message<{
889
+ readonly handle: readonly [1, import("./codec.ts").Codec<number, number>];
890
+ /** the branch's owners, outermost first; the bucket's root when empty */
891
+ readonly under: readonly [2, import("./codec.ts").Codec<(string | Uint8Array<ArrayBufferLike>)[], readonly import("./codec.ts").Key[]>];
892
+ readonly key: readonly [3, import("./codec.ts").Codec<string | Uint8Array<ArrayBufferLike>, import("./codec.ts").Key>];
893
+ /** what a set or a create writes */
894
+ readonly value: readonly [4, import("./codec.ts").Codec<Raw, number | Raw>];
895
+ /** the expiry a write gives, from now */
896
+ readonly ttl: readonly [5, import("./codec.ts").Codec<number, number>];
897
+ /** the expiry a write gives, as a time */
898
+ readonly expiresAt: readonly [6, import("./codec.ts").Codec<number, number>];
899
+ /** the version the key must still be at */
900
+ readonly ifVersion: readonly [7, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
901
+ /** what a counter adds; the requests or uses a limit is asked for, 1 when absent */
902
+ readonly n: readonly [8, import("./codec.ts").Codec<bigint, number | bigint>];
903
+ }>;
904
+ /**
905
+ * A key's value with what a conditional write needs.
906
+ */
907
+ export declare const KvEntry: import("./codec.ts").Message<{
908
+ readonly found: readonly [1, import("./codec.ts").Codec<boolean, boolean>];
909
+ readonly value: readonly [2, import("./codec.ts").Codec<Raw, number | Raw>];
910
+ /** compared only for equality */
911
+ readonly version: readonly [3, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
912
+ /** absent for a key that never expires */
913
+ readonly expiresAt: readonly [4, import("./codec.ts").Codec<number, number>];
914
+ /** a page's entry alone */
915
+ readonly key: readonly [5, import("./codec.ts").Codec<string | Uint8Array<ArrayBufferLike>, import("./codec.ts").Key>];
916
+ }>;
917
+ /**
918
+ * What a write left: whether it wrote, and the version and expiry the key has
919
+ * now, the live key's own when a create found one.
920
+ */
921
+ export declare const KvWritten: import("./codec.ts").Message<{
922
+ readonly written: readonly [1, import("./codec.ts").Codec<boolean, boolean>];
923
+ readonly version: readonly [2, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
924
+ readonly expiresAt: readonly [3, import("./codec.ts").Codec<number, number>];
925
+ }>;
926
+ export declare const KvFound: import("./codec.ts").Message<{
927
+ readonly found: readonly [1, import("./codec.ts").Codec<boolean, boolean>];
928
+ }>;
929
+ /**
930
+ * A branch of a handle, for a clear.
931
+ */
932
+ export declare const KvBranch: import("./codec.ts").Message<{
933
+ readonly handle: readonly [1, import("./codec.ts").Codec<number, number>];
934
+ readonly under: readonly [2, import("./codec.ts").Codec<(string | Uint8Array<ArrayBufferLike>)[], readonly import("./codec.ts").Key[]>];
935
+ }>;
936
+ /**
937
+ * A page of a branch's own keys, in the byte order of their text.
938
+ */
939
+ export declare const KvList: import("./codec.ts").Message<{
940
+ readonly handle: readonly [1, import("./codec.ts").Codec<number, number>];
941
+ readonly under: readonly [2, import("./codec.ts").Codec<(string | Uint8Array<ArrayBufferLike>)[], readonly import("./codec.ts").Key[]>];
942
+ /** the key the page starts after */
943
+ readonly after: readonly [3, import("./codec.ts").Codec<string | Uint8Array<ArrayBufferLike>, import("./codec.ts").Key>];
944
+ /** 100 when absent, 1000 at most */
945
+ readonly limit: readonly [4, import("./codec.ts").Codec<number, number>];
946
+ }>;
947
+ /**
948
+ * A page of entries, as many as the limit asks and the body holds, and where
949
+ * the next page starts, when there is one.
950
+ */
951
+ export declare const KvPage: import("./codec.ts").Message<{
952
+ readonly entries: readonly [1, import("./codec.ts").Codec<Read<{
953
+ readonly found: readonly [1, import("./codec.ts").Codec<boolean, boolean>];
954
+ readonly value: readonly [2, import("./codec.ts").Codec<Raw, number | Raw>];
955
+ /** compared only for equality */
956
+ readonly version: readonly [3, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
957
+ /** absent for a key that never expires */
958
+ readonly expiresAt: readonly [4, import("./codec.ts").Codec<number, number>];
959
+ /** a page's entry alone */
960
+ readonly key: readonly [5, import("./codec.ts").Codec<string | Uint8Array<ArrayBufferLike>, import("./codec.ts").Key>];
961
+ }>[], readonly import("./codec.ts").Written<{
962
+ readonly found: readonly [1, import("./codec.ts").Codec<boolean, boolean>];
963
+ readonly value: readonly [2, import("./codec.ts").Codec<Raw, number | Raw>];
964
+ /** compared only for equality */
965
+ readonly version: readonly [3, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
966
+ /** absent for a key that never expires */
967
+ readonly expiresAt: readonly [4, import("./codec.ts").Codec<number, number>];
968
+ /** a page's entry alone */
969
+ readonly key: readonly [5, import("./codec.ts").Codec<string | Uint8Array<ArrayBufferLike>, import("./codec.ts").Key>];
970
+ }>[]>];
971
+ readonly next: readonly [2, import("./codec.ts").Codec<string | Uint8Array<ArrayBufferLike>, import("./codec.ts").Key>];
972
+ }>;
973
+ /**
974
+ * Opens counters: numbers by key that only add up.
975
+ */
976
+ export declare const KvCountersOpen: import("./codec.ts").Message<{
977
+ readonly name: readonly [1, import("./codec.ts").Codec<string, string>];
978
+ /** a counter lasts this long from its first add */
979
+ readonly ttl: readonly [2, import("./codec.ts").Codec<number, number>];
980
+ /** kept in memory and written every span; each add written when absent */
981
+ readonly flushEvery: readonly [3, import("./codec.ts").Codec<number, number>];
982
+ }>;
983
+ export declare const KvCount: import("./codec.ts").Message<{
984
+ readonly value: readonly [1, import("./codec.ts").Codec<bigint, number | bigint>];
985
+ }>;
986
+ /**
987
+ * Opens a rate limit: rate requests a key every per, burst at once.
988
+ */
989
+ export declare const KvRateLimitOpen: import("./codec.ts").Message<{
990
+ readonly name: readonly [1, import("./codec.ts").Codec<string, string>];
991
+ readonly rate: readonly [2, import("./codec.ts").Codec<number, number>];
992
+ readonly per: readonly [3, import("./codec.ts").Codec<number, number>];
993
+ /** the rate when absent */
994
+ readonly burst: readonly [4, import("./codec.ts").Codec<number, number>];
995
+ }>;
996
+ /**
997
+ * One window of a quota: a key may use up to limit every per from its first use.
998
+ */
999
+ export declare const KvWindow: import("./codec.ts").Message<{
1000
+ /** [a-z][a-z0-9_]{0,31} */
1001
+ readonly name: readonly [1, import("./codec.ts").Codec<string, string>];
1002
+ readonly limit: readonly [2, import("./codec.ts").Codec<number, number>];
1003
+ readonly per: readonly [3, import("./codec.ts").Codec<number, number>];
1004
+ }>;
1005
+ export declare const KvQuotaOpen: import("./codec.ts").Message<{
1006
+ readonly name: readonly [1, import("./codec.ts").Codec<string, string>];
1007
+ /** one to eight */
1008
+ readonly windows: readonly [2, import("./codec.ts").Codec<Read<{
1009
+ /** [a-z][a-z0-9_]{0,31} */
1010
+ readonly name: readonly [1, import("./codec.ts").Codec<string, string>];
1011
+ readonly limit: readonly [2, import("./codec.ts").Codec<number, number>];
1012
+ readonly per: readonly [3, import("./codec.ts").Codec<number, number>];
1013
+ }>[], readonly import("./codec.ts").Written<{
1014
+ /** [a-z][a-z0-9_]{0,31} */
1015
+ readonly name: readonly [1, import("./codec.ts").Codec<string, string>];
1016
+ readonly limit: readonly [2, import("./codec.ts").Codec<number, number>];
1017
+ readonly per: readonly [3, import("./codec.ts").Codec<number, number>];
1018
+ }>[]>];
1019
+ }>;
1020
+ /**
1021
+ * One window of a quota as a key stands in it.
1022
+ */
1023
+ export declare const KvWindowUse: import("./codec.ts").Message<{
1024
+ readonly name: readonly [1, import("./codec.ts").Codec<string, string>];
1025
+ readonly used: readonly [2, import("./codec.ts").Codec<number, number>];
1026
+ readonly limit: readonly [3, import("./codec.ts").Codec<number, number>];
1027
+ readonly left: readonly [4, import("./codec.ts").Codec<number, number>];
1028
+ /** absent for a window not started */
1029
+ readonly resetsAt: readonly [5, import("./codec.ts").Codec<number, number>];
1030
+ }>;
1031
+ /**
1032
+ * What a rate limit or a quota answers a request.
1033
+ */
1034
+ export declare const KvAllowance: import("./codec.ts").Message<{
1035
+ readonly ok: readonly [1, import("./codec.ts").Codec<boolean, boolean>];
1036
+ /** how many more would pass now */
1037
+ readonly left: readonly [2, import("./codec.ts").Codec<number, number>];
1038
+ /** when the request would pass; absent when it did */
1039
+ readonly retryAt: readonly [3, import("./codec.ts").Codec<number, number>];
1040
+ /** a quota's, in the order it names them */
1041
+ readonly windows: readonly [4, import("./codec.ts").Codec<Read<{
1042
+ readonly name: readonly [1, import("./codec.ts").Codec<string, string>];
1043
+ readonly used: readonly [2, import("./codec.ts").Codec<number, number>];
1044
+ readonly limit: readonly [3, import("./codec.ts").Codec<number, number>];
1045
+ readonly left: readonly [4, import("./codec.ts").Codec<number, number>];
1046
+ /** absent for a window not started */
1047
+ readonly resetsAt: readonly [5, import("./codec.ts").Codec<number, number>];
1048
+ }>[], readonly import("./codec.ts").Written<{
1049
+ readonly name: readonly [1, import("./codec.ts").Codec<string, string>];
1050
+ readonly used: readonly [2, import("./codec.ts").Codec<number, number>];
1051
+ readonly limit: readonly [3, import("./codec.ts").Codec<number, number>];
1052
+ readonly left: readonly [4, import("./codec.ts").Codec<number, number>];
1053
+ /** absent for a window not started */
1054
+ readonly resetsAt: readonly [5, import("./codec.ts").Codec<number, number>];
1055
+ }>[]>];
1056
+ }>;
1057
+ /**
1058
+ * Opens once's answers: a function run once a key, its answer kept.
1059
+ */
1060
+ export declare const KvOnceOpen: import("./codec.ts").Message<{
1061
+ readonly name: readonly [1, import("./codec.ts").Codec<string, string>];
1062
+ /** a day when absent */
1063
+ readonly keep: readonly [2, import("./codec.ts").Codec<number, number>];
1064
+ }>;
1065
+ /**
1066
+ * An answer of once: in the server's RESPONSE, found when one was kept, and
1067
+ * otherwise the run is the client's; in the client's last DATA, found with the
1068
+ * answer to keep, or not found when the function failed.
1069
+ */
1070
+ export declare const KvAnswer: import("./codec.ts").Message<{
1071
+ readonly found: readonly [1, import("./codec.ts").Codec<boolean, boolean>];
1072
+ readonly value: readonly [2, import("./codec.ts").Codec<Raw, number | Raw>];
1073
+ }>;
1074
+ /**
1075
+ * A read a transaction made, which its commit checks: the key still at the
1076
+ * version it was found at, or still absent.
1077
+ */
1078
+ export declare const KvCheck: import("./codec.ts").Message<{
1079
+ readonly handle: readonly [1, import("./codec.ts").Codec<number, number>];
1080
+ readonly under: readonly [2, import("./codec.ts").Codec<(string | Uint8Array<ArrayBufferLike>)[], readonly import("./codec.ts").Key[]>];
1081
+ readonly key: readonly [3, import("./codec.ts").Codec<string | Uint8Array<ArrayBufferLike>, import("./codec.ts").Key>];
1082
+ /** absent: the read found nothing */
1083
+ readonly version: readonly [4, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
1084
+ }>;
1085
+ /**
1086
+ * One write of a transaction: the method it is, and its call.
1087
+ */
1088
+ export declare const KvOp: import("./codec.ts").Message<{
1089
+ /** kv.set, kv.create, kv.take, kv.delete, kv.expire, kv.clear or kv.counters.add */
1090
+ readonly method: readonly [1, import("./codec.ts").Codec<number, number>];
1091
+ readonly call: readonly [2, import("./codec.ts").Message<{
1092
+ readonly handle: readonly [1, import("./codec.ts").Codec<number, number>];
1093
+ /** the branch's owners, outermost first; the bucket's root when empty */
1094
+ readonly under: readonly [2, import("./codec.ts").Codec<(string | Uint8Array<ArrayBufferLike>)[], readonly import("./codec.ts").Key[]>];
1095
+ readonly key: readonly [3, import("./codec.ts").Codec<string | Uint8Array<ArrayBufferLike>, import("./codec.ts").Key>];
1096
+ /** what a set or a create writes */
1097
+ readonly value: readonly [4, import("./codec.ts").Codec<Raw, number | Raw>];
1098
+ /** the expiry a write gives, from now */
1099
+ readonly ttl: readonly [5, import("./codec.ts").Codec<number, number>];
1100
+ /** the expiry a write gives, as a time */
1101
+ readonly expiresAt: readonly [6, import("./codec.ts").Codec<number, number>];
1102
+ /** the version the key must still be at */
1103
+ readonly ifVersion: readonly [7, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
1104
+ /** what a counter adds; the requests or uses a limit is asked for, 1 when absent */
1105
+ readonly n: readonly [8, import("./codec.ts").Codec<bigint, number | bigint>];
1106
+ }>];
1107
+ }>;
1108
+ /**
1109
+ * A transaction across the wire: its reads' checks, then its writes, all
1110
+ * applied or none. A failed check or write names its place in what.
1111
+ */
1112
+ export declare const KvTx: import("./codec.ts").Message<{
1113
+ readonly checks: readonly [1, import("./codec.ts").Codec<Read<{
1114
+ readonly handle: readonly [1, import("./codec.ts").Codec<number, number>];
1115
+ readonly under: readonly [2, import("./codec.ts").Codec<(string | Uint8Array<ArrayBufferLike>)[], readonly import("./codec.ts").Key[]>];
1116
+ readonly key: readonly [3, import("./codec.ts").Codec<string | Uint8Array<ArrayBufferLike>, import("./codec.ts").Key>];
1117
+ /** absent: the read found nothing */
1118
+ readonly version: readonly [4, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
1119
+ }>[], readonly import("./codec.ts").Written<{
1120
+ readonly handle: readonly [1, import("./codec.ts").Codec<number, number>];
1121
+ readonly under: readonly [2, import("./codec.ts").Codec<(string | Uint8Array<ArrayBufferLike>)[], readonly import("./codec.ts").Key[]>];
1122
+ readonly key: readonly [3, import("./codec.ts").Codec<string | Uint8Array<ArrayBufferLike>, import("./codec.ts").Key>];
1123
+ /** absent: the read found nothing */
1124
+ readonly version: readonly [4, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
1125
+ }>[]>];
1126
+ readonly writes: readonly [2, import("./codec.ts").Codec<Read<{
1127
+ /** kv.set, kv.create, kv.take, kv.delete, kv.expire, kv.clear or kv.counters.add */
1128
+ readonly method: readonly [1, import("./codec.ts").Codec<number, number>];
1129
+ readonly call: readonly [2, import("./codec.ts").Message<{
1130
+ readonly handle: readonly [1, import("./codec.ts").Codec<number, number>];
1131
+ /** the branch's owners, outermost first; the bucket's root when empty */
1132
+ readonly under: readonly [2, import("./codec.ts").Codec<(string | Uint8Array<ArrayBufferLike>)[], readonly import("./codec.ts").Key[]>];
1133
+ readonly key: readonly [3, import("./codec.ts").Codec<string | Uint8Array<ArrayBufferLike>, import("./codec.ts").Key>];
1134
+ /** what a set or a create writes */
1135
+ readonly value: readonly [4, import("./codec.ts").Codec<Raw, number | Raw>];
1136
+ /** the expiry a write gives, from now */
1137
+ readonly ttl: readonly [5, import("./codec.ts").Codec<number, number>];
1138
+ /** the expiry a write gives, as a time */
1139
+ readonly expiresAt: readonly [6, import("./codec.ts").Codec<number, number>];
1140
+ /** the version the key must still be at */
1141
+ readonly ifVersion: readonly [7, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
1142
+ /** what a counter adds; the requests or uses a limit is asked for, 1 when absent */
1143
+ readonly n: readonly [8, import("./codec.ts").Codec<bigint, number | bigint>];
1144
+ }>];
1145
+ }>[], readonly import("./codec.ts").Written<{
1146
+ /** kv.set, kv.create, kv.take, kv.delete, kv.expire, kv.clear or kv.counters.add */
1147
+ readonly method: readonly [1, import("./codec.ts").Codec<number, number>];
1148
+ readonly call: readonly [2, import("./codec.ts").Message<{
1149
+ readonly handle: readonly [1, import("./codec.ts").Codec<number, number>];
1150
+ /** the branch's owners, outermost first; the bucket's root when empty */
1151
+ readonly under: readonly [2, import("./codec.ts").Codec<(string | Uint8Array<ArrayBufferLike>)[], readonly import("./codec.ts").Key[]>];
1152
+ readonly key: readonly [3, import("./codec.ts").Codec<string | Uint8Array<ArrayBufferLike>, import("./codec.ts").Key>];
1153
+ /** what a set or a create writes */
1154
+ readonly value: readonly [4, import("./codec.ts").Codec<Raw, number | Raw>];
1155
+ /** the expiry a write gives, from now */
1156
+ readonly ttl: readonly [5, import("./codec.ts").Codec<number, number>];
1157
+ /** the expiry a write gives, as a time */
1158
+ readonly expiresAt: readonly [6, import("./codec.ts").Codec<number, number>];
1159
+ /** the version the key must still be at */
1160
+ readonly ifVersion: readonly [7, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
1161
+ /** what a counter adds; the requests or uses a limit is asked for, 1 when absent */
1162
+ readonly n: readonly [8, import("./codec.ts").Codec<bigint, number | bigint>];
1163
+ }>];
1164
+ }>[]>];
1165
+ }>;
1166
+ /**
1167
+ * What one write of a transaction did.
1168
+ */
1169
+ export declare const KvOutcome: import("./codec.ts").Message<{
1170
+ /** a take, a delete or an expire found a live key */
1171
+ readonly found: readonly [1, import("./codec.ts").Codec<boolean, boolean>];
1172
+ /** a set or a create wrote */
1173
+ readonly written: readonly [2, import("./codec.ts").Codec<boolean, boolean>];
1174
+ /** what a take took */
1175
+ readonly value: readonly [3, import("./codec.ts").Codec<Raw, number | Raw>];
1176
+ readonly version: readonly [4, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
1177
+ readonly expiresAt: readonly [5, import("./codec.ts").Codec<number, number>];
1178
+ /** a counter's value after its add */
1179
+ readonly count: readonly [6, import("./codec.ts").Codec<bigint, number | bigint>];
1180
+ }>;
1181
+ export declare const KvTxResults: import("./codec.ts").Message<{
1182
+ readonly outcomes: readonly [1, import("./codec.ts").Codec<Read<{
1183
+ /** a take, a delete or an expire found a live key */
1184
+ readonly found: readonly [1, import("./codec.ts").Codec<boolean, boolean>];
1185
+ /** a set or a create wrote */
1186
+ readonly written: readonly [2, import("./codec.ts").Codec<boolean, boolean>];
1187
+ /** what a take took */
1188
+ readonly value: readonly [3, import("./codec.ts").Codec<Raw, number | Raw>];
1189
+ readonly version: readonly [4, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
1190
+ readonly expiresAt: readonly [5, import("./codec.ts").Codec<number, number>];
1191
+ /** a counter's value after its add */
1192
+ readonly count: readonly [6, import("./codec.ts").Codec<bigint, number | bigint>];
1193
+ }>[], readonly import("./codec.ts").Written<{
1194
+ /** a take, a delete or an expire found a live key */
1195
+ readonly found: readonly [1, import("./codec.ts").Codec<boolean, boolean>];
1196
+ /** a set or a create wrote */
1197
+ readonly written: readonly [2, import("./codec.ts").Codec<boolean, boolean>];
1198
+ /** what a take took */
1199
+ readonly value: readonly [3, import("./codec.ts").Codec<Raw, number | Raw>];
1200
+ readonly version: readonly [4, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
1201
+ readonly expiresAt: readonly [5, import("./codec.ts").Codec<number, number>];
1202
+ /** a counter's value after its add */
1203
+ readonly count: readonly [6, import("./codec.ts").Codec<bigint, number | bigint>];
1204
+ }>[]>];
1205
+ }>;
1206
+ /**
1207
+ * A key of a lock or a semaphore that a holder through a connection asks
1208
+ * for, as docs/guides/locks/README.md has it: the lease lasts `ttl` from its grant and
1209
+ * from each renewal, so that a holder whose program froze loses it.
1210
+ */
1211
+ export declare const LocksHold: import("./codec.ts").Message<{
1212
+ /** lock or semaphore */
1213
+ readonly kind: readonly [1, import("./codec.ts").Codec<string, string>];
1214
+ /** [a-z0-9][a-z0-9_-]{0,63} */
1215
+ readonly name: readonly [2, import("./codec.ts").Codec<string, string>];
1216
+ /** 1 to 1024 bytes */
1217
+ readonly key: readonly [3, import("./codec.ts").Codec<string, string>];
1218
+ /** how many may hold the key at once: 1 for a lock, 1 to 1000 */
1219
+ readonly limit: readonly [4, import("./codec.ts").Codec<number, number>];
1220
+ /** 1 s to 1 hour */
1221
+ readonly ttl: readonly [5, import("./codec.ts").Codec<number, number>];
1222
+ /** from the grant, however the lease is renewed */
1223
+ readonly maxHold: readonly [6, import("./codec.ts").Codec<number, number>];
1224
+ /** 0 takes the key only if it is free */
1225
+ readonly wait: readonly [7, import("./codec.ts").Codec<number, number>];
1226
+ /** 16 random bytes: asked again, the lease given answers */
1227
+ readonly request: readonly [8, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
1228
+ }>;
1229
+ /**
1230
+ * A lease, or the key held by others when the hold would not wait.
1231
+ */
1232
+ export declare const LocksHeld: import("./codec.ts").Message<{
1233
+ readonly acquired: readonly [1, import("./codec.ts").Codec<boolean, boolean>];
1234
+ /** 16 random bytes only its holder learns */
1235
+ readonly lease: readonly [2, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
1236
+ /** a decimal integer of up to 128 bits; empty for a semaphore */
1237
+ readonly fence: readonly [3, import("./codec.ts").Codec<string, string>];
1238
+ /** how long until maxHold revokes the lease, from now */
1239
+ readonly revokeIn: readonly [4, import("./codec.ts").Codec<number, number>];
1240
+ }>;
1241
+ export declare const LocksRenew: import("./codec.ts").Message<{
1242
+ readonly lease: readonly [1, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
1243
+ /** how long the lease lasts from now */
1244
+ readonly ttl: readonly [2, import("./codec.ts").Codec<number, number>];
1245
+ }>;
1246
+ export declare const LocksLease: import("./codec.ts").Message<{
1247
+ readonly lease: readonly [1, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
1248
+ }>;
1249
+ /**
1250
+ * What a label's value must be: one of values, none of them with not, the
1251
+ * label absent too, or a value that starts with prefix.
1252
+ */
1253
+ export declare const MetricsCondition: import("./codec.ts").Message<{
1254
+ readonly values: readonly [1, import("./codec.ts").Codec<string[], readonly string[]>];
1255
+ readonly not: readonly [2, import("./codec.ts").Codec<boolean, boolean>];
1256
+ readonly prefix: readonly [3, import("./codec.ts").Codec<string, string>];
1257
+ }>;
1258
+ /**
1259
+ * The series a call finds, and its range: since before now, or from and to.
1260
+ */
1261
+ export declare const MetricsQuery: import("./codec.ts").Message<{
1262
+ readonly name: readonly [1, import("./codec.ts").Codec<string, string>];
1263
+ readonly where: readonly [2, import("./codec.ts").Codec<Record<string, Read<{
1264
+ readonly values: readonly [1, import("./codec.ts").Codec<string[], readonly string[]>];
1265
+ readonly not: readonly [2, import("./codec.ts").Codec<boolean, boolean>];
1266
+ readonly prefix: readonly [3, import("./codec.ts").Codec<string, string>];
1267
+ }>>, Record<string, import("./codec.ts").Written<{
1268
+ readonly values: readonly [1, import("./codec.ts").Codec<string[], readonly string[]>];
1269
+ readonly not: readonly [2, import("./codec.ts").Codec<boolean, boolean>];
1270
+ readonly prefix: readonly [3, import("./codec.ts").Codec<string, string>];
1271
+ }>>>];
1272
+ readonly since: readonly [3, import("./codec.ts").Codec<number, number>];
1273
+ readonly from: readonly [4, import("./codec.ts").Codec<number, number>];
1274
+ /** excluded; now, a sample taken now in the range, unless given */
1275
+ readonly to: readonly [5, import("./codec.ts").Codec<number, number>];
1276
+ }>;
1277
+ /**
1278
+ * A series and its samples, or a part of them: a series longer than a body
1279
+ * goes on in the next part.
1280
+ */
1281
+ export declare const MetricsSeries: import("./codec.ts").Message<{
1282
+ readonly name: readonly [1, import("./codec.ts").Codec<string, string>];
1283
+ /** gauge, counter or histogram */
1284
+ readonly kind: readonly [2, import("./codec.ts").Codec<string, string>];
1285
+ readonly labels: readonly [3, import("./codec.ts").Codec<Record<string, string>, Record<string, string>>];
1286
+ /** an int64 a sample */
1287
+ readonly times: readonly [4, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
1288
+ /** a float64 a sample */
1289
+ readonly values: readonly [5, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
1290
+ /** the next part goes on with this series */
1291
+ readonly more: readonly [6, import("./codec.ts").Codec<boolean, boolean>];
1292
+ }>;
1293
+ export declare const MetricsRead: import("./codec.ts").Message<{
1294
+ readonly series: readonly [1, import("./codec.ts").Codec<Read<{
1295
+ readonly name: readonly [1, import("./codec.ts").Codec<string, string>];
1296
+ /** gauge, counter or histogram */
1297
+ readonly kind: readonly [2, import("./codec.ts").Codec<string, string>];
1298
+ readonly labels: readonly [3, import("./codec.ts").Codec<Record<string, string>, Record<string, string>>];
1299
+ /** an int64 a sample */
1300
+ readonly times: readonly [4, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
1301
+ /** a float64 a sample */
1302
+ readonly values: readonly [5, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
1303
+ /** the next part goes on with this series */
1304
+ readonly more: readonly [6, import("./codec.ts").Codec<boolean, boolean>];
1305
+ }>[], readonly import("./codec.ts").Written<{
1306
+ readonly name: readonly [1, import("./codec.ts").Codec<string, string>];
1307
+ /** gauge, counter or histogram */
1308
+ readonly kind: readonly [2, import("./codec.ts").Codec<string, string>];
1309
+ readonly labels: readonly [3, import("./codec.ts").Codec<Record<string, string>, Record<string, string>>];
1310
+ /** an int64 a sample */
1311
+ readonly times: readonly [4, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
1312
+ /** a float64 a sample */
1313
+ readonly values: readonly [5, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
1314
+ /** the next part goes on with this series */
1315
+ readonly more: readonly [6, import("./codec.ts").Codec<boolean, boolean>];
1316
+ }>[]>];
1317
+ }>;
1318
+ /**
1319
+ * A series' newest sample in the range.
1320
+ */
1321
+ export declare const MetricsNewest: import("./codec.ts").Message<{
1322
+ readonly name: readonly [1, import("./codec.ts").Codec<string, string>];
1323
+ readonly labels: readonly [2, import("./codec.ts").Codec<Record<string, string>, Record<string, string>>];
1324
+ readonly at: readonly [3, import("./codec.ts").Codec<number, number>];
1325
+ readonly value: readonly [4, import("./codec.ts").Codec<number, number>];
1326
+ }>;
1327
+ export declare const MetricsLatest: import("./codec.ts").Message<{
1328
+ readonly series: readonly [1, import("./codec.ts").Codec<Read<{
1329
+ readonly name: readonly [1, import("./codec.ts").Codec<string, string>];
1330
+ readonly labels: readonly [2, import("./codec.ts").Codec<Record<string, string>, Record<string, string>>];
1331
+ readonly at: readonly [3, import("./codec.ts").Codec<number, number>];
1332
+ readonly value: readonly [4, import("./codec.ts").Codec<number, number>];
1333
+ }>[], readonly import("./codec.ts").Written<{
1334
+ readonly name: readonly [1, import("./codec.ts").Codec<string, string>];
1335
+ readonly labels: readonly [2, import("./codec.ts").Codec<Record<string, string>, Record<string, string>>];
1336
+ readonly at: readonly [3, import("./codec.ts").Codec<number, number>];
1337
+ readonly value: readonly [4, import("./codec.ts").Codec<number, number>];
1338
+ }>[]>];
1339
+ }>;
1340
+ /**
1341
+ * An aggregate: read's query, its buckets, its op and its groups. Without
1342
+ * by and without, every series of a name is one group; without: [] keeps
1343
+ * every series apart.
1344
+ */
1345
+ export declare const MetricsAggregateAsked: import("./codec.ts").Message<{
1346
+ readonly query: readonly [1, import("./codec.ts").Message<{
1347
+ readonly name: readonly [1, import("./codec.ts").Codec<string, string>];
1348
+ readonly where: readonly [2, import("./codec.ts").Codec<Record<string, Read<{
1349
+ readonly values: readonly [1, import("./codec.ts").Codec<string[], readonly string[]>];
1350
+ readonly not: readonly [2, import("./codec.ts").Codec<boolean, boolean>];
1351
+ readonly prefix: readonly [3, import("./codec.ts").Codec<string, string>];
1352
+ }>>, Record<string, import("./codec.ts").Written<{
1353
+ readonly values: readonly [1, import("./codec.ts").Codec<string[], readonly string[]>];
1354
+ readonly not: readonly [2, import("./codec.ts").Codec<boolean, boolean>];
1355
+ readonly prefix: readonly [3, import("./codec.ts").Codec<string, string>];
1356
+ }>>>];
1357
+ readonly since: readonly [3, import("./codec.ts").Codec<number, number>];
1358
+ readonly from: readonly [4, import("./codec.ts").Codec<number, number>];
1359
+ /** excluded; now, a sample taken now in the range, unless given */
1360
+ readonly to: readonly [5, import("./codec.ts").Codec<number, number>];
1361
+ }>];
1362
+ readonly every: readonly [2, import("./codec.ts").Codec<number, number>];
1363
+ /** count, sum, avg, min, max, increase, rate, delta, first, last, or p and a rank; none for a read's plan */
1364
+ readonly op: readonly [3, import("./codec.ts").Codec<string, string>];
1365
+ readonly by: readonly [4, import("./codec.ts").Codec<string[], readonly string[]>];
1366
+ readonly without: readonly [5, import("./codec.ts").Codec<string[], readonly string[]>];
1367
+ /** a timer's percentile also gives a point between its bounds */
1368
+ readonly estimate: readonly [6, import("./codec.ts").Codec<boolean, boolean>];
1369
+ }>;
1370
+ /**
1371
+ * A bucket of an aggregate: its value, or a timer's percentile's bounds.
1372
+ */
1373
+ export declare const MetricsBucket: import("./codec.ts").Message<{
1374
+ /** where it begins */
1375
+ readonly at: readonly [1, import("./codec.ts").Codec<number, number>];
1376
+ /** none for a timer's percentile */
1377
+ readonly value: readonly [2, import("./codec.ts").Codec<number, number>];
1378
+ readonly lower: readonly [3, import("./codec.ts").Codec<number, number>];
1379
+ /** infinity past the last bound */
1380
+ readonly upper: readonly [4, import("./codec.ts").Codec<number, number>];
1381
+ readonly estimate: readonly [5, import("./codec.ts").Codec<number, number>];
1382
+ readonly samples: readonly [6, import("./codec.ts").Codec<number, number>];
1383
+ readonly resets: readonly [7, import("./codec.ts").Codec<number, number>];
1384
+ /** its value comes from less than its span */
1385
+ readonly partial: readonly [8, import("./codec.ts").Codec<boolean, boolean>];
1386
+ /** its first step began before the bucket before it */
1387
+ readonly gap: readonly [9, import("./codec.ts").Codec<boolean, boolean>];
1388
+ }>;
1389
+ /**
1390
+ * A group's buckets, or a part of them: a group longer than a body goes on
1391
+ * in the next part.
1392
+ */
1393
+ export declare const MetricsGroup: import("./codec.ts").Message<{
1394
+ readonly name: readonly [1, import("./codec.ts").Codec<string, string>];
1395
+ readonly labels: readonly [2, import("./codec.ts").Codec<Record<string, string>, Record<string, string>>];
1396
+ readonly buckets: readonly [3, import("./codec.ts").Codec<Read<{
1397
+ /** where it begins */
1398
+ readonly at: readonly [1, import("./codec.ts").Codec<number, number>];
1399
+ /** none for a timer's percentile */
1400
+ readonly value: readonly [2, import("./codec.ts").Codec<number, number>];
1401
+ readonly lower: readonly [3, import("./codec.ts").Codec<number, number>];
1402
+ /** infinity past the last bound */
1403
+ readonly upper: readonly [4, import("./codec.ts").Codec<number, number>];
1404
+ readonly estimate: readonly [5, import("./codec.ts").Codec<number, number>];
1405
+ readonly samples: readonly [6, import("./codec.ts").Codec<number, number>];
1406
+ readonly resets: readonly [7, import("./codec.ts").Codec<number, number>];
1407
+ /** its value comes from less than its span */
1408
+ readonly partial: readonly [8, import("./codec.ts").Codec<boolean, boolean>];
1409
+ /** its first step began before the bucket before it */
1410
+ readonly gap: readonly [9, import("./codec.ts").Codec<boolean, boolean>];
1411
+ }>[], readonly import("./codec.ts").Written<{
1412
+ /** where it begins */
1413
+ readonly at: readonly [1, import("./codec.ts").Codec<number, number>];
1414
+ /** none for a timer's percentile */
1415
+ readonly value: readonly [2, import("./codec.ts").Codec<number, number>];
1416
+ readonly lower: readonly [3, import("./codec.ts").Codec<number, number>];
1417
+ /** infinity past the last bound */
1418
+ readonly upper: readonly [4, import("./codec.ts").Codec<number, number>];
1419
+ readonly estimate: readonly [5, import("./codec.ts").Codec<number, number>];
1420
+ readonly samples: readonly [6, import("./codec.ts").Codec<number, number>];
1421
+ readonly resets: readonly [7, import("./codec.ts").Codec<number, number>];
1422
+ /** its value comes from less than its span */
1423
+ readonly partial: readonly [8, import("./codec.ts").Codec<boolean, boolean>];
1424
+ /** its first step began before the bucket before it */
1425
+ readonly gap: readonly [9, import("./codec.ts").Codec<boolean, boolean>];
1426
+ }>[]>];
1427
+ readonly more: readonly [4, import("./codec.ts").Codec<boolean, boolean>];
1428
+ }>;
1429
+ export declare const MetricsAggregates: import("./codec.ts").Message<{
1430
+ readonly groups: readonly [1, import("./codec.ts").Codec<Read<{
1431
+ readonly name: readonly [1, import("./codec.ts").Codec<string, string>];
1432
+ readonly labels: readonly [2, import("./codec.ts").Codec<Record<string, string>, Record<string, string>>];
1433
+ readonly buckets: readonly [3, import("./codec.ts").Codec<Read<{
1434
+ /** where it begins */
1435
+ readonly at: readonly [1, import("./codec.ts").Codec<number, number>];
1436
+ /** none for a timer's percentile */
1437
+ readonly value: readonly [2, import("./codec.ts").Codec<number, number>];
1438
+ readonly lower: readonly [3, import("./codec.ts").Codec<number, number>];
1439
+ /** infinity past the last bound */
1440
+ readonly upper: readonly [4, import("./codec.ts").Codec<number, number>];
1441
+ readonly estimate: readonly [5, import("./codec.ts").Codec<number, number>];
1442
+ readonly samples: readonly [6, import("./codec.ts").Codec<number, number>];
1443
+ readonly resets: readonly [7, import("./codec.ts").Codec<number, number>];
1444
+ /** its value comes from less than its span */
1445
+ readonly partial: readonly [8, import("./codec.ts").Codec<boolean, boolean>];
1446
+ /** its first step began before the bucket before it */
1447
+ readonly gap: readonly [9, import("./codec.ts").Codec<boolean, boolean>];
1448
+ }>[], readonly import("./codec.ts").Written<{
1449
+ /** where it begins */
1450
+ readonly at: readonly [1, import("./codec.ts").Codec<number, number>];
1451
+ /** none for a timer's percentile */
1452
+ readonly value: readonly [2, import("./codec.ts").Codec<number, number>];
1453
+ readonly lower: readonly [3, import("./codec.ts").Codec<number, number>];
1454
+ /** infinity past the last bound */
1455
+ readonly upper: readonly [4, import("./codec.ts").Codec<number, number>];
1456
+ readonly estimate: readonly [5, import("./codec.ts").Codec<number, number>];
1457
+ readonly samples: readonly [6, import("./codec.ts").Codec<number, number>];
1458
+ readonly resets: readonly [7, import("./codec.ts").Codec<number, number>];
1459
+ /** its value comes from less than its span */
1460
+ readonly partial: readonly [8, import("./codec.ts").Codec<boolean, boolean>];
1461
+ /** its first step began before the bucket before it */
1462
+ readonly gap: readonly [9, import("./codec.ts").Codec<boolean, boolean>];
1463
+ }>[]>];
1464
+ readonly more: readonly [4, import("./codec.ts").Codec<boolean, boolean>];
1465
+ }>[], readonly import("./codec.ts").Written<{
1466
+ readonly name: readonly [1, import("./codec.ts").Codec<string, string>];
1467
+ readonly labels: readonly [2, import("./codec.ts").Codec<Record<string, string>, Record<string, string>>];
1468
+ readonly buckets: readonly [3, import("./codec.ts").Codec<Read<{
1469
+ /** where it begins */
1470
+ readonly at: readonly [1, import("./codec.ts").Codec<number, number>];
1471
+ /** none for a timer's percentile */
1472
+ readonly value: readonly [2, import("./codec.ts").Codec<number, number>];
1473
+ readonly lower: readonly [3, import("./codec.ts").Codec<number, number>];
1474
+ /** infinity past the last bound */
1475
+ readonly upper: readonly [4, import("./codec.ts").Codec<number, number>];
1476
+ readonly estimate: readonly [5, import("./codec.ts").Codec<number, number>];
1477
+ readonly samples: readonly [6, import("./codec.ts").Codec<number, number>];
1478
+ readonly resets: readonly [7, import("./codec.ts").Codec<number, number>];
1479
+ /** its value comes from less than its span */
1480
+ readonly partial: readonly [8, import("./codec.ts").Codec<boolean, boolean>];
1481
+ /** its first step began before the bucket before it */
1482
+ readonly gap: readonly [9, import("./codec.ts").Codec<boolean, boolean>];
1483
+ }>[], readonly import("./codec.ts").Written<{
1484
+ /** where it begins */
1485
+ readonly at: readonly [1, import("./codec.ts").Codec<number, number>];
1486
+ /** none for a timer's percentile */
1487
+ readonly value: readonly [2, import("./codec.ts").Codec<number, number>];
1488
+ readonly lower: readonly [3, import("./codec.ts").Codec<number, number>];
1489
+ /** infinity past the last bound */
1490
+ readonly upper: readonly [4, import("./codec.ts").Codec<number, number>];
1491
+ readonly estimate: readonly [5, import("./codec.ts").Codec<number, number>];
1492
+ readonly samples: readonly [6, import("./codec.ts").Codec<number, number>];
1493
+ readonly resets: readonly [7, import("./codec.ts").Codec<number, number>];
1494
+ /** its value comes from less than its span */
1495
+ readonly partial: readonly [8, import("./codec.ts").Codec<boolean, boolean>];
1496
+ /** its first step began before the bucket before it */
1497
+ readonly gap: readonly [9, import("./codec.ts").Codec<boolean, boolean>];
1498
+ }>[]>];
1499
+ readonly more: readonly [4, import("./codec.ts").Codec<boolean, boolean>];
1500
+ }>[]>];
1501
+ }>;
1502
+ export declare const MetricsExceeds: import("./codec.ts").Message<{
1503
+ /** series, bytes read or samples decoded */
1504
+ readonly limit: readonly [1, import("./codec.ts").Codec<string, string>];
1505
+ readonly wanted: readonly [2, import("./codec.ts").Codec<number, number>];
1506
+ readonly bound: readonly [3, import("./codec.ts").Codec<number, number>];
1507
+ }>;
1508
+ /**
1509
+ * A series to write, its samples as two columns.
1510
+ */
1511
+ export declare const MetricsNewSeries: import("./codec.ts").Message<{
1512
+ readonly name: readonly [1, import("./codec.ts").Codec<string, string>];
1513
+ /** gauge, counter or histogram */
1514
+ readonly kind: readonly [2, import("./codec.ts").Codec<string, string>];
1515
+ readonly labels: readonly [3, import("./codec.ts").Codec<Record<string, string>, Record<string, string>>];
1516
+ /** an int64 a sample */
1517
+ readonly times: readonly [4, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
1518
+ /** a float64 a sample */
1519
+ readonly values: readonly [5, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
1520
+ /** how long the name's samples stay: its own, kept in the file */
1521
+ readonly keep: readonly [6, import("./codec.ts").Codec<number, number>];
1522
+ }>;
1523
+ /**
1524
+ * Series to write, every one or none.
1525
+ */
1526
+ export declare const MetricsIngest: import("./codec.ts").Message<{
1527
+ readonly series: readonly [1, import("./codec.ts").Codec<Read<{
1528
+ readonly name: readonly [1, import("./codec.ts").Codec<string, string>];
1529
+ /** gauge, counter or histogram */
1530
+ readonly kind: readonly [2, import("./codec.ts").Codec<string, string>];
1531
+ readonly labels: readonly [3, import("./codec.ts").Codec<Record<string, string>, Record<string, string>>];
1532
+ /** an int64 a sample */
1533
+ readonly times: readonly [4, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
1534
+ /** a float64 a sample */
1535
+ readonly values: readonly [5, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
1536
+ /** how long the name's samples stay: its own, kept in the file */
1537
+ readonly keep: readonly [6, import("./codec.ts").Codec<number, number>];
1538
+ }>[], readonly import("./codec.ts").Written<{
1539
+ readonly name: readonly [1, import("./codec.ts").Codec<string, string>];
1540
+ /** gauge, counter or histogram */
1541
+ readonly kind: readonly [2, import("./codec.ts").Codec<string, string>];
1542
+ readonly labels: readonly [3, import("./codec.ts").Codec<Record<string, string>, Record<string, string>>];
1543
+ /** an int64 a sample */
1544
+ readonly times: readonly [4, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
1545
+ /** a float64 a sample */
1546
+ readonly values: readonly [5, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
1547
+ /** how long the name's samples stay: its own, kept in the file */
1548
+ readonly keep: readonly [6, import("./codec.ts").Codec<number, number>];
1549
+ }>[]>];
1550
+ }>;
1551
+ /**
1552
+ * A page of names, of a name's labels or of a label's values.
1553
+ */
1554
+ export declare const MetricsPageAsked: import("./codec.ts").Message<{
1555
+ /** the name whose labels, or whose label's values, it lists */
1556
+ readonly name: readonly [1, import("./codec.ts").Codec<string, string>];
1557
+ /** the label whose values it lists */
1558
+ readonly label: readonly [2, import("./codec.ts").Codec<string, string>];
1559
+ readonly prefix: readonly [3, import("./codec.ts").Codec<string, string>];
1560
+ /** a page's next */
1561
+ readonly after: readonly [4, import("./codec.ts").Codec<string, string>];
1562
+ /** 1000 unless given, 10,000 at most */
1563
+ readonly limit: readonly [5, import("./codec.ts").Codec<number, number>];
1564
+ }>;
1565
+ /**
1566
+ * A name the store holds samples of.
1567
+ */
1568
+ export declare const MetricsName: import("./codec.ts").Message<{
1569
+ readonly name: readonly [1, import("./codec.ts").Codec<string, string>];
1570
+ readonly kind: readonly [2, import("./codec.ts").Codec<string, string>];
1571
+ readonly seriesCount: readonly [3, import("./codec.ts").Codec<number, number>];
1572
+ readonly unit: readonly [4, import("./codec.ts").Codec<string, string>];
1573
+ readonly help: readonly [5, import("./codec.ts").Codec<string, string>];
1574
+ readonly keep: readonly [6, import("./codec.ts").Codec<number, number>];
1575
+ /** its oldest sample, or where its keep begins while it holds older */
1576
+ readonly retainedFrom: readonly [7, import("./codec.ts").Codec<number, number>];
1577
+ readonly newest: readonly [8, import("./codec.ts").Codec<number, number>];
1578
+ }>;
1579
+ export declare const MetricsNamePage: import("./codec.ts").Message<{
1580
+ readonly names: readonly [1, import("./codec.ts").Codec<Read<{
1581
+ readonly name: readonly [1, import("./codec.ts").Codec<string, string>];
1582
+ readonly kind: readonly [2, import("./codec.ts").Codec<string, string>];
1583
+ readonly seriesCount: readonly [3, import("./codec.ts").Codec<number, number>];
1584
+ readonly unit: readonly [4, import("./codec.ts").Codec<string, string>];
1585
+ readonly help: readonly [5, import("./codec.ts").Codec<string, string>];
1586
+ readonly keep: readonly [6, import("./codec.ts").Codec<number, number>];
1587
+ /** its oldest sample, or where its keep begins while it holds older */
1588
+ readonly retainedFrom: readonly [7, import("./codec.ts").Codec<number, number>];
1589
+ readonly newest: readonly [8, import("./codec.ts").Codec<number, number>];
1590
+ }>[], readonly import("./codec.ts").Written<{
1591
+ readonly name: readonly [1, import("./codec.ts").Codec<string, string>];
1592
+ readonly kind: readonly [2, import("./codec.ts").Codec<string, string>];
1593
+ readonly seriesCount: readonly [3, import("./codec.ts").Codec<number, number>];
1594
+ readonly unit: readonly [4, import("./codec.ts").Codec<string, string>];
1595
+ readonly help: readonly [5, import("./codec.ts").Codec<string, string>];
1596
+ readonly keep: readonly [6, import("./codec.ts").Codec<number, number>];
1597
+ /** its oldest sample, or where its keep begins while it holds older */
1598
+ readonly retainedFrom: readonly [7, import("./codec.ts").Codec<number, number>];
1599
+ readonly newest: readonly [8, import("./codec.ts").Codec<number, number>];
1600
+ }>[]>];
1601
+ /** the page after it; the last page has none */
1602
+ readonly next: readonly [2, import("./codec.ts").Codec<string, string>];
1603
+ }>;
1604
+ /**
1605
+ * A page of a name's labels, or of a label's values.
1606
+ */
1607
+ export declare const MetricsTextPage: import("./codec.ts").Message<{
1608
+ readonly texts: readonly [1, import("./codec.ts").Codec<string[], readonly string[]>];
1609
+ readonly next: readonly [2, import("./codec.ts").Codec<string, string>];
1610
+ }>;
1611
+ /**
1612
+ * A name's unit and help; empty ones remove them.
1613
+ */
1614
+ export declare const MetricsDescription: import("./codec.ts").Message<{
1615
+ readonly name: readonly [1, import("./codec.ts").Codec<string, string>];
1616
+ readonly unit: readonly [2, import("./codec.ts").Codec<string, string>];
1617
+ readonly help: readonly [3, import("./codec.ts").Codec<string, string>];
1618
+ }>;
1619
+ export declare const MetricsNameAsked: import("./codec.ts").Message<{
1620
+ readonly name: readonly [1, import("./codec.ts").Codec<string, string>];
1621
+ }>;
1622
+ /**
1623
+ * One series, by exactly its name and labels.
1624
+ */
1625
+ export declare const MetricsSeriesNamed: import("./codec.ts").Message<{
1626
+ readonly name: readonly [1, import("./codec.ts").Codec<string, string>];
1627
+ readonly labels: readonly [2, import("./codec.ts").Codec<Record<string, string>, Record<string, string>>];
1628
+ }>;
1629
+ export declare const MetricsDeleted: import("./codec.ts").Message<{
1630
+ readonly found: readonly [1, import("./codec.ts").Codec<boolean, boolean>];
1631
+ }>;
1632
+ /**
1633
+ * A series whose bytes no longer read, and what broke.
1634
+ */
1635
+ export declare const MetricsDamage: import("./codec.ts").Message<{
1636
+ readonly name: readonly [1, import("./codec.ts").Codec<string, string>];
1637
+ readonly labels: readonly [2, import("./codec.ts").Codec<Record<string, string>, Record<string, string>>];
1638
+ readonly error: readonly [3, import("./codec.ts").Codec<string, string>];
1639
+ }>;
1640
+ export declare const MetricsDamages: import("./codec.ts").Message<{
1641
+ readonly damages: readonly [1, import("./codec.ts").Codec<Read<{
1642
+ readonly name: readonly [1, import("./codec.ts").Codec<string, string>];
1643
+ readonly labels: readonly [2, import("./codec.ts").Codec<Record<string, string>, Record<string, string>>];
1644
+ readonly error: readonly [3, import("./codec.ts").Codec<string, string>];
1645
+ }>[], readonly import("./codec.ts").Written<{
1646
+ readonly name: readonly [1, import("./codec.ts").Codec<string, string>];
1647
+ readonly labels: readonly [2, import("./codec.ts").Codec<Record<string, string>, Record<string, string>>];
1648
+ readonly error: readonly [3, import("./codec.ts").Codec<string, string>];
1649
+ }>[]>];
1650
+ }>;
1651
+ /**
1652
+ * An SDK's instruments' stream: its session, sixteen random bytes drawn when
1653
+ * it opened the store, and the last batch the store answered it, 0 for none.
1654
+ */
1655
+ export declare const MetricsSession: import("./codec.ts").Message<{
1656
+ readonly id: readonly [1, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
1657
+ readonly after: readonly [2, import("./codec.ts").Codec<number, number>];
1658
+ }>;
1659
+ /**
1660
+ * An instrument a batch counts into, by a number the stream gives it.
1661
+ */
1662
+ export declare const MetricsInstrument: import("./codec.ts").Message<{
1663
+ readonly number: readonly [1, import("./codec.ts").Codec<number, number>];
1664
+ readonly name: readonly [2, import("./codec.ts").Codec<string, string>];
1665
+ /** counter, gauge, timer or histogram */
1666
+ readonly form: readonly [3, import("./codec.ts").Codec<string, string>];
1667
+ readonly unit: readonly [4, import("./codec.ts").Codec<string, string>];
1668
+ readonly help: readonly [5, import("./codec.ts").Codec<string, string>];
1669
+ readonly keep: readonly [6, import("./codec.ts").Codec<number, number>];
1670
+ /** a timer's or a histogram's upper bounds, ascending */
1671
+ readonly bounds: readonly [7, import("./codec.ts").Codec<number[], readonly number[]>];
1672
+ /** a timer's spread on the store's grid */
1673
+ readonly exponential: readonly [8, import("./codec.ts").Codec<boolean, boolean>];
1674
+ }>;
1675
+ /**
1676
+ * A set of labels of an instrument, by a number the stream gives it, or its
1677
+ * series of __overflow, where a client counts past the sets it holds.
1678
+ */
1679
+ export declare const MetricsSet: import("./codec.ts").Message<{
1680
+ readonly number: readonly [1, import("./codec.ts").Codec<number, number>];
1681
+ readonly instrument: readonly [2, import("./codec.ts").Codec<number, number>];
1682
+ readonly labels: readonly [3, import("./codec.ts").Codec<Record<string, string>, Record<string, string>>];
1683
+ readonly overflow: readonly [4, import("./codec.ts").Codec<boolean, boolean>];
1684
+ }>;
1685
+ /**
1686
+ * What a set of labels changed since the batch before: a counter's sum to
1687
+ * add, a gauge's value, or what a timer or a histogram measured.
1688
+ */
1689
+ export declare const MetricsChange: import("./codec.ts").Message<{
1690
+ readonly set: readonly [1, import("./codec.ts").Codec<number, number>];
1691
+ readonly add: readonly [2, import("./codec.ts").Codec<number, number>];
1692
+ readonly value: readonly [3, import("./codec.ts").Codec<number, number>];
1693
+ readonly count: readonly [4, import("./codec.ts").Codec<number, number>];
1694
+ readonly sum: readonly [5, import("./codec.ts").Codec<number, number>];
1695
+ readonly longest: readonly [6, import("./codec.ts").Codec<number, number>];
1696
+ /** each bound's own count, +Inf last */
1697
+ readonly buckets: readonly [7, import("./codec.ts").Codec<number[], readonly number[]>];
1698
+ /** each interval of the grid's count, by its label: 3:13, zero */
1699
+ readonly bins: readonly [8, import("./codec.ts").Codec<Record<string, number>, Record<string, number>>];
1700
+ }>;
1701
+ /**
1702
+ * A batch of an SDK's changes, numbered from 1 in its session, with the
1703
+ * instruments and the sets of labels it names that the stream has not
1704
+ * declared yet.
1705
+ */
1706
+ export declare const MetricsBatch: import("./codec.ts").Message<{
1707
+ readonly number: readonly [1, import("./codec.ts").Codec<number, number>];
1708
+ readonly instruments: readonly [2, import("./codec.ts").Codec<Read<{
1709
+ readonly number: readonly [1, import("./codec.ts").Codec<number, number>];
1710
+ readonly name: readonly [2, import("./codec.ts").Codec<string, string>];
1711
+ /** counter, gauge, timer or histogram */
1712
+ readonly form: readonly [3, import("./codec.ts").Codec<string, string>];
1713
+ readonly unit: readonly [4, import("./codec.ts").Codec<string, string>];
1714
+ readonly help: readonly [5, import("./codec.ts").Codec<string, string>];
1715
+ readonly keep: readonly [6, import("./codec.ts").Codec<number, number>];
1716
+ /** a timer's or a histogram's upper bounds, ascending */
1717
+ readonly bounds: readonly [7, import("./codec.ts").Codec<number[], readonly number[]>];
1718
+ /** a timer's spread on the store's grid */
1719
+ readonly exponential: readonly [8, import("./codec.ts").Codec<boolean, boolean>];
1720
+ }>[], readonly import("./codec.ts").Written<{
1721
+ readonly number: readonly [1, import("./codec.ts").Codec<number, number>];
1722
+ readonly name: readonly [2, import("./codec.ts").Codec<string, string>];
1723
+ /** counter, gauge, timer or histogram */
1724
+ readonly form: readonly [3, import("./codec.ts").Codec<string, string>];
1725
+ readonly unit: readonly [4, import("./codec.ts").Codec<string, string>];
1726
+ readonly help: readonly [5, import("./codec.ts").Codec<string, string>];
1727
+ readonly keep: readonly [6, import("./codec.ts").Codec<number, number>];
1728
+ /** a timer's or a histogram's upper bounds, ascending */
1729
+ readonly bounds: readonly [7, import("./codec.ts").Codec<number[], readonly number[]>];
1730
+ /** a timer's spread on the store's grid */
1731
+ readonly exponential: readonly [8, import("./codec.ts").Codec<boolean, boolean>];
1732
+ }>[]>];
1733
+ readonly sets: readonly [3, import("./codec.ts").Codec<Read<{
1734
+ readonly number: readonly [1, import("./codec.ts").Codec<number, number>];
1735
+ readonly instrument: readonly [2, import("./codec.ts").Codec<number, number>];
1736
+ readonly labels: readonly [3, import("./codec.ts").Codec<Record<string, string>, Record<string, string>>];
1737
+ readonly overflow: readonly [4, import("./codec.ts").Codec<boolean, boolean>];
1738
+ }>[], readonly import("./codec.ts").Written<{
1739
+ readonly number: readonly [1, import("./codec.ts").Codec<number, number>];
1740
+ readonly instrument: readonly [2, import("./codec.ts").Codec<number, number>];
1741
+ readonly labels: readonly [3, import("./codec.ts").Codec<Record<string, string>, Record<string, string>>];
1742
+ readonly overflow: readonly [4, import("./codec.ts").Codec<boolean, boolean>];
1743
+ }>[]>];
1744
+ readonly changes: readonly [4, import("./codec.ts").Codec<Read<{
1745
+ readonly set: readonly [1, import("./codec.ts").Codec<number, number>];
1746
+ readonly add: readonly [2, import("./codec.ts").Codec<number, number>];
1747
+ readonly value: readonly [3, import("./codec.ts").Codec<number, number>];
1748
+ readonly count: readonly [4, import("./codec.ts").Codec<number, number>];
1749
+ readonly sum: readonly [5, import("./codec.ts").Codec<number, number>];
1750
+ readonly longest: readonly [6, import("./codec.ts").Codec<number, number>];
1751
+ /** each bound's own count, +Inf last */
1752
+ readonly buckets: readonly [7, import("./codec.ts").Codec<number[], readonly number[]>];
1753
+ /** each interval of the grid's count, by its label: 3:13, zero */
1754
+ readonly bins: readonly [8, import("./codec.ts").Codec<Record<string, number>, Record<string, number>>];
1755
+ }>[], readonly import("./codec.ts").Written<{
1756
+ readonly set: readonly [1, import("./codec.ts").Codec<number, number>];
1757
+ readonly add: readonly [2, import("./codec.ts").Codec<number, number>];
1758
+ readonly value: readonly [3, import("./codec.ts").Codec<number, number>];
1759
+ readonly count: readonly [4, import("./codec.ts").Codec<number, number>];
1760
+ readonly sum: readonly [5, import("./codec.ts").Codec<number, number>];
1761
+ readonly longest: readonly [6, import("./codec.ts").Codec<number, number>];
1762
+ /** each bound's own count, +Inf last */
1763
+ readonly buckets: readonly [7, import("./codec.ts").Codec<number[], readonly number[]>];
1764
+ /** each interval of the grid's count, by its label: 3:13, zero */
1765
+ readonly bins: readonly [8, import("./codec.ts").Codec<Record<string, number>, Record<string, number>>];
1766
+ }>[]>];
1767
+ /** the store writes its totals before it answers */
1768
+ readonly flush: readonly [5, import("./codec.ts").Codec<boolean, boolean>];
1769
+ }>;
1770
+ /**
1771
+ * An instrument the store refused, by the stream's number for it.
1772
+ */
1773
+ export declare const MetricsRefused: import("./codec.ts").Message<{
1774
+ readonly instrument: readonly [1, import("./codec.ts").Codec<number, number>];
1775
+ readonly error: readonly [2, import("./codec.ts").Codec<string, string>];
1776
+ }>;
1777
+ /**
1778
+ * The store's answer: the last batch of the session it applied, and whether
1779
+ * it knew the session; the stream's RESPONSE says it first.
1780
+ */
1781
+ export declare const MetricsAck: import("./codec.ts").Message<{
1782
+ readonly applied: readonly [1, import("./codec.ts").Codec<number, number>];
1783
+ readonly known: readonly [2, import("./codec.ts").Codec<boolean, boolean>];
1784
+ readonly refused: readonly [3, import("./codec.ts").Codec<Read<{
1785
+ readonly instrument: readonly [1, import("./codec.ts").Codec<number, number>];
1786
+ readonly error: readonly [2, import("./codec.ts").Codec<string, string>];
1787
+ }>[], readonly import("./codec.ts").Written<{
1788
+ readonly instrument: readonly [1, import("./codec.ts").Codec<number, number>];
1789
+ readonly error: readonly [2, import("./codec.ts").Codec<string, string>];
1790
+ }>[]>];
1791
+ }>;
1792
+ /**
1793
+ * Opens a stream of events by name, made with its first event.
1794
+ */
1795
+ export declare const RecordsOpen: import("./codec.ts").Message<{
1796
+ /** [a-z0-9][a-z0-9_-]{0,63} */
1797
+ readonly stream: readonly [1, import("./codec.ts").Codec<string, string>];
1798
+ /** how long it keeps its events: its own, kept in the file */
1799
+ readonly keep: readonly [2, import("./codec.ts").Codec<number, number>];
1800
+ }>;
1801
+ /**
1802
+ * An event to write.
1803
+ */
1804
+ export declare const RecordsNewEvent: import("./codec.ts").Message<{
1805
+ readonly name: readonly [1, import("./codec.ts").Codec<string, string>];
1806
+ /** the store's clock's now unless given */
1807
+ readonly at: readonly [2, import("./codec.ts").Codec<bigint, number | bigint>];
1808
+ /** -4 debug, 0 info, 4 warn, 8 error, between them as slog counts */
1809
+ readonly level: readonly [3, import("./codec.ts").Codec<number, number>];
1810
+ readonly message: readonly [4, import("./codec.ts").Codec<string, string>];
1811
+ /** an object */
1812
+ readonly fields: readonly [5, import("./codec.ts").Codec<string, string>];
1813
+ /** an object */
1814
+ readonly context: readonly [6, import("./codec.ts").Codec<string, string>];
1815
+ /** 16 bytes */
1816
+ readonly traceId: readonly [7, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
1817
+ /** 8 bytes */
1818
+ readonly spanId: readonly [8, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
1819
+ }>;
1820
+ /**
1821
+ * Events to write to a stream, all of them or none.
1822
+ */
1823
+ export declare const RecordsAppend: import("./codec.ts").Message<{
1824
+ readonly handle: readonly [1, import("./codec.ts").Codec<number, number>];
1825
+ readonly events: readonly [2, import("./codec.ts").Codec<Read<{
1826
+ readonly name: readonly [1, import("./codec.ts").Codec<string, string>];
1827
+ /** the store's clock's now unless given */
1828
+ readonly at: readonly [2, import("./codec.ts").Codec<bigint, number | bigint>];
1829
+ /** -4 debug, 0 info, 4 warn, 8 error, between them as slog counts */
1830
+ readonly level: readonly [3, import("./codec.ts").Codec<number, number>];
1831
+ readonly message: readonly [4, import("./codec.ts").Codec<string, string>];
1832
+ /** an object */
1833
+ readonly fields: readonly [5, import("./codec.ts").Codec<string, string>];
1834
+ /** an object */
1835
+ readonly context: readonly [6, import("./codec.ts").Codec<string, string>];
1836
+ /** 16 bytes */
1837
+ readonly traceId: readonly [7, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
1838
+ /** 8 bytes */
1839
+ readonly spanId: readonly [8, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
1840
+ }>[], readonly import("./codec.ts").Written<{
1841
+ readonly name: readonly [1, import("./codec.ts").Codec<string, string>];
1842
+ /** the store's clock's now unless given */
1843
+ readonly at: readonly [2, import("./codec.ts").Codec<bigint, number | bigint>];
1844
+ /** -4 debug, 0 info, 4 warn, 8 error, between them as slog counts */
1845
+ readonly level: readonly [3, import("./codec.ts").Codec<number, number>];
1846
+ readonly message: readonly [4, import("./codec.ts").Codec<string, string>];
1847
+ /** an object */
1848
+ readonly fields: readonly [5, import("./codec.ts").Codec<string, string>];
1849
+ /** an object */
1850
+ readonly context: readonly [6, import("./codec.ts").Codec<string, string>];
1851
+ /** 16 bytes */
1852
+ readonly traceId: readonly [7, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
1853
+ /** 8 bytes */
1854
+ readonly spanId: readonly [8, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
1855
+ }>[]>];
1856
+ }>;
1857
+ /**
1858
+ * An event as a read gives it.
1859
+ */
1860
+ export declare const RecordsEvent: import("./codec.ts").Message<{
1861
+ readonly at: readonly [1, import("./codec.ts").Codec<bigint, number | bigint>];
1862
+ readonly stream: readonly [2, import("./codec.ts").Codec<string, string>];
1863
+ readonly name: readonly [3, import("./codec.ts").Codec<string, string>];
1864
+ readonly level: readonly [4, import("./codec.ts").Codec<number, number>];
1865
+ readonly message: readonly [5, import("./codec.ts").Codec<string, string>];
1866
+ /** an object; none when it has no field */
1867
+ readonly fields: readonly [6, import("./codec.ts").Codec<string, string>];
1868
+ readonly context: readonly [7, import("./codec.ts").Codec<string, string>];
1869
+ readonly traceId: readonly [8, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
1870
+ readonly spanId: readonly [9, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
1871
+ }>;
1872
+ /**
1873
+ * What a read finds: each condition given holds.
1874
+ */
1875
+ export declare const RecordsQuery: import("./codec.ts").Message<{
1876
+ /** the stream opened as it; every stream without one */
1877
+ readonly handle: readonly [1, import("./codec.ts").Codec<number, number>];
1878
+ /** the span before now; or from and to */
1879
+ readonly since: readonly [2, import("./codec.ts").Codec<number, number>];
1880
+ readonly from: readonly [3, import("./codec.ts").Codec<bigint, number | bigint>];
1881
+ readonly to: readonly [4, import("./codec.ts").Codec<bigint, number | bigint>];
1882
+ readonly streams: readonly [5, import("./codec.ts").Codec<string[], readonly string[]>];
1883
+ readonly names: readonly [6, import("./codec.ts").Codec<string[], readonly string[]>];
1884
+ readonly minLevel: readonly [7, import("./codec.ts").Codec<number, number>];
1885
+ readonly traceId: readonly [8, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
1886
+ /** each key with this value, in fields or in context */
1887
+ readonly where: readonly [9, import("./codec.ts").Codec<Record<string, string>, Record<string, string>>];
1888
+ readonly search: readonly [10, import("./codec.ts").Codec<string, string>];
1889
+ readonly newest: readonly [11, import("./codec.ts").Codec<boolean, boolean>];
1890
+ /** a page's events, top's values, fieldNames' keys */
1891
+ readonly limit: readonly [12, import("./codec.ts").Codec<number, number>];
1892
+ /** a page's next */
1893
+ readonly after: readonly [13, import("./codec.ts").Codec<string, string>];
1894
+ }>;
1895
+ export declare const RecordsPage: import("./codec.ts").Message<{
1896
+ readonly events: readonly [1, import("./codec.ts").Codec<Read<{
1897
+ readonly at: readonly [1, import("./codec.ts").Codec<bigint, number | bigint>];
1898
+ readonly stream: readonly [2, import("./codec.ts").Codec<string, string>];
1899
+ readonly name: readonly [3, import("./codec.ts").Codec<string, string>];
1900
+ readonly level: readonly [4, import("./codec.ts").Codec<number, number>];
1901
+ readonly message: readonly [5, import("./codec.ts").Codec<string, string>];
1902
+ /** an object; none when it has no field */
1903
+ readonly fields: readonly [6, import("./codec.ts").Codec<string, string>];
1904
+ readonly context: readonly [7, import("./codec.ts").Codec<string, string>];
1905
+ readonly traceId: readonly [8, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
1906
+ readonly spanId: readonly [9, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
1907
+ }>[], readonly import("./codec.ts").Written<{
1908
+ readonly at: readonly [1, import("./codec.ts").Codec<bigint, number | bigint>];
1909
+ readonly stream: readonly [2, import("./codec.ts").Codec<string, string>];
1910
+ readonly name: readonly [3, import("./codec.ts").Codec<string, string>];
1911
+ readonly level: readonly [4, import("./codec.ts").Codec<number, number>];
1912
+ readonly message: readonly [5, import("./codec.ts").Codec<string, string>];
1913
+ /** an object; none when it has no field */
1914
+ readonly fields: readonly [6, import("./codec.ts").Codec<string, string>];
1915
+ readonly context: readonly [7, import("./codec.ts").Codec<string, string>];
1916
+ readonly traceId: readonly [8, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
1917
+ readonly spanId: readonly [9, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
1918
+ }>[]>];
1919
+ /** the page after it; the last page has none */
1920
+ readonly next: readonly [2, import("./codec.ts").Codec<string, string>];
1921
+ }>;
1922
+ export declare const RecordsCount: import("./codec.ts").Message<{
1923
+ readonly count: readonly [1, import("./codec.ts").Codec<number, number>];
1924
+ }>;
1925
+ /**
1926
+ * A key's most frequent values among what a query finds.
1927
+ */
1928
+ export declare const RecordsTopAsked: import("./codec.ts").Message<{
1929
+ readonly query: readonly [1, import("./codec.ts").Message<{
1930
+ /** the stream opened as it; every stream without one */
1931
+ readonly handle: readonly [1, import("./codec.ts").Codec<number, number>];
1932
+ /** the span before now; or from and to */
1933
+ readonly since: readonly [2, import("./codec.ts").Codec<number, number>];
1934
+ readonly from: readonly [3, import("./codec.ts").Codec<bigint, number | bigint>];
1935
+ readonly to: readonly [4, import("./codec.ts").Codec<bigint, number | bigint>];
1936
+ readonly streams: readonly [5, import("./codec.ts").Codec<string[], readonly string[]>];
1937
+ readonly names: readonly [6, import("./codec.ts").Codec<string[], readonly string[]>];
1938
+ readonly minLevel: readonly [7, import("./codec.ts").Codec<number, number>];
1939
+ readonly traceId: readonly [8, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
1940
+ /** each key with this value, in fields or in context */
1941
+ readonly where: readonly [9, import("./codec.ts").Codec<Record<string, string>, Record<string, string>>];
1942
+ readonly search: readonly [10, import("./codec.ts").Codec<string, string>];
1943
+ readonly newest: readonly [11, import("./codec.ts").Codec<boolean, boolean>];
1944
+ /** a page's events, top's values, fieldNames' keys */
1945
+ readonly limit: readonly [12, import("./codec.ts").Codec<number, number>];
1946
+ /** a page's next */
1947
+ readonly after: readonly [13, import("./codec.ts").Codec<string, string>];
1948
+ }>];
1949
+ /** a field's or a context's, or stream, name or level */
1950
+ readonly key: readonly [2, import("./codec.ts").Codec<string, string>];
1951
+ }>;
1952
+ export declare const RecordsTop: import("./codec.ts").Message<{
1953
+ readonly value: readonly [1, import("./codec.ts").Codec<string, string>];
1954
+ readonly count: readonly [2, import("./codec.ts").Codec<number, number>];
1955
+ }>;
1956
+ export declare const RecordsTops: import("./codec.ts").Message<{
1957
+ readonly values: readonly [1, import("./codec.ts").Codec<Read<{
1958
+ readonly value: readonly [1, import("./codec.ts").Codec<string, string>];
1959
+ readonly count: readonly [2, import("./codec.ts").Codec<number, number>];
1960
+ }>[], readonly import("./codec.ts").Written<{
1961
+ readonly value: readonly [1, import("./codec.ts").Codec<string, string>];
1962
+ readonly count: readonly [2, import("./codec.ts").Codec<number, number>];
1963
+ }>[]>];
1964
+ }>;
1965
+ /**
1966
+ * A row for each span of every and each value of the keys of by.
1967
+ */
1968
+ export declare const RecordsAggregateAsked: import("./codec.ts").Message<{
1969
+ readonly query: readonly [1, import("./codec.ts").Message<{
1970
+ /** the stream opened as it; every stream without one */
1971
+ readonly handle: readonly [1, import("./codec.ts").Codec<number, number>];
1972
+ /** the span before now; or from and to */
1973
+ readonly since: readonly [2, import("./codec.ts").Codec<number, number>];
1974
+ readonly from: readonly [3, import("./codec.ts").Codec<bigint, number | bigint>];
1975
+ readonly to: readonly [4, import("./codec.ts").Codec<bigint, number | bigint>];
1976
+ readonly streams: readonly [5, import("./codec.ts").Codec<string[], readonly string[]>];
1977
+ readonly names: readonly [6, import("./codec.ts").Codec<string[], readonly string[]>];
1978
+ readonly minLevel: readonly [7, import("./codec.ts").Codec<number, number>];
1979
+ readonly traceId: readonly [8, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
1980
+ /** each key with this value, in fields or in context */
1981
+ readonly where: readonly [9, import("./codec.ts").Codec<Record<string, string>, Record<string, string>>];
1982
+ readonly search: readonly [10, import("./codec.ts").Codec<string, string>];
1983
+ readonly newest: readonly [11, import("./codec.ts").Codec<boolean, boolean>];
1984
+ /** a page's events, top's values, fieldNames' keys */
1985
+ readonly limit: readonly [12, import("./codec.ts").Codec<number, number>];
1986
+ /** a page's next */
1987
+ readonly after: readonly [13, import("./codec.ts").Codec<string, string>];
1988
+ }>];
1989
+ readonly every: readonly [2, import("./codec.ts").Codec<number, number>];
1990
+ readonly by: readonly [3, import("./codec.ts").Codec<string[], readonly string[]>];
1991
+ readonly stats: readonly [4, import("./codec.ts").Codec<string[], readonly string[]>];
1992
+ readonly distinct: readonly [5, import("./codec.ts").Codec<string[], readonly string[]>];
1993
+ }>;
1994
+ /**
1995
+ * A field's numbers in a row: a sum, a min and a max are JSON numbers, an
1996
+ * integer's exact.
1997
+ */
1998
+ export declare const RecordsStats: import("./codec.ts").Message<{
1999
+ readonly samples: readonly [1, import("./codec.ts").Codec<number, number>];
2000
+ readonly sum: readonly [2, import("./codec.ts").Codec<string, string>];
2001
+ readonly min: readonly [3, import("./codec.ts").Codec<string, string>];
2002
+ readonly max: readonly [4, import("./codec.ts").Codec<string, string>];
2003
+ readonly avg: readonly [5, import("./codec.ts").Codec<number, number>];
2004
+ }>;
2005
+ export declare const RecordsRow: import("./codec.ts").Message<{
2006
+ /** where the row's span begins, counted from 1970 */
2007
+ readonly at: readonly [1, import("./codec.ts").Codec<bigint, number | bigint>];
2008
+ readonly count: readonly [2, import("./codec.ts").Codec<number, number>];
2009
+ readonly by: readonly [3, import("./codec.ts").Codec<Record<string, string>, Record<string, string>>];
2010
+ readonly stats: readonly [4, import("./codec.ts").Codec<Record<string, Read<{
2011
+ readonly samples: readonly [1, import("./codec.ts").Codec<number, number>];
2012
+ readonly sum: readonly [2, import("./codec.ts").Codec<string, string>];
2013
+ readonly min: readonly [3, import("./codec.ts").Codec<string, string>];
2014
+ readonly max: readonly [4, import("./codec.ts").Codec<string, string>];
2015
+ readonly avg: readonly [5, import("./codec.ts").Codec<number, number>];
2016
+ }>>, Record<string, import("./codec.ts").Written<{
2017
+ readonly samples: readonly [1, import("./codec.ts").Codec<number, number>];
2018
+ readonly sum: readonly [2, import("./codec.ts").Codec<string, string>];
2019
+ readonly min: readonly [3, import("./codec.ts").Codec<string, string>];
2020
+ readonly max: readonly [4, import("./codec.ts").Codec<string, string>];
2021
+ readonly avg: readonly [5, import("./codec.ts").Codec<number, number>];
2022
+ }>>>];
2023
+ readonly distinct: readonly [5, import("./codec.ts").Codec<Record<string, number>, Record<string, number>>];
2024
+ }>;
2025
+ export declare const RecordsRows: import("./codec.ts").Message<{
2026
+ readonly rows: readonly [1, import("./codec.ts").Codec<Read<{
2027
+ /** where the row's span begins, counted from 1970 */
2028
+ readonly at: readonly [1, import("./codec.ts").Codec<bigint, number | bigint>];
2029
+ readonly count: readonly [2, import("./codec.ts").Codec<number, number>];
2030
+ readonly by: readonly [3, import("./codec.ts").Codec<Record<string, string>, Record<string, string>>];
2031
+ readonly stats: readonly [4, import("./codec.ts").Codec<Record<string, Read<{
2032
+ readonly samples: readonly [1, import("./codec.ts").Codec<number, number>];
2033
+ readonly sum: readonly [2, import("./codec.ts").Codec<string, string>];
2034
+ readonly min: readonly [3, import("./codec.ts").Codec<string, string>];
2035
+ readonly max: readonly [4, import("./codec.ts").Codec<string, string>];
2036
+ readonly avg: readonly [5, import("./codec.ts").Codec<number, number>];
2037
+ }>>, Record<string, import("./codec.ts").Written<{
2038
+ readonly samples: readonly [1, import("./codec.ts").Codec<number, number>];
2039
+ readonly sum: readonly [2, import("./codec.ts").Codec<string, string>];
2040
+ readonly min: readonly [3, import("./codec.ts").Codec<string, string>];
2041
+ readonly max: readonly [4, import("./codec.ts").Codec<string, string>];
2042
+ readonly avg: readonly [5, import("./codec.ts").Codec<number, number>];
2043
+ }>>>];
2044
+ readonly distinct: readonly [5, import("./codec.ts").Codec<Record<string, number>, Record<string, number>>];
2045
+ }>[], readonly import("./codec.ts").Written<{
2046
+ /** where the row's span begins, counted from 1970 */
2047
+ readonly at: readonly [1, import("./codec.ts").Codec<bigint, number | bigint>];
2048
+ readonly count: readonly [2, import("./codec.ts").Codec<number, number>];
2049
+ readonly by: readonly [3, import("./codec.ts").Codec<Record<string, string>, Record<string, string>>];
2050
+ readonly stats: readonly [4, import("./codec.ts").Codec<Record<string, Read<{
2051
+ readonly samples: readonly [1, import("./codec.ts").Codec<number, number>];
2052
+ readonly sum: readonly [2, import("./codec.ts").Codec<string, string>];
2053
+ readonly min: readonly [3, import("./codec.ts").Codec<string, string>];
2054
+ readonly max: readonly [4, import("./codec.ts").Codec<string, string>];
2055
+ readonly avg: readonly [5, import("./codec.ts").Codec<number, number>];
2056
+ }>>, Record<string, import("./codec.ts").Written<{
2057
+ readonly samples: readonly [1, import("./codec.ts").Codec<number, number>];
2058
+ readonly sum: readonly [2, import("./codec.ts").Codec<string, string>];
2059
+ readonly min: readonly [3, import("./codec.ts").Codec<string, string>];
2060
+ readonly max: readonly [4, import("./codec.ts").Codec<string, string>];
2061
+ readonly avg: readonly [5, import("./codec.ts").Codec<number, number>];
2062
+ }>>>];
2063
+ readonly distinct: readonly [5, import("./codec.ts").Codec<Record<string, number>, Record<string, number>>];
2064
+ }>[]>];
2065
+ }>;
2066
+ export declare const RecordsStream: import("./codec.ts").Message<{
2067
+ readonly name: readonly [1, import("./codec.ts").Codec<string, string>];
2068
+ readonly keep: readonly [2, import("./codec.ts").Codec<number, number>];
2069
+ /** its oldest event, or where its keep begins while it holds older */
2070
+ readonly retainedFrom: readonly [3, import("./codec.ts").Codec<bigint, number | bigint>];
2071
+ readonly newest: readonly [4, import("./codec.ts").Codec<bigint, number | bigint>];
2072
+ }>;
2073
+ export declare const RecordsStreams: import("./codec.ts").Message<{
2074
+ readonly streams: readonly [1, import("./codec.ts").Codec<Read<{
2075
+ readonly name: readonly [1, import("./codec.ts").Codec<string, string>];
2076
+ readonly keep: readonly [2, import("./codec.ts").Codec<number, number>];
2077
+ /** its oldest event, or where its keep begins while it holds older */
2078
+ readonly retainedFrom: readonly [3, import("./codec.ts").Codec<bigint, number | bigint>];
2079
+ readonly newest: readonly [4, import("./codec.ts").Codec<bigint, number | bigint>];
2080
+ }>[], readonly import("./codec.ts").Written<{
2081
+ readonly name: readonly [1, import("./codec.ts").Codec<string, string>];
2082
+ readonly keep: readonly [2, import("./codec.ts").Codec<number, number>];
2083
+ /** its oldest event, or where its keep begins while it holds older */
2084
+ readonly retainedFrom: readonly [3, import("./codec.ts").Codec<bigint, number | bigint>];
2085
+ readonly newest: readonly [4, import("./codec.ts").Codec<bigint, number | bigint>];
2086
+ }>[]>];
2087
+ }>;
2088
+ /**
2089
+ * The keys the events a query finds hold, sorted.
2090
+ */
2091
+ export declare const RecordsFieldNamesAsked: import("./codec.ts").Message<{
2092
+ readonly query: readonly [1, import("./codec.ts").Message<{
2093
+ /** the stream opened as it; every stream without one */
2094
+ readonly handle: readonly [1, import("./codec.ts").Codec<number, number>];
2095
+ /** the span before now; or from and to */
2096
+ readonly since: readonly [2, import("./codec.ts").Codec<number, number>];
2097
+ readonly from: readonly [3, import("./codec.ts").Codec<bigint, number | bigint>];
2098
+ readonly to: readonly [4, import("./codec.ts").Codec<bigint, number | bigint>];
2099
+ readonly streams: readonly [5, import("./codec.ts").Codec<string[], readonly string[]>];
2100
+ readonly names: readonly [6, import("./codec.ts").Codec<string[], readonly string[]>];
2101
+ readonly minLevel: readonly [7, import("./codec.ts").Codec<number, number>];
2102
+ readonly traceId: readonly [8, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
2103
+ /** each key with this value, in fields or in context */
2104
+ readonly where: readonly [9, import("./codec.ts").Codec<Record<string, string>, Record<string, string>>];
2105
+ readonly search: readonly [10, import("./codec.ts").Codec<string, string>];
2106
+ readonly newest: readonly [11, import("./codec.ts").Codec<boolean, boolean>];
2107
+ /** a page's events, top's values, fieldNames' keys */
2108
+ readonly limit: readonly [12, import("./codec.ts").Codec<number, number>];
2109
+ /** a page's next */
2110
+ readonly after: readonly [13, import("./codec.ts").Codec<string, string>];
2111
+ }>];
2112
+ readonly prefix: readonly [2, import("./codec.ts").Codec<string, string>];
2113
+ }>;
2114
+ export declare const RecordsNames: import("./codec.ts").Message<{
2115
+ readonly names: readonly [1, import("./codec.ts").Codec<string[], readonly string[]>];
2116
+ }>;
2117
+ /**
2118
+ * Every packed event once, a batch a call, from a cursor the program keeps.
2119
+ */
2120
+ export declare const RecordsPollAsked: import("./codec.ts").Message<{
2121
+ /** the oldest event kept without one */
2122
+ readonly cursor: readonly [1, import("./codec.ts").Codec<string, string>];
2123
+ /** 1000 unless given */
2124
+ readonly limit: readonly [2, import("./codec.ts").Codec<number, number>];
2125
+ }>;
2126
+ export declare const RecordsBatch: import("./codec.ts").Message<{
2127
+ readonly events: readonly [1, import("./codec.ts").Codec<Read<{
2128
+ readonly at: readonly [1, import("./codec.ts").Codec<bigint, number | bigint>];
2129
+ readonly stream: readonly [2, import("./codec.ts").Codec<string, string>];
2130
+ readonly name: readonly [3, import("./codec.ts").Codec<string, string>];
2131
+ readonly level: readonly [4, import("./codec.ts").Codec<number, number>];
2132
+ readonly message: readonly [5, import("./codec.ts").Codec<string, string>];
2133
+ /** an object; none when it has no field */
2134
+ readonly fields: readonly [6, import("./codec.ts").Codec<string, string>];
2135
+ readonly context: readonly [7, import("./codec.ts").Codec<string, string>];
2136
+ readonly traceId: readonly [8, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
2137
+ readonly spanId: readonly [9, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
2138
+ }>[], readonly import("./codec.ts").Written<{
2139
+ readonly at: readonly [1, import("./codec.ts").Codec<bigint, number | bigint>];
2140
+ readonly stream: readonly [2, import("./codec.ts").Codec<string, string>];
2141
+ readonly name: readonly [3, import("./codec.ts").Codec<string, string>];
2142
+ readonly level: readonly [4, import("./codec.ts").Codec<number, number>];
2143
+ readonly message: readonly [5, import("./codec.ts").Codec<string, string>];
2144
+ /** an object; none when it has no field */
2145
+ readonly fields: readonly [6, import("./codec.ts").Codec<string, string>];
2146
+ readonly context: readonly [7, import("./codec.ts").Codec<string, string>];
2147
+ readonly traceId: readonly [8, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
2148
+ readonly spanId: readonly [9, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
2149
+ }>[]>];
2150
+ readonly cursor: readonly [2, import("./codec.ts").Codec<string, string>];
2151
+ /** the events keep removed before the cursor reached them */
2152
+ readonly expired: readonly [3, import("./codec.ts").Codec<number, number>];
2153
+ }>;
2154
+ /**
2155
+ * A tail's batch: the events appended since the last that its query finds,
2156
+ * and how many left the store's hold before the tail read them.
2157
+ */
2158
+ export declare const RecordsTailBatch: import("./codec.ts").Message<{
2159
+ readonly events: readonly [1, import("./codec.ts").Codec<Read<{
2160
+ readonly at: readonly [1, import("./codec.ts").Codec<bigint, number | bigint>];
2161
+ readonly stream: readonly [2, import("./codec.ts").Codec<string, string>];
2162
+ readonly name: readonly [3, import("./codec.ts").Codec<string, string>];
2163
+ readonly level: readonly [4, import("./codec.ts").Codec<number, number>];
2164
+ readonly message: readonly [5, import("./codec.ts").Codec<string, string>];
2165
+ /** an object; none when it has no field */
2166
+ readonly fields: readonly [6, import("./codec.ts").Codec<string, string>];
2167
+ readonly context: readonly [7, import("./codec.ts").Codec<string, string>];
2168
+ readonly traceId: readonly [8, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
2169
+ readonly spanId: readonly [9, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
2170
+ }>[], readonly import("./codec.ts").Written<{
2171
+ readonly at: readonly [1, import("./codec.ts").Codec<bigint, number | bigint>];
2172
+ readonly stream: readonly [2, import("./codec.ts").Codec<string, string>];
2173
+ readonly name: readonly [3, import("./codec.ts").Codec<string, string>];
2174
+ readonly level: readonly [4, import("./codec.ts").Codec<number, number>];
2175
+ readonly message: readonly [5, import("./codec.ts").Codec<string, string>];
2176
+ /** an object; none when it has no field */
2177
+ readonly fields: readonly [6, import("./codec.ts").Codec<string, string>];
2178
+ readonly context: readonly [7, import("./codec.ts").Codec<string, string>];
2179
+ readonly traceId: readonly [8, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
2180
+ readonly spanId: readonly [9, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
2181
+ }>[]>];
2182
+ readonly missed: readonly [2, import("./codec.ts").Codec<number, number>];
2183
+ }>;
2184
+ /**
2185
+ * A piece of another program's output, cut anywhere.
2186
+ */
2187
+ export declare const RecordsPiece: import("./codec.ts").Message<{
2188
+ readonly bytes: readonly [1, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
2189
+ }>;
2190
+ /**
2191
+ * What a writer of lines dropped: lines past its buffer, longer than an
2192
+ * event holds, or refused by the file.
2193
+ */
2194
+ export declare const RecordsDropped: import("./codec.ts").Message<{
2195
+ readonly dropped: readonly [1, import("./codec.ts").Codec<number, number>];
2196
+ }>;
2197
+ /**
2198
+ * A head row or a segment that no longer reads, as damaged lists it and drop
2199
+ * takes it: a head row holds events not packed yet, a segment packed ones.
2200
+ */
2201
+ export declare const RecordsDamage: import("./codec.ts").Message<{
2202
+ /** head row or segment */
2203
+ readonly part: readonly [1, import("./codec.ts").Codec<string, string>];
2204
+ readonly id: readonly [2, import("./codec.ts").Codec<number, number>];
2205
+ readonly stream: readonly [3, import("./codec.ts").Codec<string, string>];
2206
+ /** its events' oldest time */
2207
+ readonly first: readonly [4, import("./codec.ts").Codec<bigint, number | bigint>];
2208
+ readonly last: readonly [5, import("./codec.ts").Codec<bigint, number | bigint>];
2209
+ /** what broke */
2210
+ readonly error: readonly [6, import("./codec.ts").Codec<string, string>];
2211
+ }>;
2212
+ export declare const RecordsDamages: import("./codec.ts").Message<{
2213
+ readonly damages: readonly [1, import("./codec.ts").Codec<Read<{
2214
+ /** head row or segment */
2215
+ readonly part: readonly [1, import("./codec.ts").Codec<string, string>];
2216
+ readonly id: readonly [2, import("./codec.ts").Codec<number, number>];
2217
+ readonly stream: readonly [3, import("./codec.ts").Codec<string, string>];
2218
+ /** its events' oldest time */
2219
+ readonly first: readonly [4, import("./codec.ts").Codec<bigint, number | bigint>];
2220
+ readonly last: readonly [5, import("./codec.ts").Codec<bigint, number | bigint>];
2221
+ /** what broke */
2222
+ readonly error: readonly [6, import("./codec.ts").Codec<string, string>];
2223
+ }>[], readonly import("./codec.ts").Written<{
2224
+ /** head row or segment */
2225
+ readonly part: readonly [1, import("./codec.ts").Codec<string, string>];
2226
+ readonly id: readonly [2, import("./codec.ts").Codec<number, number>];
2227
+ readonly stream: readonly [3, import("./codec.ts").Codec<string, string>];
2228
+ /** its events' oldest time */
2229
+ readonly first: readonly [4, import("./codec.ts").Codec<bigint, number | bigint>];
2230
+ readonly last: readonly [5, import("./codec.ts").Codec<bigint, number | bigint>];
2231
+ /** what broke */
2232
+ readonly error: readonly [6, import("./codec.ts").Codec<string, string>];
2233
+ }>[]>];
2234
+ }>;
2235
+ /**
2236
+ * A field a search reads, by its path into the document, and what a word
2237
+ * found there weighs.
2238
+ */
2239
+ export declare const SearchField: import("./codec.ts").Message<{
2240
+ readonly path: readonly [1, import("./codec.ts").Codec<string, string>];
2241
+ /** above 0, at most 1000 */
2242
+ readonly weight: readonly [2, import("./codec.ts").Codec<number, number>];
2243
+ }>;
2244
+ /**
2245
+ * A document set by its id, replacing it whole.
2246
+ */
2247
+ export declare const SearchSet: import("./codec.ts").Message<{
2248
+ readonly handle: readonly [1, import("./codec.ts").Codec<number, number>];
2249
+ /** 1 to 1024 bytes */
2250
+ readonly id: readonly [2, import("./codec.ts").Codec<string, string>];
2251
+ /** 1 MiB at most */
2252
+ readonly value: readonly [3, import("./codec.ts").Codec<string, string>];
2253
+ /** four bytes a dimension, little-endian floats */
2254
+ readonly vector: readonly [4, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
2255
+ /** the document has no vector, on an index with vectors */
2256
+ readonly noVector: readonly [5, import("./codec.ts").Codec<boolean, boolean>];
2257
+ }>;
2258
+ export declare const SearchDocument: import("./codec.ts").Message<{
2259
+ readonly id: readonly [1, import("./codec.ts").Codec<string, string>];
2260
+ readonly value: readonly [2, import("./codec.ts").Codec<string, string>];
2261
+ readonly vector: readonly [3, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
2262
+ readonly noVector: readonly [4, import("./codec.ts").Codec<boolean, boolean>];
2263
+ }>;
2264
+ export declare const SearchKey: import("./codec.ts").Message<{
2265
+ readonly handle: readonly [1, import("./codec.ts").Codec<number, number>];
2266
+ readonly id: readonly [2, import("./codec.ts").Codec<string, string>];
2267
+ }>;
2268
+ export declare const SearchDeleted: import("./codec.ts").Message<{
2269
+ readonly deleted: readonly [1, import("./codec.ts").Codec<boolean, boolean>];
2270
+ }>;
2271
+ export declare const SearchGot: import("./codec.ts").Message<{
2272
+ readonly found: readonly [1, import("./codec.ts").Codec<boolean, boolean>];
2273
+ readonly value: readonly [2, import("./codec.ts").Codec<string, string>];
2274
+ }>;
2275
+ /**
2276
+ * A search: by `text`'s words, `vector`, or both, kept to what `where` passes.
2277
+ */
2278
+ export declare const SearchQuery: import("./codec.ts").Message<{
2279
+ readonly handle: readonly [1, import("./codec.ts").Codec<number, number>];
2280
+ readonly text: readonly [2, import("./codec.ts").Codec<string, string>];
2281
+ readonly vector: readonly [3, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
2282
+ /** this search's, in place of the index's */
2283
+ readonly vectorWeight: readonly [4, import("./codec.ts").Codec<number, number>];
2284
+ readonly rerank: readonly [5, import("./codec.ts").Codec<boolean, boolean>];
2285
+ /** the conditions, as docs/wire.md's "search's where" writes them */
2286
+ readonly where: readonly [6, import("./codec.ts").Codec<string, string>];
2287
+ readonly offset: readonly [7, import("./codec.ts").Codec<number, number>];
2288
+ /** 10 when absent; offset and limit together 1000 at most */
2289
+ readonly limit: readonly [8, import("./codec.ts").Codec<number, number>];
2290
+ }>;
2291
+ /**
2292
+ * A hit: a document and its value, or a table's row, a value a column of
2293
+ * the answer's columns, as sql.Rows holds one.
2294
+ */
2295
+ export declare const SearchHit: import("./codec.ts").Message<{
2296
+ readonly id: readonly [1, import("./codec.ts").Codec<string, string>];
2297
+ /** null for a table's row */
2298
+ readonly value: readonly [2, import("./codec.ts").Codec<string, string>];
2299
+ readonly score: readonly [3, import("./codec.ts").Codec<number, number>];
2300
+ readonly row: readonly [4, import("./codec.ts").Codec<(boolean | SqlValue)[], readonly import("./codec.ts").SqlArg[]>];
2301
+ }>;
2302
+ export declare const SearchFound: import("./codec.ts").Message<{
2303
+ readonly hits: readonly [1, import("./codec.ts").Codec<Read<{
2304
+ readonly id: readonly [1, import("./codec.ts").Codec<string, string>];
2305
+ /** null for a table's row */
2306
+ readonly value: readonly [2, import("./codec.ts").Codec<string, string>];
2307
+ readonly score: readonly [3, import("./codec.ts").Codec<number, number>];
2308
+ readonly row: readonly [4, import("./codec.ts").Codec<(boolean | SqlValue)[], readonly import("./codec.ts").SqlArg[]>];
2309
+ }>[], readonly import("./codec.ts").Written<{
2310
+ readonly id: readonly [1, import("./codec.ts").Codec<string, string>];
2311
+ /** null for a table's row */
2312
+ readonly value: readonly [2, import("./codec.ts").Codec<string, string>];
2313
+ readonly score: readonly [3, import("./codec.ts").Codec<number, number>];
2314
+ readonly row: readonly [4, import("./codec.ts").Codec<(boolean | SqlValue)[], readonly import("./codec.ts").SqlArg[]>];
2315
+ }>[]>];
2316
+ /** the text the search read in fact, when a word was read as another */
2317
+ readonly corrected: readonly [2, import("./codec.ts").Codec<string, string>];
2318
+ /** the columns of a table's index's rows */
2319
+ readonly columns: readonly [3, import("./codec.ts").Codec<string[], readonly string[]>];
2320
+ }>;
2321
+ /**
2322
+ * Where an index stands: ready, rebuilding and how far, or failed and why.
2323
+ */
2324
+ export declare const SearchStatus: import("./codec.ts").Message<{
2325
+ /** ready, rebuilding or failed */
2326
+ readonly state: readonly [1, import("./codec.ts").Codec<string, string>];
2327
+ /** the share a rebuild has read */
2328
+ readonly done: readonly [2, import("./codec.ts").Codec<number, number>];
2329
+ /** why a rebuild failed */
2330
+ readonly error: readonly [3, import("./codec.ts").Codec<string, string>];
2331
+ }>;
2332
+ export declare const SearchName: import("./codec.ts").Message<{
2333
+ readonly name: readonly [1, import("./codec.ts").Codec<string, string>];
2334
+ /** a database's handle, for a table's index */
2335
+ readonly database: readonly [2, import("./codec.ts").Codec<number, number>];
2336
+ }>;
2337
+ export declare const SearchDropped: import("./codec.ts").Message<{
2338
+ readonly dropped: readonly [1, import("./codec.ts").Codec<boolean, boolean>];
2339
+ }>;
2340
+ /**
2341
+ * An index as the store's search.db holds it.
2342
+ */
2343
+ export declare const SearchIndex: import("./codec.ts").Message<{
2344
+ readonly name: readonly [1, import("./codec.ts").Codec<string, string>];
2345
+ readonly documents: readonly [2, import("./codec.ts").Codec<number, number>];
2346
+ readonly vectors: readonly [3, import("./codec.ts").Codec<number, number>];
2347
+ /** when a program last opened it */
2348
+ readonly opened: readonly [4, import("./codec.ts").Codec<number, number>];
2349
+ readonly state: readonly [5, import("./codec.ts").Codec<string, string>];
2350
+ readonly done: readonly [6, import("./codec.ts").Codec<number, number>];
2351
+ readonly error: readonly [7, import("./codec.ts").Codec<string, string>];
2352
+ }>;
2353
+ export declare const SearchListed: import("./codec.ts").Message<{
2354
+ readonly indexes: readonly [1, import("./codec.ts").Codec<Read<{
2355
+ readonly name: readonly [1, import("./codec.ts").Codec<string, string>];
2356
+ readonly documents: readonly [2, import("./codec.ts").Codec<number, number>];
2357
+ readonly vectors: readonly [3, import("./codec.ts").Codec<number, number>];
2358
+ /** when a program last opened it */
2359
+ readonly opened: readonly [4, import("./codec.ts").Codec<number, number>];
2360
+ readonly state: readonly [5, import("./codec.ts").Codec<string, string>];
2361
+ readonly done: readonly [6, import("./codec.ts").Codec<number, number>];
2362
+ readonly error: readonly [7, import("./codec.ts").Codec<string, string>];
2363
+ }>[], readonly import("./codec.ts").Written<{
2364
+ readonly name: readonly [1, import("./codec.ts").Codec<string, string>];
2365
+ readonly documents: readonly [2, import("./codec.ts").Codec<number, number>];
2366
+ readonly vectors: readonly [3, import("./codec.ts").Codec<number, number>];
2367
+ /** when a program last opened it */
2368
+ readonly opened: readonly [4, import("./codec.ts").Codec<number, number>];
2369
+ readonly state: readonly [5, import("./codec.ts").Codec<string, string>];
2370
+ readonly done: readonly [6, import("./codec.ts").Codec<number, number>];
2371
+ readonly error: readonly [7, import("./codec.ts").Codec<string, string>];
2372
+ }>[]>];
2373
+ }>;
2374
+ /**
2375
+ * A private server's clock: a time to set it to, a span to move it forward by,
2376
+ * or neither to read it. The answer is the time it reads once moved.
2377
+ */
2378
+ export declare const ServerClock: import("./codec.ts").Message<{
2379
+ readonly at: readonly [1, import("./codec.ts").Codec<number, number>];
2380
+ readonly advance: readonly [2, import("./codec.ts").Codec<number, number>];
2381
+ }>;
2382
+ /**
2383
+ * A migration as its file has it: the name that numbers it, and its SQL.
2384
+ */
2385
+ export declare const SqlMigration: import("./codec.ts").Message<{
2386
+ /** 0001_notes.sql */
2387
+ readonly name: readonly [1, import("./codec.ts").Codec<string, string>];
2388
+ readonly sql: readonly [2, import("./codec.ts").Codec<string, string>];
2389
+ }>;
2390
+ /**
2391
+ * Opens a database. Migrations, when given, are applied and checked; without
2392
+ * them the file opens as it is.
2393
+ */
2394
+ export declare const SqlOpen: import("./codec.ts").Message<{
2395
+ /** [a-z0-9][a-z0-9_-]{0,63} */
2396
+ readonly name: readonly [1, import("./codec.ts").Codec<string, string>];
2397
+ readonly migrations: readonly [2, import("./codec.ts").Codec<Read<{
2398
+ /** 0001_notes.sql */
2399
+ readonly name: readonly [1, import("./codec.ts").Codec<string, string>];
2400
+ readonly sql: readonly [2, import("./codec.ts").Codec<string, string>];
2401
+ }>[], readonly import("./codec.ts").Written<{
2402
+ /** 0001_notes.sql */
2403
+ readonly name: readonly [1, import("./codec.ts").Codec<string, string>];
2404
+ readonly sql: readonly [2, import("./codec.ts").Codec<string, string>];
2405
+ }>[]>];
2406
+ /** full or os: how far its commits go before they return; the store's own when absent */
2407
+ readonly durability: readonly [3, import("./codec.ts").Codec<string, string>];
2408
+ }>;
2409
+ /**
2410
+ * A statement's text and the values of its ?s, in order.
2411
+ */
2412
+ export declare const SqlText: import("./codec.ts").Message<{
2413
+ readonly text: readonly [1, import("./codec.ts").Codec<string, string>];
2414
+ readonly values: readonly [2, import("./codec.ts").Codec<(boolean | SqlValue)[], readonly import("./codec.ts").SqlArg[]>];
2415
+ }>;
2416
+ /**
2417
+ * A statement on a database: a write, or a read answered by its columns.
2418
+ */
2419
+ export declare const SqlStatement: import("./codec.ts").Message<{
2420
+ readonly handle: readonly [1, import("./codec.ts").Codec<number, number>];
2421
+ readonly text: readonly [2, import("./codec.ts").Codec<string, string>];
2422
+ readonly values: readonly [3, import("./codec.ts").Codec<(boolean | SqlValue)[], readonly import("./codec.ts").SqlArg[]>];
2423
+ }>;
2424
+ /**
2425
+ * What a statement gives back: its rows, one row or none, or one value. A
2426
+ * write with returning runs on the writer, its rows given once it is durable.
2427
+ */
2428
+ export declare const SqlQuery: import("./codec.ts").Message<{
2429
+ readonly handle: readonly [1, import("./codec.ts").Codec<number, number>];
2430
+ readonly text: readonly [2, import("./codec.ts").Codec<string, string>];
2431
+ readonly values: readonly [3, import("./codec.ts").Codec<(boolean | SqlValue)[], readonly import("./codec.ts").SqlArg[]>];
2432
+ /** all, one or scalar */
2433
+ readonly want: readonly [4, import("./codec.ts").Codec<string, string>];
2434
+ }>;
2435
+ /**
2436
+ * Rows a statement gave, a part of them a message: the first part names the
2437
+ * columns, and every row holds a value a column, in their order.
2438
+ */
2439
+ export declare const SqlRows: import("./codec.ts").Message<{
2440
+ readonly columns: readonly [1, import("./codec.ts").Codec<string[], readonly string[]>];
2441
+ readonly rows: readonly [2, import("./codec.ts").Codec<(boolean | SqlValue)[][], readonly (readonly import("./codec.ts").SqlArg[])[]>];
2442
+ }>;
2443
+ /**
2444
+ * A column of a statement's rows, a part of it a message, as one of three. A
2445
+ * column of INTEGERs alone goes as integers and one of REALs alone as reals,
2446
+ * 8 bytes a row, little end first; where a row holds NULL its bit of nulls is
2447
+ * set, and its value is 0 among integers and a NaN among reals, which SQLite
2448
+ * keeps none of. Any other column goes as values: text, blobs, and INTEGERs
2449
+ * beside REALs, neither read as the other.
2450
+ */
2451
+ export declare const SqlColumn: import("./codec.ts").Message<{
2452
+ readonly name: readonly [1, import("./codec.ts").Codec<string, string>];
2453
+ /** an int64 a row */
2454
+ readonly integers: readonly [2, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
2455
+ /** a float64 a row */
2456
+ readonly reals: readonly [3, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
2457
+ /** a bit a row, a byte's lowest first, set where the row holds NULL; absent when none does */
2458
+ readonly nulls: readonly [4, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
2459
+ readonly values: readonly [5, import("./codec.ts").Codec<(boolean | SqlValue)[], readonly import("./codec.ts").SqlArg[]>];
2460
+ }>;
2461
+ /**
2462
+ * Rows a statement gave, by their columns, a part of them a message: every
2463
+ * part holds every column, in the statement's order and as the same one of
2464
+ * three, for the same rows.
2465
+ */
2466
+ export declare const SqlColumns: import("./codec.ts").Message<{
2467
+ /** the rows of this part */
2468
+ readonly rows: readonly [1, import("./codec.ts").Codec<number, number>];
2469
+ /** the rows of every part */
2470
+ readonly total: readonly [2, import("./codec.ts").Codec<number, number>];
2471
+ readonly columns: readonly [3, import("./codec.ts").Codec<Read<{
2472
+ readonly name: readonly [1, import("./codec.ts").Codec<string, string>];
2473
+ /** an int64 a row */
2474
+ readonly integers: readonly [2, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
2475
+ /** a float64 a row */
2476
+ readonly reals: readonly [3, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
2477
+ /** a bit a row, a byte's lowest first, set where the row holds NULL; absent when none does */
2478
+ readonly nulls: readonly [4, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
2479
+ readonly values: readonly [5, import("./codec.ts").Codec<(boolean | SqlValue)[], readonly import("./codec.ts").SqlArg[]>];
2480
+ }>[], readonly import("./codec.ts").Written<{
2481
+ readonly name: readonly [1, import("./codec.ts").Codec<string, string>];
2482
+ /** an int64 a row */
2483
+ readonly integers: readonly [2, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
2484
+ /** a float64 a row */
2485
+ readonly reals: readonly [3, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
2486
+ /** a bit a row, a byte's lowest first, set where the row holds NULL; absent when none does */
2487
+ readonly nulls: readonly [4, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
2488
+ readonly values: readonly [5, import("./codec.ts").Codec<(boolean | SqlValue)[], readonly import("./codec.ts").SqlArg[]>];
2489
+ }>[]>];
2490
+ }>;
2491
+ /**
2492
+ * What a write changed: the rows, and SQLite's rowid of the row it inserted,
2493
+ * 0 when it inserted none.
2494
+ */
2495
+ export declare const SqlDone: import("./codec.ts").Message<{
2496
+ readonly changes: readonly [1, import("./codec.ts").Codec<number, number>];
2497
+ readonly lastInsertRowid: readonly [2, import("./codec.ts").Codec<bigint, number | bigint>];
2498
+ }>;
2499
+ /**
2500
+ * Statements known before they run, written as one in a shared commit.
2501
+ */
2502
+ export declare const SqlBatch: import("./codec.ts").Message<{
2503
+ readonly handle: readonly [1, import("./codec.ts").Codec<number, number>];
2504
+ readonly statements: readonly [2, import("./codec.ts").Codec<Read<{
2505
+ readonly text: readonly [1, import("./codec.ts").Codec<string, string>];
2506
+ readonly values: readonly [2, import("./codec.ts").Codec<(boolean | SqlValue)[], readonly import("./codec.ts").SqlArg[]>];
2507
+ }>[], readonly import("./codec.ts").Written<{
2508
+ readonly text: readonly [1, import("./codec.ts").Codec<string, string>];
2509
+ readonly values: readonly [2, import("./codec.ts").Codec<(boolean | SqlValue)[], readonly import("./codec.ts").SqlArg[]>];
2510
+ }>[]>];
2511
+ }>;
2512
+ export declare const SqlBatched: import("./codec.ts").Message<{
2513
+ readonly done: readonly [1, import("./codec.ts").Codec<Read<{
2514
+ readonly changes: readonly [1, import("./codec.ts").Codec<number, number>];
2515
+ readonly lastInsertRowid: readonly [2, import("./codec.ts").Codec<bigint, number | bigint>];
2516
+ }>[], readonly import("./codec.ts").Written<{
2517
+ readonly changes: readonly [1, import("./codec.ts").Codec<number, number>];
2518
+ readonly lastInsertRowid: readonly [2, import("./codec.ts").Codec<bigint, number | bigint>];
2519
+ }>[]>];
2520
+ }>;
2521
+ /**
2522
+ * Opens a transaction: it holds the database's writer until the client's last
2523
+ * DATA, five seconds at most.
2524
+ */
2525
+ export declare const SqlTxOpen: import("./codec.ts").Message<{
2526
+ readonly handle: readonly [1, import("./codec.ts").Codec<number, number>];
2527
+ }>;
2528
+ /**
2529
+ * A transaction's call, or its end: the last DATA commits, or not. A call is
2530
+ * a statement, or a call of kv or jobs on a bucket or a queue kept in the
2531
+ * database's file: a method of theirs with its request, kv.set or jobs.add,
2532
+ * which runs in the transaction.
2533
+ */
2534
+ export declare const SqlTxCall: import("./codec.ts").Message<{
2535
+ readonly text: readonly [1, import("./codec.ts").Codec<string, string>];
2536
+ readonly values: readonly [2, import("./codec.ts").Codec<(boolean | SqlValue)[], readonly import("./codec.ts").SqlArg[]>];
2537
+ /** all, one, scalar or exec; call for a method; nothing in the last */
2538
+ readonly want: readonly [3, import("./codec.ts").Codec<string, string>];
2539
+ /** in the last: true commits, false rolls back */
2540
+ readonly commit: readonly [4, import("./codec.ts").Codec<boolean, boolean>];
2541
+ /** with want call: the method, its request in body */
2542
+ readonly method: readonly [5, import("./codec.ts").Codec<number, number>];
2543
+ readonly body: readonly [6, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
2544
+ }>;
2545
+ /**
2546
+ * A call's answer: its rows, what it changed, a method's answer, or why it
2547
+ * failed, which leaves the transaction as it was before the call.
2548
+ */
2549
+ export declare const SqlTxAnswer: import("./codec.ts").Message<{
2550
+ readonly rows: readonly [1, import("./codec.ts").Message<{
2551
+ readonly columns: readonly [1, import("./codec.ts").Codec<string[], readonly string[]>];
2552
+ readonly rows: readonly [2, import("./codec.ts").Codec<(boolean | SqlValue)[][], readonly (readonly import("./codec.ts").SqlArg[])[]>];
2553
+ }>];
2554
+ readonly done: readonly [2, import("./codec.ts").Message<{
2555
+ readonly changes: readonly [1, import("./codec.ts").Codec<number, number>];
2556
+ readonly lastInsertRowid: readonly [2, import("./codec.ts").Codec<bigint, number | bigint>];
2557
+ }>];
2558
+ readonly failure: readonly [3, import("./codec.ts").Message<{
2559
+ readonly code: readonly [1, import("./codec.ts").Codec<string, string>];
2560
+ readonly message: readonly [2, import("./codec.ts").Codec<string, string>];
2561
+ readonly what: readonly [3, import("./codec.ts").Codec<Record<string, string>, Record<string, string>>];
2562
+ }>];
2563
+ /** what a method answered, as its own answer */
2564
+ readonly body: readonly [4, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
2565
+ }>;
2566
+ /**
2567
+ * What a subscription receives at once: how many it missed since its last
2568
+ * batch, then messages in the order they were released.
2569
+ */
2570
+ export declare const ChannelsBatch: import("./codec.ts").Message<{
2571
+ /** lost because it fell behind its branch's log */
2572
+ readonly missed: readonly [1, import("./codec.ts").Codec<number, number>];
2573
+ readonly messages: readonly [2, import("./codec.ts").Codec<Read<{
2574
+ /** the branch it was published under */
2575
+ readonly under: readonly [1, import("./codec.ts").Codec<string[], readonly string[]>];
2576
+ readonly value: readonly [2, import("./codec.ts").Codec<string, string>];
2577
+ }>[], readonly import("./codec.ts").Written<{
2578
+ /** the branch it was published under */
2579
+ readonly under: readonly [1, import("./codec.ts").Codec<string[], readonly string[]>];
2580
+ readonly value: readonly [2, import("./codec.ts").Codec<string, string>];
2581
+ }>[]>];
2582
+ }>;
2583
+ /**
2584
+ * A config's value at a version of its changes, and where each setting's
2585
+ * value came from.
2586
+ */
2587
+ export declare const ConfigValue: import("./codec.ts").Message<{
2588
+ readonly handle: readonly [1, import("./codec.ts").Codec<number, number>];
2589
+ readonly version: readonly [2, import("./codec.ts").Codec<number, number>];
2590
+ /** the settings, each span its milliseconds, each secret its text */
2591
+ readonly value: readonly [3, import("./codec.ts").Codec<string, string>];
2592
+ readonly lines: readonly [4, import("./codec.ts").Codec<Read<{
2593
+ readonly path: readonly [1, import("./codec.ts").Codec<string, string>];
2594
+ /** as JSON, a span spelled, a secret as *** */
2595
+ readonly value: readonly [2, import("./codec.ts").Codec<string, string>];
2596
+ readonly from: readonly [3, import("./codec.ts").Codec<string, string>];
2597
+ /** the values it went over, newest first */
2598
+ readonly over: readonly [4, import("./codec.ts").Codec<string[], readonly string[]>];
2599
+ }>[], readonly import("./codec.ts").Written<{
2600
+ readonly path: readonly [1, import("./codec.ts").Codec<string, string>];
2601
+ /** as JSON, a span spelled, a secret as *** */
2602
+ readonly value: readonly [2, import("./codec.ts").Codec<string, string>];
2603
+ readonly from: readonly [3, import("./codec.ts").Codec<string, string>];
2604
+ /** the values it went over, newest first */
2605
+ readonly over: readonly [4, import("./codec.ts").Codec<string[], readonly string[]>];
2606
+ }>[]>];
2607
+ /** what was read and not used, each with why */
2608
+ readonly notes: readonly [5, import("./codec.ts").Codec<string[], readonly string[]>];
2609
+ }>;
2610
+ /**
2611
+ * What a call would spend of each bound, and the bound it would stop at.
2612
+ */
2613
+ export declare const MetricsPlan: import("./codec.ts").Message<{
2614
+ readonly series: readonly [1, import("./codec.ts").Codec<number, number>];
2615
+ readonly bytes: readonly [2, import("./codec.ts").Codec<number, number>];
2616
+ readonly decoded: readonly [3, import("./codec.ts").Codec<number, number>];
2617
+ readonly exceeds: readonly [4, import("./codec.ts").Message<{
2618
+ /** series, bytes read or samples decoded */
2619
+ readonly limit: readonly [1, import("./codec.ts").Codec<string, string>];
2620
+ readonly wanted: readonly [2, import("./codec.ts").Codec<number, number>];
2621
+ readonly bound: readonly [3, import("./codec.ts").Codec<number, number>];
2622
+ }>];
2623
+ }>;
2624
+ /**
2625
+ * Opens an index, made the first time; one that holds other settings is
2626
+ * changed to these, as docs/guides/search/rebuilds.md has it. A read
2627
+ * connection opens an index only as it is. With a database, the index
2628
+ * follows a table of it: its fields and filters are columns.
2629
+ */
2630
+ export declare const SearchOpen: import("./codec.ts").Message<{
2631
+ /** [a-z0-9][a-z0-9_-]{0,63} */
2632
+ readonly name: readonly [1, import("./codec.ts").Codec<string, string>];
2633
+ /** in order; none for a document that is its own text */
2634
+ readonly fields: readonly [2, import("./codec.ts").Codec<Read<{
2635
+ readonly path: readonly [1, import("./codec.ts").Codec<string, string>];
2636
+ /** above 0, at most 1000 */
2637
+ readonly weight: readonly [2, import("./codec.ts").Codec<number, number>];
2638
+ }>[], readonly import("./codec.ts").Written<{
2639
+ readonly path: readonly [1, import("./codec.ts").Codec<string, string>];
2640
+ /** above 0, at most 1000 */
2641
+ readonly weight: readonly [2, import("./codec.ts").Codec<number, number>];
2642
+ }>[]>];
2643
+ /** the fields a search may filter by */
2644
+ readonly filters: readonly [3, import("./codec.ts").Codec<string[], readonly string[]>];
2645
+ /** on when absent */
2646
+ readonly typoTolerance: readonly [4, import("./codec.ts").Codec<boolean, boolean>];
2647
+ /** the vectors' dimensions; none for an index without vectors */
2648
+ readonly dimensions: readonly [5, import("./codec.ts").Codec<number, number>];
2649
+ /** above 0 and below 1; exact when absent */
2650
+ readonly recall: readonly [6, import("./codec.ts").Codec<number, number>];
2651
+ /** 0.5 when absent */
2652
+ readonly vectorWeight: readonly [7, import("./codec.ts").Codec<number, number>];
2653
+ readonly rerank: readonly [8, import("./codec.ts").Codec<boolean, boolean>];
2654
+ /** a change that needs reading again waits for reindex */
2655
+ readonly manual: readonly [9, import("./codec.ts").Codec<boolean, boolean>];
2656
+ /** reads the index again beside itself */
2657
+ readonly reindex: readonly [10, import("./codec.ts").Codec<boolean, boolean>];
2658
+ /** a database's handle: the index follows a table in its file */
2659
+ readonly database: readonly [11, import("./codec.ts").Codec<number, number>];
2660
+ /** the table a database's index follows */
2661
+ readonly table: readonly [12, import("./codec.ts").Codec<string, string>];
2662
+ /** the table's column of unique values; its primary key when absent */
2663
+ readonly key: readonly [13, import("./codec.ts").Codec<string, string>];
2664
+ /** the column of each row's vector, a blob of little-endian floats */
2665
+ readonly vectorColumn: readonly [14, import("./codec.ts").Codec<string, string>];
2666
+ }>;
2667
+ /**
2668
+ * Documents set in one commit, all of them or none: 1,000 and 16 MiB at most.
2669
+ */
2670
+ export declare const SearchSetMany: import("./codec.ts").Message<{
2671
+ readonly handle: readonly [1, import("./codec.ts").Codec<number, number>];
2672
+ readonly documents: readonly [2, import("./codec.ts").Codec<Read<{
2673
+ readonly id: readonly [1, import("./codec.ts").Codec<string, string>];
2674
+ readonly value: readonly [2, import("./codec.ts").Codec<string, string>];
2675
+ readonly vector: readonly [3, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
2676
+ readonly noVector: readonly [4, import("./codec.ts").Codec<boolean, boolean>];
2677
+ }>[], readonly import("./codec.ts").Written<{
2678
+ readonly id: readonly [1, import("./codec.ts").Codec<string, string>];
2679
+ readonly value: readonly [2, import("./codec.ts").Codec<string, string>];
2680
+ readonly vector: readonly [3, import("./codec.ts").Codec<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>];
2681
+ readonly noVector: readonly [4, import("./codec.ts").Codec<boolean, boolean>];
2682
+ }>[]>];
2683
+ }>;