@substrat-run/kernel 0.217.0 → 0.219.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/attachment-text.d.ts +89 -0
- package/dist/attachment-text.d.ts.map +1 -1
- package/dist/attachment-text.js +134 -1
- package/dist/attachment-text.js.map +1 -1
- package/dist/broker-counts.d.ts +108 -0
- package/dist/broker-counts.d.ts.map +1 -0
- package/dist/broker-counts.js +101 -0
- package/dist/broker-counts.js.map +1 -0
- package/dist/broker-schema.d.ts.map +1 -1
- package/dist/broker-schema.js +58 -0
- package/dist/broker-schema.js.map +1 -1
- package/dist/broker-shadow.d.ts +258 -0
- package/dist/broker-shadow.d.ts.map +1 -0
- package/dist/broker-shadow.js +295 -0
- package/dist/broker-shadow.js.map +1 -0
- package/dist/broker-telemetry.d.ts +3 -2
- package/dist/broker-telemetry.d.ts.map +1 -1
- package/dist/broker-telemetry.js +7 -5
- package/dist/broker-telemetry.js.map +1 -1
- package/dist/delivery-broker.d.ts +47 -5
- package/dist/delivery-broker.d.ts.map +1 -1
- package/dist/delivery-broker.js +115 -60
- package/dist/delivery-broker.js.map +1 -1
- package/dist/directory-lake-keep.d.ts +9 -0
- package/dist/directory-lake-keep.d.ts.map +1 -0
- package/dist/directory-lake-keep.js +331 -0
- package/dist/directory-lake-keep.js.map +1 -0
- package/dist/directory-lake-projection.d.ts +50 -0
- package/dist/directory-lake-projection.d.ts.map +1 -0
- package/dist/directory-lake-projection.js +143 -0
- package/dist/directory-lake-projection.js.map +1 -0
- package/dist/directory-lake.d.ts +11 -1
- package/dist/directory-lake.d.ts.map +1 -1
- package/dist/directory-lake.js +3 -1
- package/dist/directory-lake.js.map +1 -1
- package/dist/index.d.ts +9 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -1
- package/dist/index.js.map +1 -1
- package/dist/migration-digest.d.ts +2 -2
- package/dist/migration-digest.d.ts.map +1 -1
- package/dist/migration-digest.js +4 -2
- package/dist/migration-digest.js.map +1 -1
- package/dist/migration-fence.d.ts +1 -1
- package/dist/migration-fence.js +3 -3
- package/dist/migration-fence.js.map +1 -1
- package/dist/scope-host.d.ts +26 -1
- package/dist/scope-host.d.ts.map +1 -1
- package/dist/scope-host.js.map +1 -1
- package/dist/spine-guard.d.ts.map +1 -1
- package/dist/spine-guard.js +2 -0
- package/dist/spine-guard.js.map +1 -1
- package/dist/spine-restore.d.ts +14 -2
- package/dist/spine-restore.d.ts.map +1 -1
- package/dist/spine-restore.js.map +1 -1
- package/dist/store-driver-releases.d.ts +3 -1
- package/dist/store-driver-releases.d.ts.map +1 -1
- package/dist/table-ownership.d.ts +6 -0
- package/dist/table-ownership.d.ts.map +1 -1
- package/dist/table-ownership.js +17 -3
- package/dist/table-ownership.js.map +1 -1
- package/dist/vertical-owners.d.ts +1 -1
- package/dist/vertical-owners.d.ts.map +1 -1
- package/dist/vertical-owners.js.map +1 -1
- package/package.json +2 -2
|
@@ -86,10 +86,16 @@ export declare const ATTACHMENT_TEXT_MODULE: ModuleId;
|
|
|
86
86
|
export declare const ATTACHMENT_TEXT_JOB = "attachment-text";
|
|
87
87
|
/** The backfill's job name: queues extraction for attachments that predate it. */
|
|
88
88
|
export declare const ATTACHMENT_TEXT_BACKFILL_JOB = "attachment-text-backfill";
|
|
89
|
+
/**
|
|
90
|
+
* The recheck's job name: queues extraction again for attachments recorded `unsupported`
|
|
91
|
+
* that an extractor the host has now reads. One run per scope per extractor set.
|
|
92
|
+
*/
|
|
93
|
+
export declare const ATTACHMENT_TEXT_RECHECK_JOB = "attachment-text-recheck";
|
|
89
94
|
/** The kernel's own jobs, each bound by the adapter to the scope it is driving. */
|
|
90
95
|
export interface KernelJobHandlers {
|
|
91
96
|
readonly [ATTACHMENT_TEXT_JOB]: JobHandler;
|
|
92
97
|
readonly [ATTACHMENT_TEXT_BACKFILL_JOB]: JobHandler;
|
|
98
|
+
readonly [ATTACHMENT_TEXT_RECHECK_JOB]: JobHandler;
|
|
93
99
|
}
|
|
94
100
|
/**
|
|
95
101
|
* The kernel's handler for a run, or undefined for a run that is not the kernel's — which the
|
|
@@ -231,6 +237,89 @@ export declare function queueAttachmentTextBackfill(sql: ScopedSql, after: strin
|
|
|
231
237
|
export declare function attachmentTextBackfillJob(source: {
|
|
232
238
|
queueBatch(after: string | null): Promise<AttachmentTextBackfillBatch>;
|
|
233
239
|
}): JobHandler;
|
|
240
|
+
/**
|
|
241
|
+
* The extractor set a recheck run is keyed by: the host's extractor names, sorted and
|
|
242
|
+
* comma-joined (`docx,html,pdf,pptx,text,xlsx`). Empty for a host with none.
|
|
243
|
+
*
|
|
244
|
+
* `unsupported` is a fact about the HOST, not about the file: it says no extractor that host
|
|
245
|
+
* had read the type. A host that gains one — a release that adds PDF to its parsers — would
|
|
246
|
+
* otherwise leave every attachment recorded before it unsearchable for good, since nothing
|
|
247
|
+
* ever queues an attachment that already has a text row. The name stands for what an
|
|
248
|
+
* extractor reads; a change to what one extractor accepts under the same name is not seen.
|
|
249
|
+
*/
|
|
250
|
+
export declare function attachmentExtractorSetKey(extractors: readonly AttachmentExtractor[]): string;
|
|
251
|
+
/**
|
|
252
|
+
* Start the scope's recheck for this extractor set, unless the scope's newest recheck is for
|
|
253
|
+
* this set already, or it holds no attachments, or the host has no extractor at all.
|
|
254
|
+
*
|
|
255
|
+
* **The newest recheck run is the marker**, as the run row is for the backfill
|
|
256
|
+
* (`startAttachmentTextBackfill`), but compared by set: its instance is the set's key. A
|
|
257
|
+
* deployment that keeps its extractors walks nothing again, and one whose extractors change
|
|
258
|
+
* starts one walk in each scope it drives. That includes a change BACK: a release rolled
|
|
259
|
+
* back to a set without some extractor records what it cannot read `unsupported`, and the
|
|
260
|
+
* release rolled forward again must read those, so "this set has walked once" is not the
|
|
261
|
+
* test — "this set is the last one that walked" is. Alternating two sets costs a walk per
|
|
262
|
+
* change, and one script drives a scope with one set, so a change is a deploy.
|
|
263
|
+
*
|
|
264
|
+
* A host whose set is empty starts nothing: it reads nothing, so there is nothing to queue.
|
|
265
|
+
* Its window is not covered — a release that drops every extractor and one that restores the
|
|
266
|
+
* same set leave what was uploaded between them `unsupported`.
|
|
267
|
+
*
|
|
268
|
+
* Read before it writes, so the drive that calls it on every pass writes nothing once the
|
|
269
|
+
* scope is marked: two index reads. Returns whether it started a run (a live run for the
|
|
270
|
+
* set already, which `startKernelRun` coalesces with, is not a start).
|
|
271
|
+
*/
|
|
272
|
+
export declare function startAttachmentTextRecheck(sql: ScopedSql, extractorSet: string, runId: string, at: string): boolean;
|
|
273
|
+
/** An attachment recorded `unsupported`, with what an extractor's `accepts` is asked about. */
|
|
274
|
+
export interface UnsupportedAttachment {
|
|
275
|
+
readonly id: string;
|
|
276
|
+
readonly contentType: string;
|
|
277
|
+
readonly filename: string;
|
|
278
|
+
}
|
|
279
|
+
/** One page of the recheck's walk. `last` is the cursor the next page resumes after. */
|
|
280
|
+
export interface AttachmentTextRecheckPage {
|
|
281
|
+
readonly scanned: number;
|
|
282
|
+
readonly unsupported: readonly UnsupportedAttachment[];
|
|
283
|
+
readonly last: string | null;
|
|
284
|
+
/** True when the page reached the end of the text rows. */
|
|
285
|
+
readonly done: boolean;
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* One page of the recheck: the next `batch` text rows after `after`, by attachment id, and
|
|
289
|
+
* those of them recorded `unsupported`. Bounded by what it LOOKS AT, like the backfill's
|
|
290
|
+
* batch, so a scope with no `unsupported` row costs the same pass as one full of them. Only
|
|
291
|
+
* reads: which of them an extractor now reads is the host's to decide (`accepts` is code),
|
|
292
|
+
* and the queueing is `requeueUnsupportedAttachmentText`.
|
|
293
|
+
*/
|
|
294
|
+
export declare function readAttachmentTextRecheckPage(sql: ScopedSql, after: string | null, batch?: number): AttachmentTextRecheckPage;
|
|
295
|
+
/**
|
|
296
|
+
* Queue extraction again for these attachments, inside the caller's transaction — each only
|
|
297
|
+
* while its row is still `unsupported` and no extraction run for it is live. The page was
|
|
298
|
+
* read in an earlier call, so by now an attachment may be gone (its trigger took the row),
|
|
299
|
+
* re-uploaded or already re-queued: none of those is touched, which also makes a replayed
|
|
300
|
+
* page queue nothing twice. A live run is left to write its own outcome: re-queueing under
|
|
301
|
+
* it would coalesce with it, and a run that had already written `unsupported` would then end
|
|
302
|
+
* `done` over a `pending` row nothing is coming for. The row goes back to `pending` — it had
|
|
303
|
+
* no body to keep searchable — and gets a run of its own. Returns how many were queued.
|
|
304
|
+
*/
|
|
305
|
+
export declare function requeueUnsupportedAttachmentText(sql: ScopedSql, attachmentIds: readonly string[], mintId: () => string, at: string): number;
|
|
306
|
+
/**
|
|
307
|
+
* The recheck job: one page per pass, the cursor the last attachment id it looked at. Of the
|
|
308
|
+
* page's `unsupported` rows it re-queues the ones an extractor of this host now accepts
|
|
309
|
+
* (`chooseAttachmentExtractor`, the choice the extraction run makes), and leaves the rest:
|
|
310
|
+
* an image no extractor reads stays `unsupported`, with no run spent on finding that out
|
|
311
|
+
* again. Replays like the backfill: the page is re-read and the re-queue is guarded.
|
|
312
|
+
*
|
|
313
|
+
* **A run keyed to another set ends on its first pass here, having walked nothing.** The
|
|
314
|
+
* handler is found by job name, so after a deploy changes the set, this host is handed the
|
|
315
|
+
* walk the last one began. Finishing it with these extractors would mark that set walked over
|
|
316
|
+
* rows it never judged, and a roll back to it would read them as done. This host's own walk
|
|
317
|
+
* is the one `startAttachmentTextRecheck` starts for its set.
|
|
318
|
+
*/
|
|
319
|
+
export declare function attachmentTextRecheckJob(source: {
|
|
320
|
+
page(after: string | null): Promise<AttachmentTextRecheckPage>;
|
|
321
|
+
requeue(attachmentIds: readonly string[]): Promise<number>;
|
|
322
|
+
}, extractors: readonly AttachmentExtractor[]): JobHandler;
|
|
234
323
|
/**
|
|
235
324
|
* An attachment's extraction state, or null when none was ever recorded — an attachment
|
|
236
325
|
* uploaded before extraction existed, or one a fork carried without its text.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attachment-text.d.ts","sourceRoot":"","sources":["../src/attachment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T_TEXT_MODULE = '@substrat-run/kernel';
|
|
|
86
86
|
export const ATTACHMENT_TEXT_JOB = 'attachment-text';
|
|
87
87
|
/** The backfill's job name: queues extraction for attachments that predate it. */
|
|
88
88
|
export const ATTACHMENT_TEXT_BACKFILL_JOB = 'attachment-text-backfill';
|
|
89
|
+
/**
|
|
90
|
+
* The recheck's job name: queues extraction again for attachments recorded `unsupported`
|
|
91
|
+
* that an extractor the host has now reads. One run per scope per extractor set.
|
|
92
|
+
*/
|
|
93
|
+
export const ATTACHMENT_TEXT_RECHECK_JOB = 'attachment-text-recheck';
|
|
89
94
|
/**
|
|
90
95
|
* The kernel's handler for a run, or undefined for a run that is not the kernel's — which the
|
|
91
96
|
* adapter's own registry answers. The one place a kernel job is dispatched, so a new one is
|
|
@@ -193,7 +198,7 @@ const RUN_PAYLOAD_KEY = 'attachmentId';
|
|
|
193
198
|
* rather than racing it.
|
|
194
199
|
*/
|
|
195
200
|
function startKernelRun(sql, job, instance, payload, runId, at) {
|
|
196
|
-
sql.exec(`INSERT INTO _substrat_job_runs
|
|
201
|
+
const { changes } = sql.exec(`INSERT INTO _substrat_job_runs
|
|
197
202
|
(id, module_id, job, instance, payload, subject_id, status, cursor, counters, attempts,
|
|
198
203
|
last_error, started_at, updated_at, next_attempt_at, ended_at)
|
|
199
204
|
SELECT ?, ?, ?, ?, ?, NULL, 'running', NULL, '{}', 0, NULL, ?, ?, NULL, NULL
|
|
@@ -201,6 +206,7 @@ function startKernelRun(sql, job, instance, payload, runId, at) {
|
|
|
201
206
|
SELECT 1 FROM _substrat_job_runs
|
|
202
207
|
WHERE module_id = ? AND job = ? AND instance = ? AND status = 'running'
|
|
203
208
|
)`, [runId, ATTACHMENT_TEXT_MODULE, job, instance, JSON.stringify(payload), at, at, ATTACHMENT_TEXT_MODULE, job, instance]);
|
|
209
|
+
return changes > 0;
|
|
204
210
|
}
|
|
205
211
|
/** Start one attachment's extraction run, coalesced with a live one. */
|
|
206
212
|
function startAttachmentTextRun(sql, attachmentId, runId, at) {
|
|
@@ -340,6 +346,133 @@ export function attachmentTextBackfillJob(source) {
|
|
|
340
346
|
return { cursor: last, done };
|
|
341
347
|
};
|
|
342
348
|
}
|
|
349
|
+
// -- the recheck: `unsupported` read again once an extractor reads the type ------------
|
|
350
|
+
/**
|
|
351
|
+
* The extractor set a recheck run is keyed by: the host's extractor names, sorted and
|
|
352
|
+
* comma-joined (`docx,html,pdf,pptx,text,xlsx`). Empty for a host with none.
|
|
353
|
+
*
|
|
354
|
+
* `unsupported` is a fact about the HOST, not about the file: it says no extractor that host
|
|
355
|
+
* had read the type. A host that gains one — a release that adds PDF to its parsers — would
|
|
356
|
+
* otherwise leave every attachment recorded before it unsearchable for good, since nothing
|
|
357
|
+
* ever queues an attachment that already has a text row. The name stands for what an
|
|
358
|
+
* extractor reads; a change to what one extractor accepts under the same name is not seen.
|
|
359
|
+
*/
|
|
360
|
+
export function attachmentExtractorSetKey(extractors) {
|
|
361
|
+
return extractors
|
|
362
|
+
.map((e) => e.name)
|
|
363
|
+
.sort()
|
|
364
|
+
.join(',');
|
|
365
|
+
}
|
|
366
|
+
/**
|
|
367
|
+
* Start the scope's recheck for this extractor set, unless the scope's newest recheck is for
|
|
368
|
+
* this set already, or it holds no attachments, or the host has no extractor at all.
|
|
369
|
+
*
|
|
370
|
+
* **The newest recheck run is the marker**, as the run row is for the backfill
|
|
371
|
+
* (`startAttachmentTextBackfill`), but compared by set: its instance is the set's key. A
|
|
372
|
+
* deployment that keeps its extractors walks nothing again, and one whose extractors change
|
|
373
|
+
* starts one walk in each scope it drives. That includes a change BACK: a release rolled
|
|
374
|
+
* back to a set without some extractor records what it cannot read `unsupported`, and the
|
|
375
|
+
* release rolled forward again must read those, so "this set has walked once" is not the
|
|
376
|
+
* test — "this set is the last one that walked" is. Alternating two sets costs a walk per
|
|
377
|
+
* change, and one script drives a scope with one set, so a change is a deploy.
|
|
378
|
+
*
|
|
379
|
+
* A host whose set is empty starts nothing: it reads nothing, so there is nothing to queue.
|
|
380
|
+
* Its window is not covered — a release that drops every extractor and one that restores the
|
|
381
|
+
* same set leave what was uploaded between them `unsupported`.
|
|
382
|
+
*
|
|
383
|
+
* Read before it writes, so the drive that calls it on every pass writes nothing once the
|
|
384
|
+
* scope is marked: two index reads. Returns whether it started a run (a live run for the
|
|
385
|
+
* set already, which `startKernelRun` coalesces with, is not a start).
|
|
386
|
+
*/
|
|
387
|
+
export function startAttachmentTextRecheck(sql, extractorSet, runId, at) {
|
|
388
|
+
if (extractorSet === '')
|
|
389
|
+
return false;
|
|
390
|
+
const [row] = sql.query(`SELECT EXISTS (SELECT 1 FROM _substrat_attachments) AS has,
|
|
391
|
+
(SELECT instance FROM _substrat_job_runs WHERE module_id = ? AND job = ? ORDER BY id DESC LIMIT 1) AS latest`, [ATTACHMENT_TEXT_MODULE, ATTACHMENT_TEXT_RECHECK_JOB]);
|
|
392
|
+
if (!row || Number(row.has) !== 1 || row.latest === extractorSet)
|
|
393
|
+
return false;
|
|
394
|
+
return startKernelRun(sql, ATTACHMENT_TEXT_RECHECK_JOB, extractorSet, {}, runId, at);
|
|
395
|
+
}
|
|
396
|
+
/**
|
|
397
|
+
* One page of the recheck: the next `batch` text rows after `after`, by attachment id, and
|
|
398
|
+
* those of them recorded `unsupported`. Bounded by what it LOOKS AT, like the backfill's
|
|
399
|
+
* batch, so a scope with no `unsupported` row costs the same pass as one full of them. Only
|
|
400
|
+
* reads: which of them an extractor now reads is the host's to decide (`accepts` is code),
|
|
401
|
+
* and the queueing is `requeueUnsupportedAttachmentText`.
|
|
402
|
+
*/
|
|
403
|
+
export function readAttachmentTextRecheckPage(sql, after, batch = ATTACHMENT_TEXT_BACKFILL_BATCH) {
|
|
404
|
+
const rows = sql.query(`SELECT t.attachment_id, t.status, a.content_type, a.filename
|
|
405
|
+
FROM _substrat_search__attachment_text t
|
|
406
|
+
LEFT JOIN _substrat_attachments a ON a.id = t.attachment_id
|
|
407
|
+
WHERE t.attachment_id > ?
|
|
408
|
+
ORDER BY t.attachment_id
|
|
409
|
+
LIMIT ?`, [after ?? '', batch]);
|
|
410
|
+
const unsupported = [];
|
|
411
|
+
for (const r of rows) {
|
|
412
|
+
if (r.status !== 'unsupported' || r.content_type === null || r.filename === null)
|
|
413
|
+
continue;
|
|
414
|
+
unsupported.push({ id: r.attachment_id, contentType: r.content_type, filename: r.filename });
|
|
415
|
+
}
|
|
416
|
+
return { scanned: rows.length, unsupported, last: rows.at(-1)?.attachment_id ?? after, done: rows.length < batch };
|
|
417
|
+
}
|
|
418
|
+
/**
|
|
419
|
+
* Queue extraction again for these attachments, inside the caller's transaction — each only
|
|
420
|
+
* while its row is still `unsupported` and no extraction run for it is live. The page was
|
|
421
|
+
* read in an earlier call, so by now an attachment may be gone (its trigger took the row),
|
|
422
|
+
* re-uploaded or already re-queued: none of those is touched, which also makes a replayed
|
|
423
|
+
* page queue nothing twice. A live run is left to write its own outcome: re-queueing under
|
|
424
|
+
* it would coalesce with it, and a run that had already written `unsupported` would then end
|
|
425
|
+
* `done` over a `pending` row nothing is coming for. The row goes back to `pending` — it had
|
|
426
|
+
* no body to keep searchable — and gets a run of its own. Returns how many were queued.
|
|
427
|
+
*/
|
|
428
|
+
export function requeueUnsupportedAttachmentText(sql, attachmentIds, mintId, at) {
|
|
429
|
+
let queued = 0;
|
|
430
|
+
for (const id of attachmentIds) {
|
|
431
|
+
const { changes } = sql.exec(`UPDATE _substrat_search__attachment_text
|
|
432
|
+
SET status = 'pending', extractor = NULL, detail = NULL, updated_at = ?
|
|
433
|
+
WHERE attachment_id = ? AND status = 'unsupported'
|
|
434
|
+
AND NOT EXISTS (
|
|
435
|
+
SELECT 1 FROM _substrat_job_runs
|
|
436
|
+
WHERE module_id = ? AND job = ? AND instance = ? AND status = 'running'
|
|
437
|
+
)`, [at, id, ATTACHMENT_TEXT_MODULE, ATTACHMENT_TEXT_JOB, id]);
|
|
438
|
+
if (changes === 0)
|
|
439
|
+
continue;
|
|
440
|
+
startAttachmentTextRun(sql, id, mintId(), at);
|
|
441
|
+
queued += 1;
|
|
442
|
+
}
|
|
443
|
+
return queued;
|
|
444
|
+
}
|
|
445
|
+
/**
|
|
446
|
+
* The recheck job: one page per pass, the cursor the last attachment id it looked at. Of the
|
|
447
|
+
* page's `unsupported` rows it re-queues the ones an extractor of this host now accepts
|
|
448
|
+
* (`chooseAttachmentExtractor`, the choice the extraction run makes), and leaves the rest:
|
|
449
|
+
* an image no extractor reads stays `unsupported`, with no run spent on finding that out
|
|
450
|
+
* again. Replays like the backfill: the page is re-read and the re-queue is guarded.
|
|
451
|
+
*
|
|
452
|
+
* **A run keyed to another set ends on its first pass here, having walked nothing.** The
|
|
453
|
+
* handler is found by job name, so after a deploy changes the set, this host is handed the
|
|
454
|
+
* walk the last one began. Finishing it with these extractors would mark that set walked over
|
|
455
|
+
* rows it never judged, and a roll back to it would read them as done. This host's own walk
|
|
456
|
+
* is the one `startAttachmentTextRecheck` starts for its set.
|
|
457
|
+
*/
|
|
458
|
+
export function attachmentTextRecheckJob(source, extractors) {
|
|
459
|
+
const extractorSet = attachmentExtractorSetKey(extractors);
|
|
460
|
+
return async (pass) => {
|
|
461
|
+
if (pass.run.instance !== extractorSet) {
|
|
462
|
+
pass.count('superseded', 1);
|
|
463
|
+
return { done: true };
|
|
464
|
+
}
|
|
465
|
+
const after = typeof pass.cursor === 'string' ? pass.cursor : null;
|
|
466
|
+
const { scanned, unsupported, last, done } = await source.page(after);
|
|
467
|
+
const readable = unsupported
|
|
468
|
+
.filter((a) => chooseAttachmentExtractor(extractors, a.contentType, a.filename) !== undefined)
|
|
469
|
+
.map((a) => a.id);
|
|
470
|
+
const queued = readable.length > 0 ? await source.requeue(readable) : 0;
|
|
471
|
+
pass.count('scanned', scanned);
|
|
472
|
+
pass.count('queued', queued);
|
|
473
|
+
return { cursor: last, done };
|
|
474
|
+
};
|
|
475
|
+
}
|
|
343
476
|
/**
|
|
344
477
|
* An attachment's extraction state, or null when none was ever recorded — an attachment
|
|
345
478
|
* uploaded before extraction existed, or one a fork carried without its text.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attachment-text.js","sourceRoot":"","sources":["../src/attachment-text.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6EG;AACH,OAAO,EACL,gBAAgB,EAChB,aAAa,EACb,UAAU,GAMX,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,OAAO,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,EACL,8BAA8B,EAC9B,0BAA0B,EAC1B,yBAAyB,EACzB,iBAAiB,EACjB,WAAW,EACX,sBAAsB,GAIvB,MAAM,2BAA2B,CAAC;AAEnC,yFAAyF;AACzF,MAAM,CAAC,MAAM,sBAAsB,GAAG,sBAAkC,CAAC;AAEzE,qFAAqF;AACrF,MAAM,CAAC,MAAM,mBAAmB,GAAG,iBAAiB,CAAC;AAErD,kFAAkF;AAClF,MAAM,CAAC,MAAM,4BAA4B,GAAG,0BAA0B,CAAC;AAQvE;;;;GAIG;AACH,MAAM,UAAU,YAAY,CAC1B,GAAuC,EACvC,QAA2B;IAE3B,IAAI,GAAG,CAAC,SAAS,KAAK,sBAAsB,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,GAAG,CAAC,GAAG,CAAC;QAAE,OAAO,SAAS,CAAC;IACpG,OAAO,EAAE,OAAO,EAAE,QAAQ,CAAC,GAAG,CAAC,GAA8B,CAAC,EAAE,CAAC;AACnE,CAAC;AAED,qFAAqF;AACrF,MAAM,CAAC,MAAM,8BAA8B,GAAG,GAAG,CAAC;AAElD;;;;;;;;;GASG;AACH,MAAM,UAAU,oBAAoB,CAAC,QAAgB,EAAE,IAAY;IACjE,IAAI,QAAQ,KAAK,sBAAsB,EAAE,CAA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C,CAAC;QACxC,IAAI,IAAI,KAAK,IAAI;YAAE,OAAO,MAAM,CAAC,2CAA2C,CAAC,CAAC;QAC9E,IAAI,CAAC,MAAM,gBAAgB,CAAC,IAAI,CAAC,CAAC,KAAK,MAAM,CAAC,MAAM;YAAE,OAAO,MAAM,CAAC,4CAA4C,CAAC,CAAC;QAClH,OAAO,sBAAsB,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,CAAC,WAAW,EAAE,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,EAAE,MAAM,CAAC,CAAC;IACzH,CAAC,CAAC;IACF,OAAO,KAAK,EAAE,IAAI,EAAE,EAAE;QACpB,MAAM,YAAY,GAAG,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAClD,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;QACjD,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;YACnB,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;QACxB,CAAC;QACD,MAAM,OAAO,GAAG,MAAM,UAAU,CAAC,MAAM,CAAC,CAAC;QACzC,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;QACvD,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;QAC3C,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IACxB,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* #3474 (rfc/broker-and-tenant-isolation.md §9.2, K-70): the delivery broker's EXACT counts, kept per
|
|
3
|
+
* UTC day in its own SQLite and shipped to the lake. Analytics Engine samples at volume, which is
|
|
4
|
+
* enough for trends and alarms (`broker-telemetry.ts`) and not for billing. These are counted in the
|
|
5
|
+
* same transaction as the decision they count, so a count is a fact about the store, never an
|
|
6
|
+
* estimate.
|
|
7
|
+
*
|
|
8
|
+
* **What is counted**, per (day, tenant, scope, channel, receiver, outcome): a message `received`
|
|
9
|
+
* (once, at its first acceptance; a duplicate handoff counts nothing; receiver `''`), and per
|
|
10
|
+
* receiver a delivery `delivered`, an attempt `retried` (a failure the broker will try again; a
|
|
11
|
+
* slow-down spends nothing and counts nothing), a delivery gone `dead`, a dead letter `resent` or
|
|
12
|
+
* `discarded` by a person, and one `expired` unresent. Never content: ids, the channel and the
|
|
13
|
+
* receiver's name.
|
|
14
|
+
*
|
|
15
|
+
* **Shipped, then bounded (K-70).** A row is shipped when its count moves past what the lake has: it
|
|
16
|
+
* carries its whole count, so the lake keeps a key's latest version (`BrokerLakeRow`, the directory's
|
|
17
|
+
* outbox shape, dataset `broker_count_days`). What was shipped is recorded as the count shipped, not
|
|
18
|
+
* as "shipped": a count that moved while the ship was in flight goes again. Shipping is at most
|
|
19
|
+
* every `BROKER_COUNT_SHIP_MS` (D-77's five minutes), from the broker's own alarm, so K-69 holds.
|
|
20
|
+
* A day is dropped once the lake has all of it and it is older than `BROKER_COUNT_KEEP_DAYS` (the
|
|
21
|
+
* current and the previous billing period, as the directory keeps meter days); a day never shipped,
|
|
22
|
+
* because no lake was ever bound, is dropped at `BROKER_COUNT_MAX_DAYS`, so an unbound broker is
|
|
23
|
+
* bounded too.
|
|
24
|
+
*
|
|
25
|
+
* Its table is step 5 of `broker-schema.ts`.
|
|
26
|
+
*/
|
|
27
|
+
import type { BrokerMessageKind, BrokerSql } from './delivery-broker.js';
|
|
28
|
+
/** What happened, as a count names it. */
|
|
29
|
+
export type BrokerCountOutcome = 'received' | 'delivered' | 'retried' | 'dead' | 'resent' | 'discarded' | 'expired';
|
|
30
|
+
export declare const BROKER_COUNT_OUTCOMES: readonly BrokerCountOutcome[];
|
|
31
|
+
/**
|
|
32
|
+
* The Pipelines stream binding a broker ships its counts through, on the app's script. No binding, no
|
|
33
|
+
* ship: the counts are kept, bounded by `BROKER_COUNT_MAX_DAYS`, and the lake has none of them.
|
|
34
|
+
*/
|
|
35
|
+
export declare const BROKER_LAKE_BINDING = "SUBSTRAT_BROKER_LAKE";
|
|
36
|
+
/** The least time between two ships of one broker's counts: D-77's freshness bound. */
|
|
37
|
+
export declare const BROKER_COUNT_SHIP_MS: number;
|
|
38
|
+
/** Days kept once the lake has them all: the current and the previous billing period. */
|
|
39
|
+
export declare const BROKER_COUNT_KEEP_DAYS = 62;
|
|
40
|
+
/** Days kept whatever the lake has: the bound of a broker that never had a lake to ship to. */
|
|
41
|
+
export declare const BROKER_COUNT_MAX_DAYS = 400;
|
|
42
|
+
/** Rows one ship carries; a larger backlog follows in the next. */
|
|
43
|
+
export declare const BROKER_COUNT_SHIP_BATCH = 500;
|
|
44
|
+
/** One count to add. `receiver` is `''` for what is not about a receiver (`received`). */
|
|
45
|
+
export interface BrokerCount {
|
|
46
|
+
tenantId: string;
|
|
47
|
+
scopeId: string;
|
|
48
|
+
channel: BrokerMessageKind;
|
|
49
|
+
receiver: string;
|
|
50
|
+
outcome: BrokerCountOutcome;
|
|
51
|
+
n: number;
|
|
52
|
+
}
|
|
53
|
+
/** One day's count, as the store keeps it. */
|
|
54
|
+
export interface BrokerCountDay extends BrokerCount {
|
|
55
|
+
/** The UTC day, `YYYY-MM-DD`. */
|
|
56
|
+
day: string;
|
|
57
|
+
/** How much of `n` the lake has. */
|
|
58
|
+
shipped: number;
|
|
59
|
+
}
|
|
60
|
+
/** The UTC day of an epoch-ms instant. */
|
|
61
|
+
export declare const utcDay: (at: number) => string;
|
|
62
|
+
/** Add counts for the day of `now`. Run inside the transaction that made the decision counted. */
|
|
63
|
+
export declare function addBrokerCounts(sql: BrokerSql, counts: readonly BrokerCount[], now: number): void;
|
|
64
|
+
/** The counts on or after `since` (a UTC day), oldest first: what a billing read or a test asks. */
|
|
65
|
+
export declare function readBrokerCounts(sql: BrokerSql, since?: string): BrokerCountDay[];
|
|
66
|
+
/** The rows the lake does not have all of yet, oldest change first. */
|
|
67
|
+
export declare function unshippedBrokerCounts(sql: BrokerSql, limit?: number): BrokerCountDay[];
|
|
68
|
+
/** Record that the lake has each row up to the count it was shipped with. Never moves one back. */
|
|
69
|
+
export declare function markBrokerCountsShipped(sql: BrokerSql, rows: readonly BrokerCountDay[]): void;
|
|
70
|
+
/** When the next ship is due: `BROKER_COUNT_SHIP_MS` after the oldest unshipped change, or null with none. */
|
|
71
|
+
export declare function nextBrokerCountShipAt(sql: BrokerSql): number | null;
|
|
72
|
+
/** Drop the days the bounds say are kept long enough. Run in the store's prune. */
|
|
73
|
+
export declare function pruneBrokerCounts(sql: BrokerSql, now: number): void;
|
|
74
|
+
/**
|
|
75
|
+
* One count as the lake gets it: the directory outbox's row shape (`DirectoryLakeRow`), dataset
|
|
76
|
+
* `broker_count_days`, keyed by (day, tenant, app, scope, channel, receiver, outcome). A key's latest
|
|
77
|
+
* version (the greatest `count`) is its count.
|
|
78
|
+
*/
|
|
79
|
+
export interface BrokerLakeRow {
|
|
80
|
+
dataset: 'broker_count_days';
|
|
81
|
+
rowKey: string;
|
|
82
|
+
tenantId: string;
|
|
83
|
+
scopeId: string;
|
|
84
|
+
/** The UTC day counted. */
|
|
85
|
+
at: string;
|
|
86
|
+
/** The outcome counted. */
|
|
87
|
+
kind: BrokerCountOutcome;
|
|
88
|
+
actor: null;
|
|
89
|
+
capturedAt: string;
|
|
90
|
+
/** The count, a JSON object text: `{ day, tenant_id, app, scope_id, channel, receiver, outcome, n }`. */
|
|
91
|
+
row: string;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Where a broker's counts go: a Pipelines stream on the Durable Object, a recorder in a test. Like
|
|
95
|
+
* `DirectoryLakeSink`, `ship` MUST be durable before it resolves: a resolved ship is what marks the
|
|
96
|
+
* counts shipped, and lets a day be dropped.
|
|
97
|
+
*/
|
|
98
|
+
export interface BrokerLakeSink {
|
|
99
|
+
ship(rows: BrokerLakeRow[]): Promise<void>;
|
|
100
|
+
}
|
|
101
|
+
/** The lake rows for some counts of one app's broker. */
|
|
102
|
+
export declare function brokerLakeRows(rows: readonly BrokerCountDay[], app: string, capturedAt: string): BrokerLakeRow[];
|
|
103
|
+
/**
|
|
104
|
+
* Ship one batch of what the lake does not have, and mark it. A sink that throws marks nothing: the
|
|
105
|
+
* rows go again at the next ship. Returns how many rows went.
|
|
106
|
+
*/
|
|
107
|
+
export declare function shipBrokerCounts(sql: BrokerSql, sink: BrokerLakeSink, app: string, now: number): Promise<number>;
|
|
108
|
+
//# sourceMappingURL=broker-counts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"broker-counts.d.ts","sourceRoot":"","sources":["../src/broker-counts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEzE,0CAA0C;AAC1C,MAAM,MAAM,kBAAkB,GAAG,UAAU,GAAG,WAAW,GAAG,SAAS,GAAG,MAAM,GAAG,QAAQ,GAAG,WAAW,GAAG,SAAS,CAAC;AAEpH,eAAO,MAAM,qBAAqB,EAAE,SAAS,kBAAkB,EAAmF,CAAC;AAEnJ;;;GAGG;AACH,eAAO,MAAM,mBAAmB,yBAAyB,CAAC;AAE1D,uFAAuF;AACvF,eAAO,MAAM,oBAAoB,QAAa,CAAC;AAC/C,yFAAyF;AACzF,eAAO,MAAM,sBAAsB,KAAK,CAAC;AACzC,+FAA+F;AAC/F,eAAO,MAAM,qBAAqB,MAAM,CAAC;AACzC,mEAAmE;AACnE,eAAO,MAAM,uBAAuB,MAAM,CAAC;AAE3C,0FAA0F;AAC1F,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,iBAA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AAkB,CAAC;IACzB,KAAK,EAAE,IAAI,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,yGAAyG;IACzG,GAAG,EAAE,MAAM,CAAC;CACb;AAED;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,IAAI,CAAC,IAAI,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5C;AAED,yDAAyD;AACzD,wBAAgB,cAAc,CAAC,IAAI,EAAE,SAAS,cAAc,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,aAAa,EAAE,CAchH;AAED;;;GAGG;AACH,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAMtH"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
export const BROKER_COUNT_OUTCOMES = ['received', 'delivered', 'retried', 'dead', 'resent', 'discarded', 'expired'];
|
|
2
|
+
/**
|
|
3
|
+
* The Pipelines stream binding a broker ships its counts through, on the app's script. No binding, no
|
|
4
|
+
* ship: the counts are kept, bounded by `BROKER_COUNT_MAX_DAYS`, and the lake has none of them.
|
|
5
|
+
*/
|
|
6
|
+
export const BROKER_LAKE_BINDING = 'SUBSTRAT_BROKER_LAKE';
|
|
7
|
+
/** The least time between two ships of one broker's counts: D-77's freshness bound. */
|
|
8
|
+
export const BROKER_COUNT_SHIP_MS = 5 * 60_000;
|
|
9
|
+
/** Days kept once the lake has them all: the current and the previous billing period. */
|
|
10
|
+
export const BROKER_COUNT_KEEP_DAYS = 62;
|
|
11
|
+
/** Days kept whatever the lake has: the bound of a broker that never had a lake to ship to. */
|
|
12
|
+
export const BROKER_COUNT_MAX_DAYS = 400;
|
|
13
|
+
/** Rows one ship carries; a larger backlog follows in the next. */
|
|
14
|
+
export const BROKER_COUNT_SHIP_BATCH = 500;
|
|
15
|
+
/** The UTC day of an epoch-ms instant. */
|
|
16
|
+
export const utcDay = (at) => new Date(at).toISOString().slice(0, 10);
|
|
17
|
+
/** Add counts for the day of `now`. Run inside the transaction that made the decision counted. */
|
|
18
|
+
export function addBrokerCounts(sql, counts, now) {
|
|
19
|
+
const day = utcDay(now);
|
|
20
|
+
for (const c of counts) {
|
|
21
|
+
if (c.n <= 0)
|
|
22
|
+
continue;
|
|
23
|
+
sql.run(`INSERT INTO broker_count_days (day, tenant_id, scope_id, channel, receiver, outcome, n, updated_at)
|
|
24
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?)
|
|
25
|
+
ON CONFLICT (day, tenant_id, scope_id, channel, receiver, outcome)
|
|
26
|
+
DO UPDATE SET n = n + excluded.n, updated_at = excluded.updated_at`, day, c.tenantId, c.scopeId, c.channel, c.receiver, c.outcome, c.n, now);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
const dayOf = (r) => ({
|
|
30
|
+
day: r.day,
|
|
31
|
+
tenantId: r.tenant_id,
|
|
32
|
+
scopeId: r.scope_id,
|
|
33
|
+
channel: r.channel,
|
|
34
|
+
receiver: r.receiver,
|
|
35
|
+
outcome: r.outcome,
|
|
36
|
+
n: Number(r.n),
|
|
37
|
+
shipped: Number(r.shipped_n),
|
|
38
|
+
});
|
|
39
|
+
/** The counts on or after `since` (a UTC day), oldest first: what a billing read or a test asks. */
|
|
40
|
+
export function readBrokerCounts(sql, since = '0000-00-00') {
|
|
41
|
+
return sql
|
|
42
|
+
.all(`SELECT day, tenant_id, scope_id, channel, receiver, outcome, n, shipped_n FROM broker_count_days
|
|
43
|
+
WHERE day >= ? ORDER BY day, tenant_id, scope_id, channel, receiver, outcome`, since)
|
|
44
|
+
.map(dayOf);
|
|
45
|
+
}
|
|
46
|
+
/** The rows the lake does not have all of yet, oldest change first. */
|
|
47
|
+
export function unshippedBrokerCounts(sql, limit = BROKER_COUNT_SHIP_BATCH) {
|
|
48
|
+
return sql
|
|
49
|
+
.all(`SELECT day, tenant_id, scope_id, channel, receiver, outcome, n, shipped_n FROM broker_count_days
|
|
50
|
+
WHERE n > shipped_n ORDER BY updated_at LIMIT ?`, limit)
|
|
51
|
+
.map(dayOf);
|
|
52
|
+
}
|
|
53
|
+
/** Record that the lake has each row up to the count it was shipped with. Never moves one back. */
|
|
54
|
+
export function markBrokerCountsShipped(sql, rows) {
|
|
55
|
+
sql.transaction(() => {
|
|
56
|
+
for (const r of rows) {
|
|
57
|
+
sql.run(`UPDATE broker_count_days SET shipped_n = MAX(shipped_n, ?)
|
|
58
|
+
WHERE day = ? AND tenant_id = ? AND scope_id = ? AND channel = ? AND receiver = ? AND outcome = ?`, r.n, r.day, r.tenantId, r.scopeId, r.channel, r.receiver, r.outcome);
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
/** When the next ship is due: `BROKER_COUNT_SHIP_MS` after the oldest unshipped change, or null with none. */
|
|
63
|
+
export function nextBrokerCountShipAt(sql) {
|
|
64
|
+
const row = sql.all('SELECT MIN(updated_at) AS at FROM broker_count_days WHERE n > shipped_n')[0];
|
|
65
|
+
return row?.at == null ? null : Number(row.at) + BROKER_COUNT_SHIP_MS;
|
|
66
|
+
}
|
|
67
|
+
/** Drop the days the bounds say are kept long enough. Run in the store's prune. */
|
|
68
|
+
export function pruneBrokerCounts(sql, now) {
|
|
69
|
+
const day = (days) => utcDay(now - days * 86_400_000);
|
|
70
|
+
sql.run('DELETE FROM broker_count_days WHERE day < ? AND n = shipped_n', day(BROKER_COUNT_KEEP_DAYS));
|
|
71
|
+
sql.run('DELETE FROM broker_count_days WHERE day < ?', day(BROKER_COUNT_MAX_DAYS));
|
|
72
|
+
}
|
|
73
|
+
/** The lake rows for some counts of one app's broker. */
|
|
74
|
+
export function brokerLakeRows(rows, app, capturedAt) {
|
|
75
|
+
return rows.map((r) => ({
|
|
76
|
+
dataset: 'broker_count_days',
|
|
77
|
+
rowKey: JSON.stringify([r.day, r.tenantId, app, r.scopeId, r.channel, r.receiver, r.outcome]),
|
|
78
|
+
tenantId: r.tenantId,
|
|
79
|
+
scopeId: r.scopeId,
|
|
80
|
+
at: r.day,
|
|
81
|
+
kind: r.outcome,
|
|
82
|
+
actor: null,
|
|
83
|
+
capturedAt,
|
|
84
|
+
row: JSON.stringify({
|
|
85
|
+
day: r.day, tenant_id: r.tenantId, app, scope_id: r.scopeId, channel: r.channel, receiver: r.receiver, outcome: r.outcome, n: r.n,
|
|
86
|
+
}),
|
|
87
|
+
}));
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Ship one batch of what the lake does not have, and mark it. A sink that throws marks nothing: the
|
|
91
|
+
* rows go again at the next ship. Returns how many rows went.
|
|
92
|
+
*/
|
|
93
|
+
export async function shipBrokerCounts(sql, sink, app, now) {
|
|
94
|
+
const rows = unshippedBrokerCounts(sql);
|
|
95
|
+
if (rows.length === 0)
|
|
96
|
+
return 0;
|
|
97
|
+
await sink.ship(brokerLakeRows(rows, app, new Date(now).toISOString()));
|
|
98
|
+
markBrokerCountsShipped(sql, rows);
|
|
99
|
+
return rows.length;
|
|
100
|
+
}
|
|
101
|
+
//# sourceMappingURL=broker-counts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"broker-counts.js","sourceRoot":"","sources":["../src/broker-counts.ts"],"names":[],"mappings":"AA+BA,MAAM,CAAC,MAAM,qBAAqB,GAAkC,CAAC,UAAU,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,CAAC,CAAC;AAEnJ;;;GAGG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,sBAAsB,CAAC;AAE1D,uFAAuF;AACvF,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,GAAG,MAAM,CAAC;AAC/C,yFAAyF;AACzF,MAAM,CAAC,MAAM,sBAAsB,GAAG,EAAE,CAAC;AACzC,+FAA+F;AAC/F,MAAM,CAA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I,IAAI,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,CAAC,CAAC;IAChC,MAAM,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;IACxE,uBAAuB,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;IACnC,OAAO,IAAI,CAAC,MAAM,CAAC;AACrB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"broker-schema.d.ts","sourceRoot":"","sources":["../src/broker-schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEtD,6DAA6D;AAC7D,MAAM,WAAW,gBAAgB;IAC/B,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;CACxC;AAED,eAAO,MAAM,aAAa,EAAE,SAAS,gBAAgB,
|
|
1
|
+
{"version":3,"file":"broker-schema.d.ts","sourceRoot":"","sources":["../src/broker-schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEtD,6DAA6D;AAC7D,MAAM,WAAW,gBAAgB;IAC/B,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;CACxC;AAED,eAAO,MAAM,aAAa,EAAE,SAAS,gBAAgB,EA+OpD,CAAC;AAEF,kFAAkF;AAClF,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,SAAS,GAAG,IAAI,CAWvD"}
|