@substrat-run/kernel 0.135.0 → 0.136.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/async-invocation-log.d.ts +61 -0
- package/dist/async-invocation-log.d.ts.map +1 -0
- package/dist/async-invocation-log.js +149 -0
- package/dist/async-invocation-log.js.map +1 -0
- package/dist/base64url.d.ts +6 -0
- package/dist/base64url.d.ts.map +1 -0
- package/dist/base64url.js +19 -0
- package/dist/base64url.js.map +1 -0
- package/dist/capability.d.ts +2 -0
- package/dist/capability.d.ts.map +1 -1
- package/dist/capability.js +5 -8
- package/dist/capability.js.map +1 -1
- package/dist/carried-copy.d.ts +117 -0
- package/dist/carried-copy.d.ts.map +1 -0
- package/dist/carried-copy.js +134 -0
- package/dist/carried-copy.js.map +1 -0
- package/dist/index.d.ts +93 -14
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +61 -9
- package/dist/index.js.map +1 -1
- package/dist/invocation-log.d.ts +90 -8
- package/dist/invocation-log.d.ts.map +1 -1
- package/dist/invocation-log.js +34 -10
- package/dist/invocation-log.js.map +1 -1
- package/dist/list-index.d.ts +19 -4
- package/dist/list-index.d.ts.map +1 -1
- package/dist/list-index.js +150 -8
- package/dist/list-index.js.map +1 -1
- package/dist/platform-call.d.ts +4 -37
- package/dist/platform-call.d.ts.map +1 -1
- package/dist/platform-call.js +5 -37
- package/dist/platform-call.js.map +1 -1
- package/dist/platform-sweep.d.ts +17 -0
- package/dist/platform-sweep.d.ts.map +1 -1
- package/dist/platform-sweep.js +22 -4
- package/dist/platform-sweep.js.map +1 -1
- package/dist/provider-error.d.ts.map +1 -1
- package/dist/provider-error.js +2 -1
- package/dist/provider-error.js.map +1 -1
- package/dist/routed-node.d.ts +3 -2
- package/dist/routed-node.d.ts.map +1 -1
- package/dist/routed-node.js.map +1 -1
- package/dist/scope-copy.d.ts +122 -0
- package/dist/scope-copy.d.ts.map +1 -0
- package/dist/scope-copy.js +187 -0
- package/dist/scope-copy.js.map +1 -0
- package/dist/scope-host.d.ts +65 -21
- package/dist/scope-host.d.ts.map +1 -1
- package/dist/scope-host.js +5 -14
- package/dist/scope-host.js.map +1 -1
- package/dist/scope-lifecycle.d.ts +70 -0
- package/dist/scope-lifecycle.d.ts.map +1 -0
- package/dist/scope-lifecycle.js +124 -0
- package/dist/scope-lifecycle.js.map +1 -0
- package/package.json +2 -2
package/dist/invocation-log.d.ts
CHANGED
|
@@ -115,11 +115,12 @@ export { invocationLevelOf, type InvocationLevel } from '@substrat-run/contracts
|
|
|
115
115
|
* its scope host as `VerticalScopeHost` rather than importing a concrete adapter: the
|
|
116
116
|
* seam is the shape, not the vendor.
|
|
117
117
|
*
|
|
118
|
-
*
|
|
119
|
-
*
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
*
|
|
118
|
+
* This line belongs with the router-assertion family (`readRoutedNode`,
|
|
119
|
+
* `assertPlatformCall`) — the code that reads what the router asserted about a request —
|
|
120
|
+
* because it is the same family seen from the other end: it writes that assertion down so
|
|
121
|
+
* a reader can find it again. The family is moving from the kernel to `vertical-host`
|
|
122
|
+
* (#1978), which already re-exports it; `vertical-host` keeps its AI SDK behind the
|
|
123
|
+
* `./model` subpath, so a vertical importing this from its root bundles none of it.
|
|
123
124
|
*/
|
|
124
125
|
export interface InvocationLogContext<Env = unknown> {
|
|
125
126
|
req: {
|
|
@@ -183,6 +184,14 @@ export interface InvocationLogOptions<Env = unknown> {
|
|
|
183
184
|
export interface InvocationLogLine {
|
|
184
185
|
/** Discriminator — what lets a reader tell this line from a vertical's own output. */
|
|
185
186
|
substrat: 'invocation';
|
|
187
|
+
/**
|
|
188
|
+
* #1901: what kind of work the line is about. ABSENT on a request's line — the line every
|
|
189
|
+
* reader already knew — and present only on the scope host's lines for async work: a
|
|
190
|
+
* consumer delivery (`consumer`) or a schedule run (`schedule`). A reader treats a missing
|
|
191
|
+
* `kind` as `request`, which keeps every line written before this field existed meaning
|
|
192
|
+
* what it meant.
|
|
193
|
+
*/
|
|
194
|
+
kind?: AsyncInvocationKind;
|
|
186
195
|
tenantId: string;
|
|
187
196
|
scopeId: string | null;
|
|
188
197
|
vertical: string | null;
|
|
@@ -192,9 +201,10 @@ export interface InvocationLogLine {
|
|
|
192
201
|
* null only this writer would produce — one representation across the platform.
|
|
193
202
|
*/
|
|
194
203
|
surface: string | null;
|
|
195
|
-
method
|
|
196
|
-
|
|
197
|
-
|
|
204
|
+
/** The request's method. `null` on an async line (#1901), which no request carried. */
|
|
205
|
+
method: string | null;
|
|
206
|
+
/** Path ONLY — see `pathOf`. `null` on an async line (#1901). */
|
|
207
|
+
path: string | null;
|
|
198
208
|
/**
|
|
199
209
|
* #1237: the id every event this invocation emitted is stamped with.
|
|
200
210
|
*
|
|
@@ -220,6 +230,9 @@ export interface InvocationLogLine {
|
|
|
220
230
|
*
|
|
221
231
|
* `null` therefore survives only for a genuine escape: an error that got past the
|
|
222
232
|
* envelope itself, which `threw` marks.
|
|
233
|
+
*
|
|
234
|
+
* Always `null` on an async line (#1901): no caller received a status. Its `outcome` and
|
|
235
|
+
* `level` say how it ended instead.
|
|
223
236
|
*/
|
|
224
237
|
status: number | null;
|
|
225
238
|
/** The error escaped even `onError` — rare, and the most interesting line on the page. */
|
|
@@ -259,7 +272,76 @@ export interface InvocationLogLine {
|
|
|
259
272
|
* existed. A reader treats absence exactly as it treats `null` elsewhere.
|
|
260
273
|
*/
|
|
261
274
|
outputFields?: OutputFieldsReport;
|
|
275
|
+
/** How the unit ended — see {@link AsyncOutcome}. */
|
|
276
|
+
outcome?: AsyncOutcome;
|
|
277
|
+
/** A consumer's event type. */
|
|
278
|
+
eventType?: string | null;
|
|
279
|
+
/** A consumer's event id — the join to the spine's outbox and delivery journal. */
|
|
280
|
+
eventId?: string | null;
|
|
281
|
+
/** Which attempt at this delivery the line is about, counting from 1. */
|
|
282
|
+
attempt?: number | null;
|
|
283
|
+
/** A schedule run's due time (ISO 8601), or `null` for a schedule's first run. */
|
|
284
|
+
dueAt?: string | null;
|
|
285
|
+
/** How late the run started against `dueAt`, in milliseconds; `null` on a first run. */
|
|
286
|
+
latenessMs?: number | null;
|
|
287
|
+
/** A `suppressed` line's count of the lines the pass's cap withheld. */
|
|
288
|
+
suppressed?: number;
|
|
289
|
+
/** The same count per `<kind>:<outcome>`, so a storm of one outcome is named, not averaged. */
|
|
290
|
+
suppressedBy?: Record<string, number>;
|
|
291
|
+
}
|
|
292
|
+
/** #1901: the kinds of async work a scope host writes a line for. A request has no `kind`. */
|
|
293
|
+
export type AsyncInvocationKind = 'consumer' | 'schedule';
|
|
294
|
+
/**
|
|
295
|
+
* #1901: how a unit of async work ended.
|
|
296
|
+
*
|
|
297
|
+
* - `delivered` — a consumer's handler ran and its delivery is journaled done.
|
|
298
|
+
* - `retrying` — the handler threw and the delivery is due again later.
|
|
299
|
+
* - `dead-lettered` — the delivery is journaled failed for good: the handler threw on its
|
|
300
|
+
* last attempt, or the event never reached it (undecodable, a schema version the consumer
|
|
301
|
+
* does not take, withheld by the producer).
|
|
302
|
+
* - `inert` — a copy of a scope (#2005): the delivery is journaled terminal and NO handler
|
|
303
|
+
* ran. Never `delivered`, because nothing was.
|
|
304
|
+
* - `routed` — the delivery was handed to the platform's drain to run with authority this
|
|
305
|
+
* host lacks (a connector on a control-plane-less host).
|
|
306
|
+
* - `ok` / `failed` — a schedule run.
|
|
307
|
+
* - `suppressed` — the pass's line cap was reached; the line counts what it withheld.
|
|
308
|
+
*/
|
|
309
|
+
export type AsyncOutcome = 'delivered' | 'retrying' | 'dead-lettered' | 'inert' | 'routed' | 'ok' | 'failed' | 'suppressed';
|
|
310
|
+
/**
|
|
311
|
+
* The fields of an invocation line, before defaults. The ONE place the line's grammar lives
|
|
312
|
+
* (#1901): the request writer below and the scope host's async writer both build through
|
|
313
|
+
* {@link invocationLine}, so a field added to one is a field added to both, in one order.
|
|
314
|
+
*/
|
|
315
|
+
export interface InvocationLineFields {
|
|
316
|
+
kind?: AsyncInvocationKind;
|
|
317
|
+
tenantId: string;
|
|
318
|
+
scopeId: string | null;
|
|
319
|
+
vertical?: string | null;
|
|
320
|
+
surface?: string | null;
|
|
321
|
+
method?: string | null;
|
|
322
|
+
path?: string | null;
|
|
323
|
+
invocationId: string;
|
|
324
|
+
status?: number | null;
|
|
325
|
+
threw: boolean;
|
|
326
|
+
durationMs: number;
|
|
327
|
+
level: InvocationLevel;
|
|
328
|
+
operation?: string | null;
|
|
329
|
+
problemCode?: string | null;
|
|
330
|
+
principalKind?: string | null;
|
|
331
|
+
emitted?: EmittedReport;
|
|
332
|
+
/**
|
|
333
|
+
* #1901: write `entities` from `emitted` (the default). An async line passes `false`: an
|
|
334
|
+
* entity id is data a vertical chose — an email, a customer number — and the async line
|
|
335
|
+
* carries ids the platform minted, declared names and codes only. Its `entities` is then
|
|
336
|
+
* always `[]`, which a reader takes as "not recorded" beside a non-null `eventCount`.
|
|
337
|
+
*/
|
|
338
|
+
withEntities?: boolean;
|
|
339
|
+
versionId?: string | null;
|
|
340
|
+
outputFields?: OutputFieldsReport;
|
|
341
|
+
async?: Pick<InvocationLogLine, 'outcome' | 'eventType' | 'eventId' | 'attempt' | 'dueAt' | 'latenessMs' | 'suppressed' | 'suppressedBy'>;
|
|
262
342
|
}
|
|
343
|
+
/** Build a line. Unfilled fields are `null` (or empty), as the line's contract says. */
|
|
344
|
+
export declare function invocationLine(f: InvocationLineFields): InvocationLogLine;
|
|
263
345
|
/**
|
|
264
346
|
* #1893: one request's stamp — the id minted for it and the record the handler chain fills
|
|
265
347
|
* in — shared by whichever layer started it.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invocation-log.d.ts","sourceRoot":"","sources":["../src/invocation-log.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AAGH,OAAO,EAIL,KAAK,eAAe,EACrB,MAAM,2CAA2C,CAAC;AAGnD,OAAO,KAAK,EAA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AE,eAAe,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,OAAO,KAAK;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC/G,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B;AAKD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,GAAG,OAAO,EAC7C,MAAM,EAAE,YAAY,CAAC,GAAG,CAAC,EACzB,OAAO,GAAE,oBAAoB,CAAC,GAAG,CAAM,GACtC,YAAY,CAAC,GAAG,CAAC,CA8BnB"}
|
package/dist/invocation-log.js
CHANGED
|
@@ -68,6 +68,34 @@ export const INVOCATION_RECORD_KEY = 'substratInvocationRecord';
|
|
|
68
68
|
// The level and its type moved to contracts in #1904 — the router files its datapoint under
|
|
69
69
|
// the same level — and stay exported from here, where every caller already reads them.
|
|
70
70
|
export { invocationLevelOf } from '@substrat-run/contracts/invocation-record';
|
|
71
|
+
/** Build a line. Unfilled fields are `null` (or empty), as the line's contract says. */
|
|
72
|
+
export function invocationLine(f) {
|
|
73
|
+
const emitted = f.emitted;
|
|
74
|
+
return {
|
|
75
|
+
substrat: 'invocation',
|
|
76
|
+
...(f.kind ? { kind: f.kind } : {}),
|
|
77
|
+
tenantId: f.tenantId,
|
|
78
|
+
scopeId: f.scopeId,
|
|
79
|
+
vertical: f.vertical ?? null,
|
|
80
|
+
surface: f.surface ?? null,
|
|
81
|
+
method: f.method ?? null,
|
|
82
|
+
path: f.path ?? null,
|
|
83
|
+
status: f.status ?? null,
|
|
84
|
+
threw: f.threw,
|
|
85
|
+
durationMs: f.durationMs,
|
|
86
|
+
invocationId: f.invocationId,
|
|
87
|
+
level: f.level,
|
|
88
|
+
operation: f.operation ?? null,
|
|
89
|
+
problemCode: f.problemCode ?? null,
|
|
90
|
+
principalKind: f.principalKind ?? null,
|
|
91
|
+
eventCount: emitted ? emitted.total : null,
|
|
92
|
+
eventTypes: emitted ? distinct(emitted.events.map((e) => e.type)) : [],
|
|
93
|
+
entities: emitted && f.withEntities !== false ? distinct(emitted.events.map((e) => e.entity)) : [],
|
|
94
|
+
versionId: f.versionId ?? null,
|
|
95
|
+
...(f.outputFields ? { outputFields: f.outputFields } : {}),
|
|
96
|
+
...(f.async ?? {}),
|
|
97
|
+
};
|
|
98
|
+
}
|
|
71
99
|
/** Distinct values, first occurrence wins — the order a reader expects to see them in. */
|
|
72
100
|
function distinct(values) {
|
|
73
101
|
return [...new Set(values)];
|
|
@@ -160,9 +188,7 @@ function writeLineOrThrow(stamp, done, options) {
|
|
|
160
188
|
if (!node)
|
|
161
189
|
return;
|
|
162
190
|
const { record, invocationId } = stamp;
|
|
163
|
-
const
|
|
164
|
-
const line = {
|
|
165
|
-
substrat: 'invocation',
|
|
191
|
+
const line = invocationLine({
|
|
166
192
|
tenantId: node.tenantId,
|
|
167
193
|
scopeId: node.scopeId,
|
|
168
194
|
vertical: node.verticalSlug,
|
|
@@ -174,15 +200,13 @@ function writeLineOrThrow(stamp, done, options) {
|
|
|
174
200
|
durationMs: Date.now() - done.started,
|
|
175
201
|
invocationId,
|
|
176
202
|
level: invocationLevelOf(done.status, done.threw, record.problemCode),
|
|
177
|
-
operation: record.operation
|
|
178
|
-
problemCode: record.problemCode
|
|
179
|
-
principalKind: record.principalKind
|
|
180
|
-
|
|
181
|
-
eventTypes: emitted ? distinct(emitted.events.map((e) => e.type)) : [],
|
|
182
|
-
entities: emitted ? distinct(emitted.events.map((e) => e.entity)) : [],
|
|
203
|
+
operation: record.operation,
|
|
204
|
+
problemCode: record.problemCode,
|
|
205
|
+
principalKind: record.principalKind,
|
|
206
|
+
...(record.emitted ? { emitted: record.emitted } : {}),
|
|
183
207
|
versionId: versionIdOf(done.env),
|
|
184
208
|
...(record.outputFields ? { outputFields: record.outputFields } : {}),
|
|
185
|
-
};
|
|
209
|
+
});
|
|
186
210
|
console.log(JSON.stringify(line));
|
|
187
211
|
}
|
|
188
212
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invocation-log.js","sourceRoot":"","sources":["../src/invocation-log.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AACH,sFAAsF;AACtF,+EAA+E;AAC/E,OAAO,EACL,sBAAsB,EACtB,wBAAwB,EACxB,iBAAiB,GAElB,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAIxE;;;;GAIG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,0BAA0B,CAAC;AA+ChE,4FAA4F;AAC5F,uFAAuF;AACvF,OAAO,EAAE,iBAAiB,EAAwB,MAAM,2CAA2C,CAAC;
|
|
1
|
+
{"version":3,"file":"invocation-log.js","sourceRoot":"","sources":["../src/invocation-log.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AACH,sFAAsF;AACtF,+EAA+E;AAC/E,OAAO,EACL,sBAAsB,EACtB,wBAAwB,EACxB,iBAAiB,GAElB,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAIxE;;;;GAIG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,0BAA0B,CAAC;AA+ChE,4FAA4F;AAC5F,uFAAuF;AACvF,OAAO,EAAE,iBAAiB,EAAwB,MAAM,2CAA2C,CAAC;AAqQpG,wFAAwF;AACxF,MAAM,UAAU,cAAc,CAAC,CAAuB;IACpD,MAAM,OAAO,GAAG,CAAC,CAAC,OAAO,CAAC;IA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AM,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QAC/H,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
|
package/dist/list-index.d.ts
CHANGED
|
@@ -38,9 +38,10 @@
|
|
|
38
38
|
* skipped, because `status > 'open'` excludes its own ties. So every walk here
|
|
39
39
|
* is over `(sortColumn, idColumn)` and the cursor is composite — which is the
|
|
40
40
|
* `|`-joined form `pagination.ts` already pins ("first part always `|`-free").
|
|
41
|
-
* Where the sort column IS the id, the pair collapses and the cursor
|
|
42
|
-
*
|
|
41
|
+
* Where the sort column IS the id, the pair collapses and the cursor carries the
|
|
42
|
+
* id alone (its envelope has no separate `id`, K-44).
|
|
43
43
|
*/
|
|
44
|
+
import { SubstratError } from '@substrat-run/contracts';
|
|
44
45
|
import type { SqlMigration } from './scope-host.js';
|
|
45
46
|
/**
|
|
46
47
|
* One paged read's kernel-composed half, as the kernel needs it.
|
|
@@ -187,8 +188,22 @@ export declare function splitCursor(cursor: string): {
|
|
|
187
188
|
value: string;
|
|
188
189
|
id: string | undefined;
|
|
189
190
|
};
|
|
190
|
-
/**
|
|
191
|
-
|
|
191
|
+
/**
|
|
192
|
+
* Raised for a cursor this walk cannot continue (#2001): one minted under a
|
|
193
|
+
* different order or sort, or one `ctx.page` never minted at all.
|
|
194
|
+
*
|
|
195
|
+
* A keyset position only means something in the walk that produced it. Replayed
|
|
196
|
+
* under the other order, `created_at < ?` becomes `created_at > ?` over the same
|
|
197
|
+
* value and the "next" page is the rows the caller has already seen — a silent
|
|
198
|
+
* answer that reads as a working list. So the cursor names its walk, and a
|
|
199
|
+
* disagreement is the caller's 400, narrowed by `reason: 'cursor_restart'` so a
|
|
200
|
+
* client can tell "read the first page again" from a malformed request.
|
|
201
|
+
*/
|
|
202
|
+
export declare class CursorMismatch extends SubstratError {
|
|
203
|
+
constructor(message: string);
|
|
204
|
+
}
|
|
205
|
+
/** Build the cursor a row hands to the next page — the walk that minted it, and where. */
|
|
206
|
+
export declare function cursorOf(row: Record<string, unknown>, sortColumn: string, idColumn: string, order: 'asc' | 'desc'): string;
|
|
192
207
|
/**
|
|
193
208
|
* Compose the page query and its count.
|
|
194
209
|
*
|
package/dist/list-index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-index.d.ts","sourceRoot":"","sources":["../src/list-index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"list-index.d.ts","sourceRoot":"","sources":["../src/list-index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,OAAO,EAAuB,aAAa,EAAmB,MAAM,yBAAyB,CAAC;AAE9F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAKpD;;;;;;GAMG;AACH,MAAM,WAAW,eAAe;IAC9B,iDAAiD;IACjD,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,8DAA8D;IAC9D,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,kDAAkD;IAClD,QAAQ,CAAC,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACxC,mCAAmC;IACnC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,0EAA0E;AAC1E,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC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GAMG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAIrF;AAED;;;;;;;;;;GAUG;AACH,qBAAa,cAAe,SAAQ,aAAa;IAC/C,YAAY,OAAO,EAAE,MAAM,EAI1B;CACF;AAsBD,0FAA0F;AAC1F,wBAAgB,QAAQ,CACtB,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC5B,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,KAAK,GAAG,MAAM,GACpB,MAAM,CASR;AAqED;;;;;;;;;GASG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,aAAa,EAAE,MAAM,EAAE,eAAe,GAAG,iBAAiB,CAkFzF"}
|
package/dist/list-index.js
CHANGED
|
@@ -1,3 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* List indexes and the queries that use them, derived from a paged read's
|
|
3
|
+
* `paged.over` declaration (#811, K-18).
|
|
4
|
+
*
|
|
5
|
+
* K-18 promised *"engine list APIs accept registry-declared filter/sort
|
|
6
|
+
* predicates with correct pagination and counts, the kernel composing the join
|
|
7
|
+
* inside the scope DB"* and nothing implemented it. This is that, and it takes
|
|
8
|
+
* the same shape `searchables` took in #827 for the same reasons.
|
|
9
|
+
*
|
|
10
|
+
* ## Why the kernel owns this rather than a helper in contracts
|
|
11
|
+
*
|
|
12
|
+
* A fragment builder in `@substrat-run/contracts` could emit a correct
|
|
13
|
+
* `WHERE status = ?` and a correct keyset comparison. It could not create the
|
|
14
|
+
* INDEX behind either, because contracts sits below the migration machinery and
|
|
15
|
+
* has no way to reach a scope's DDL. A declared filter with no index is a table
|
|
16
|
+
* scan that passes every test, survives review, and degrades when one tenant's
|
|
17
|
+
* table grows — the same delayed bug an unbounded list read is.
|
|
18
|
+
*
|
|
19
|
+
* That is what K-18 means by filter, sort key and index being *one declared
|
|
20
|
+
* thing*: the third one is the reason it has to be here.
|
|
21
|
+
*
|
|
22
|
+
* ## What is derived, and what stays the handler's
|
|
23
|
+
*
|
|
24
|
+
* | Kernel | Handler |
|
|
25
|
+
* |---|---|
|
|
26
|
+
* | `WHERE` from declared filters, `ORDER BY` from the chosen sort, the keyset comparison, `LIMIT`, and the `COUNT` over the same `WHERE` | The projection, and any hydration — a `toWorkOrder`, a per-row aggregate, a second query for children |
|
|
27
|
+
* | The indexes behind those, emitted as migrations and refused if unindexable | The permission check, which nothing on `ctx` ever does |
|
|
28
|
+
*
|
|
29
|
+
* The handler still writes its own `SELECT`, so this is not the generated-CRUD
|
|
30
|
+
* layer `generated-verticals.md` §4 says does not exist: it invents no routes and
|
|
31
|
+
* no handlers. It stops eleven call sites hand-writing the same cursor branch and
|
|
32
|
+
* the same duplicated count `WHERE`.
|
|
33
|
+
*
|
|
34
|
+
* ## The tie-break, which is not optional
|
|
35
|
+
*
|
|
36
|
+
* A keyset walk over a NON-UNIQUE column drops and duplicates rows: order
|
|
37
|
+
* `status ASC` with a cursor of `'open'` and every remaining `open` row is
|
|
38
|
+
* skipped, because `status > 'open'` excludes its own ties. So every walk here
|
|
39
|
+
* is over `(sortColumn, idColumn)` and the cursor is composite — which is the
|
|
40
|
+
* `|`-joined form `pagination.ts` already pins ("first part always `|`-free").
|
|
41
|
+
* Where the sort column IS the id, the pair collapses and the cursor carries the
|
|
42
|
+
* id alone (its envelope has no separate `id`, K-44).
|
|
43
|
+
*/
|
|
44
|
+
import { PAGE_CURSOR_RESTART, SubstratError, ULID_PATTERN, z } from '@substrat-run/contracts';
|
|
45
|
+
import { fromBase64url, toBase64url } from './base64url.js';
|
|
1
46
|
/** The prefix every derived list index carries. */
|
|
2
47
|
export const LIST_INDEX_PREFIX = '_substrat_list_';
|
|
3
48
|
/** Is this index one the kernel derived for a paged read? */
|
|
@@ -212,12 +257,109 @@ export function splitCursor(cursor) {
|
|
|
212
257
|
return { value: cursor, id: undefined };
|
|
213
258
|
return { value: cursor.slice(0, at), id: cursor.slice(at + 1) };
|
|
214
259
|
}
|
|
215
|
-
/**
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
260
|
+
/**
|
|
261
|
+
* Raised for a cursor this walk cannot continue (#2001): one minted under a
|
|
262
|
+
* different order or sort, or one `ctx.page` never minted at all.
|
|
263
|
+
*
|
|
264
|
+
* A keyset position only means something in the walk that produced it. Replayed
|
|
265
|
+
* under the other order, `created_at < ?` becomes `created_at > ?` over the same
|
|
266
|
+
* value and the "next" page is the rows the caller has already seen — a silent
|
|
267
|
+
* answer that reads as a working list. So the cursor names its walk, and a
|
|
268
|
+
* disagreement is the caller's 400, narrowed by `reason: 'cursor_restart'` so a
|
|
269
|
+
* client can tell "read the first page again" from a malformed request.
|
|
270
|
+
*/
|
|
271
|
+
export class CursorMismatch extends SubstratError {
|
|
272
|
+
constructor(message) {
|
|
273
|
+
// A SEMANTIC refusal, so no `errors` list: that list is what marks a parse failure,
|
|
274
|
+
// and `toProblem` would trade this sentence and its reason for "did not parse".
|
|
275
|
+
super('validation_failed', message, { reason: PAGE_CURSOR_RESTART });
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* The cursor `ctx.page` mints: base64url of `{ v: 1, order, sort, value, id? }` (K-44).
|
|
280
|
+
*
|
|
281
|
+
* Opaque and versioned, and **distinct from a pre-#2001 cursor by construction**, not by
|
|
282
|
+
* a guess at what a sort value might look like. A legacy cursor is either `<value>|<id>`,
|
|
283
|
+
* which carries a `|` that base64url never emits, or a bare ULID, whose first character
|
|
284
|
+
* (a timestamp digit) can never decode to the `{` an envelope always starts with. A
|
|
285
|
+
* readable prefix such as `asc.name.` could not promise that: a row named `asc.name.foo`
|
|
286
|
+
* minted exactly that legacy cursor (#2018 review).
|
|
287
|
+
*
|
|
288
|
+
* `id` is present exactly when the walk sorts by something other than the id itself.
|
|
289
|
+
*/
|
|
290
|
+
const cursorEnvelope = z.strictObject({
|
|
291
|
+
v: z.literal(1),
|
|
292
|
+
order: z.enum(['asc', 'desc']),
|
|
293
|
+
sort: z.string().regex(IDENTIFIER),
|
|
294
|
+
value: z.string(),
|
|
295
|
+
id: z.string().optional(),
|
|
296
|
+
});
|
|
297
|
+
/** Build the cursor a row hands to the next page — the walk that minted it, and where. */
|
|
298
|
+
export function cursorOf(row, sortColumn, idColumn, order) {
|
|
299
|
+
const envelope = {
|
|
300
|
+
v: 1,
|
|
301
|
+
order,
|
|
302
|
+
sort: sortColumn,
|
|
303
|
+
value: String(row[sortColumn] ?? ''),
|
|
304
|
+
...(sortColumn === idColumn ? {} : { id: String(row[idColumn] ?? '') }),
|
|
305
|
+
};
|
|
306
|
+
return toBase64url(new TextEncoder().encode(JSON.stringify(envelope)));
|
|
307
|
+
}
|
|
308
|
+
/** The envelope a cursor decodes to, or `undefined` when it is not one — every field checked. */
|
|
309
|
+
function envelopeOf(cursor) {
|
|
310
|
+
const bytes = fromBase64url(cursor);
|
|
311
|
+
if (!bytes)
|
|
312
|
+
return undefined;
|
|
313
|
+
try {
|
|
314
|
+
return cursorEnvelope.parse(JSON.parse(new TextDecoder('utf-8', { fatal: true }).decode(bytes)));
|
|
315
|
+
}
|
|
316
|
+
catch {
|
|
317
|
+
return undefined;
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
/**
|
|
321
|
+
* A pre-#2001 cursor, recognised only by its exact old shape: `<value>|<id>` with the
|
|
322
|
+
* id a ULID, or — for a walk sorted by the id itself — the bare ULID. Split on the LAST
|
|
323
|
+
* `|`, which a ULID cannot contain, so a value that holds one still comes back whole.
|
|
324
|
+
*/
|
|
325
|
+
function legacyPositionOf(cursor, plan, sortColumn) {
|
|
326
|
+
if (sortColumn === plan.idColumn)
|
|
327
|
+
return ULID_PATTERN.test(cursor) ? { value: cursor, id: undefined } : undefined;
|
|
328
|
+
const at = cursor.lastIndexOf('|');
|
|
329
|
+
if (at === -1)
|
|
330
|
+
return undefined;
|
|
331
|
+
const id = cursor.slice(at + 1);
|
|
332
|
+
return ULID_PATTERN.test(id) ? { value: cursor.slice(0, at), id } : undefined;
|
|
333
|
+
}
|
|
334
|
+
/**
|
|
335
|
+
* The position a cursor holds in THIS walk, or a refusal.
|
|
336
|
+
*
|
|
337
|
+
* An envelope is continued only in the walk it names. A legacy cursor was minted under
|
|
338
|
+
* the ONLY default there was — ascending, by the first declared sort — so it is continued
|
|
339
|
+
* exactly there (an in-flight walk survives the deploy) and refused anywhere else, which
|
|
340
|
+
* is where it would replay silently: under a newly honoured `desc` default above all.
|
|
341
|
+
* Anything that is neither is refused too. Every refusal is the same `cursor_restart`.
|
|
342
|
+
*/
|
|
343
|
+
function positionIn(cursor, plan, sortColumn, order) {
|
|
344
|
+
const envelope = envelopeOf(cursor);
|
|
345
|
+
if (envelope) {
|
|
346
|
+
if (envelope.order !== order || envelope.sort !== sortColumn) {
|
|
347
|
+
throw new CursorMismatch(`list: this cursor continues a walk by '${envelope.sort}' ${envelope.order}, and this request ` +
|
|
348
|
+
`asks for '${sortColumn}' ${order} — keep the sort and order the first page was read with, ` +
|
|
349
|
+
'or restart paging from the first page, without a cursor');
|
|
350
|
+
}
|
|
351
|
+
if ((envelope.id === undefined) !== (sortColumn === plan.idColumn)) {
|
|
352
|
+
throw new CursorMismatch('list: this cursor is malformed — restart paging from the first page, without a cursor');
|
|
353
|
+
}
|
|
354
|
+
return { value: envelope.value, id: envelope.id };
|
|
355
|
+
}
|
|
356
|
+
const legacy = legacyPositionOf(cursor, plan, sortColumn);
|
|
357
|
+
if (legacy && order === 'asc' && sortColumn === plan.sortable[0])
|
|
358
|
+
return legacy;
|
|
359
|
+
throw new CursorMismatch(legacy
|
|
360
|
+
? `list: this cursor predates the walk it is replayed in ('${sortColumn}' ${order}) — ` +
|
|
361
|
+
'restart paging from the first page, without a cursor'
|
|
362
|
+
: 'list: this cursor was not minted by this list — restart paging from the first page, without a cursor');
|
|
221
363
|
}
|
|
222
364
|
/**
|
|
223
365
|
* Compose the page query and its count.
|
|
@@ -283,8 +425,8 @@ export function listQuery(plan, params) {
|
|
|
283
425
|
const countParams = [...args];
|
|
284
426
|
const cmp = order === 'asc' ? '>' : '<';
|
|
285
427
|
if (params.cursor !== undefined && params.cursor !== '') {
|
|
286
|
-
const { value, id } =
|
|
287
|
-
if (
|
|
428
|
+
const { value, id } = positionIn(params.cursor, plan, sortColumn, order);
|
|
429
|
+
if (id === undefined) {
|
|
288
430
|
where.push(`${sortColumn} ${cmp} ?`);
|
|
289
431
|
args.push(value);
|
|
290
432
|
}
|
package/dist/list-index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-index.js","sourceRoot":"","sources":["../src/list-index.ts"],"names":[],"mappings":"AA4EA,mDAAmD;AACnD,MAAM,CAAC,MAAM,iBAAiB,GAAG,iBAAiB,CAAC;AAEnD,6DAA6D;AAC7D,MAAM,UAAU,eAAe,CAAC,IAAY;IAC1C,OAAO,IAAI,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAC;AAC5C,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,GAAG,0BAA0B,CAAC;AAE9C,SAAS,gBAAgB,CAAC,IAAY,EAAE,KAAa,EAAE,KAAa;IAClE,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QAC5B,MAAM,IAAI,KAAK,CAAC,SAAS,KAAK,UAAU,IAAI,KAAK,KAAK,wCAAwC,CAAC,CAAC;IAClG,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,+FAA+F;AAC/F,SAAS,IAAI,CAAC,KAAa;IACzB,OAAO,KAAK;SACT,OAAO,CAAC,gBAAgB,EAAE,GAAG,CAAC;SAC9B,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC;SACvB,WAAW,EAAE,CAAC;AACnB,CAAC;AAED,+EAA+E;AAC/E,MAAM,OAAO,WAAY,SAAQ,KAAK;I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E;YACtE,0DAA0D;YAC1D,KAAK,CAAC,IAAI,CAAC,IAAI,UAAU,IAAI,GAAG,UAAU,UAAU,YAAY,IAAI,CAAC,QAAQ,IAAI,GAAG,MAAM,CAAC,CAAC;YAC5F,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC;QAC9B,CAAC;IACH,CAAC;IACD,MAAM,WAAW,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,UAAU,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IACxE,MAAM,SAAS,GAAG,KAAK,KAAK,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC;IACnD,MAAM,OAAO,GACX,UAAU,KAAK,IAAI,CAAC,QAAQ;QAC1B,CAAC,CAAC,aAAa,UAAU,IAAI,SAAS,EAAE;QACxC,CAAC,CAAC,aAAa,UAAU,IAAI,SAAS,KAAK,IAAI,CAAC,QAAQ,IAAI,SAAS,EAAE,CAAC;IAC5E,OAAO;QACL,GAAG,EAAE,iBAAiB,IAAI,CAAC,KAAK,GAAG,WAAW,GAAG,OAAO,UAAU;QAClE,MAAM,EAAE,CAAC,GAAG,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC;QAC/B,QAAQ,EAAE,6BAA6B,IAAI,CAAC,KAAK,GAAG,UAAU,EAAE;QAChE,WAAW;QACX,UAAU;QACV,KAAK;KACN,CAAC;AACJ,CAAC"}
|
package/dist/platform-call.d.ts
CHANGED
|
@@ -7,9 +7,10 @@ import type { ScopeStubOptions } from './scope-host.js';
|
|
|
7
7
|
* exist and tells the vertical to create it, because only the vertical can create a
|
|
8
8
|
* usable scope DO. This is the vertical's side of that call.
|
|
9
9
|
*
|
|
10
|
-
* It
|
|
11
|
-
*
|
|
12
|
-
*
|
|
10
|
+
* It is shared code for the same reason `readRoutedNode` is — five verticals each
|
|
11
|
+
* re-deriving how to trust a header is five chances to get it wrong, and the one that
|
|
12
|
+
* gets it wrong is not obviously broken. Both are moving from the kernel to
|
|
13
|
+
* `vertical-host` (#1978), which already re-exports them.
|
|
13
14
|
*
|
|
14
15
|
* Note the direction. `readRoutedNode` answers "which tenant is this request for",
|
|
15
16
|
* and a request with no assertion is legitimate (a standalone deploy). This answers
|
|
@@ -22,40 +23,6 @@ export declare class PlatformCallError extends Error {
|
|
|
22
23
|
}
|
|
23
24
|
/** Constant-time compare, so a wrong secret leaks nothing through timing. */
|
|
24
25
|
export declare function secretMatches(presented: string | null, expected: string): boolean;
|
|
25
|
-
/** The header the platform presents. */
|
|
26
|
-
export declare const PLATFORM_SECRET_HEADER = "x-substrat-platform";
|
|
27
|
-
/**
|
|
28
|
-
* The RESPONSE header carrying an attachment's metadata record when the vertical
|
|
29
|
-
* hands its bytes back over the connector seam (#711).
|
|
30
|
-
*
|
|
31
|
-
* The bytes are the body — a rendered contract is megabytes, and base64 in a JSON
|
|
32
|
-
* envelope would inflate and re-encode it on both ends for nothing. The record is
|
|
33
|
-
* small, fixed-shape and needs no streaming, so it rides a header. Not a secret and
|
|
34
|
-
* not a privilege: the caller has already passed the platform-secret gate, and the
|
|
35
|
-
* far end has already run the permission check that decided it may see any of this.
|
|
36
|
-
*/
|
|
37
|
-
export declare const CONNECTOR_ATTACHMENT_RECORD_HEADER = "x-substrat-attachment";
|
|
38
|
-
/**
|
|
39
|
-
* The RESPONSE header a vertical sets when the operation it just ran enqueued
|
|
40
|
-
* platform requests (`ctx.requestPlatform`). The router — the one hop that sees
|
|
41
|
-
* every response — reads it and kicks an immediate drain of that scope (#381),
|
|
42
|
-
* so provisioning settles in seconds instead of at the sweep. Carries no payload
|
|
43
|
-
* and no privilege: a forged or spurious flag costs the platform one wasted
|
|
44
|
-
* pull, nothing more. Fed by `ScopeStubOptions.onPlatformRequests` (#458).
|
|
45
|
-
*/
|
|
46
|
-
export declare const PLATFORM_REQUEST_HEADER = "x-substrat-platform-request";
|
|
47
|
-
/**
|
|
48
|
-
* The RESPONSE header a vertical sets when the operation it just ran committed an event of a
|
|
49
|
-
* type this deployment EXPORTS to other verticals (#1705). The router reads it beside
|
|
50
|
-
* {@link PLATFORM_REQUEST_HEADER} and asks the control plane to run this producer's outgoing
|
|
51
|
-
* edges now, so a consumer in another vertical receives the event in seconds rather than at
|
|
52
|
-
* the next sweep. Like its sibling it carries no payload and no privilege: the control plane
|
|
53
|
-
* takes the tenant and scope from the route the router resolved, never from the response, and a
|
|
54
|
-
* spurious flag costs one pass over that producer's own edges. The router strips every
|
|
55
|
-
* `x-substrat-*` header from an inbound request, so only a response can raise it. Fed by
|
|
56
|
-
* `ScopeStubOptions.onExportedEvents`.
|
|
57
|
-
*/
|
|
58
|
-
export declare const EXPORTED_EVENTS_HEADER = "x-substrat-exported-events";
|
|
59
26
|
/**
|
|
60
27
|
* Both kick flags as the stub options that raise them (#1705 PR 2): spread into `getScope`'s
|
|
61
28
|
* options with the handler's header setter. One call per worker rather than one line per flag,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform-call.d.ts","sourceRoot":"","sources":["../src/platform-call.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"platform-call.d.ts","sourceRoot":"","sources":["../src/platform-call.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAOxD;;;;;;;;;;;;;;;;;GAiBG;AAEH,mEAAmE;AACnE,qBAAa,iBAAkB,SAAQ,KAAK;CAAG;AAE/C,6EAA6E;AAC7E,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAOjF;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CACvB,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,GAC/C,IAAI,CAAC,gBAAgB,EAAE,oBAAoB,GAAG,kBAAkB,CAAC,CAKnE;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,YAAY,EACrB,OAAO,GAAE;IAAE,cAAc,CAAC,EAAE,MAAM,CAAA;CAAO,GACxC,IAAI,CAQN"}
|