@substrat-run/adapter-cloudflare 0.213.0 → 0.214.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/control-plane-do.d.ts +89 -6
- package/dist/control-plane-do.d.ts.map +1 -1
- package/dist/control-plane-do.js +297 -9
- package/dist/control-plane-do.js.map +1 -1
- package/dist/directory-split-inventory.d.ts +2 -2
- package/dist/directory-split-inventory.d.ts.map +1 -1
- package/dist/directory-split-inventory.js +8 -2
- package/dist/directory-split-inventory.js.map +1 -1
- package/dist/host.d.ts +3 -2
- package/dist/host.d.ts.map +1 -1
- package/dist/host.js +3 -2
- package/dist/host.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/reconcile-on-wake.d.ts +35 -0
- package/dist/reconcile-on-wake.d.ts.map +1 -0
- package/dist/reconcile-on-wake.js +75 -0
- package/dist/reconcile-on-wake.js.map +1 -0
- package/dist/route-read-model-publisher.d.ts +171 -0
- package/dist/route-read-model-publisher.d.ts.map +1 -0
- package/dist/route-read-model-publisher.js +524 -0
- package/dist/route-read-model-publisher.js.map +1 -0
- package/dist/route-read-model.d.ts +166 -0
- package/dist/route-read-model.d.ts.map +1 -0
- package/dist/route-read-model.js +195 -0
- package/dist/route-read-model.js.map +1 -0
- package/dist/route-resolver.d.ts +41 -3
- package/dist/route-resolver.d.ts.map +1 -1
- package/dist/route-resolver.js +58 -3
- package/dist/route-resolver.js.map +1 -1
- package/dist/scope-do.d.ts.map +1 -1
- package/dist/scope-do.js +38 -2
- package/dist/scope-do.js.map +1 -1
- package/package.json +9 -9
package/dist/index.d.ts
CHANGED
|
@@ -34,6 +34,7 @@ export type { D1TenantStores, D1TenantStoresOptions } from './d1.js';
|
|
|
34
34
|
export { blobStoreBucketName, createR2BlobStores, r2TenantBlobStore, } from './r2.js';
|
|
35
35
|
export type { R2BlobStores, R2BlobStoresOptions } from './r2.js';
|
|
36
36
|
export { createRouteResolver } from './route-resolver.js';
|
|
37
|
+
export { routeEntryKey, routeEntryOf, servingPolicyEntryKey, servingPolicyEntryOf, sqlPublishedLedger, writeRouteReadModelEntry, type PublishedLedger, type RouteKvWriter, type RouteReadModelKey, type RouteSourceFields, } from './route-read-model-publisher.js';
|
|
37
38
|
export type { RouteResolver } from './route-resolver.js';
|
|
38
39
|
export type { ControlPlaneReader, DoCheckerDeps } from './checker.js';
|
|
39
40
|
export { cloudflareClientContext, cloudflareGeo } from './client-context.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAChD,YAAY,EACV,0BAA0B,EAC1B,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACpB,sBAAsB,EACtB,oBAAoB,EACpB,sBAAsB,EACtB,mBAAmB,EACnB,uBAAuB,GACxB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,YAAY,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAEhE,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,oBAAoB,EACpB,uBAAuB,EACvB,YAAY,EACZ,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,KAAK,mBAAmB,EAAE,KAAK,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,0BAA0B,CAAC;AACrJ,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAA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AAuB,EACvB,uBAAuB,GACxB,MAAM,SAAS,CAAC;AACjB,YAAY,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AACrE,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,SAAS,CAAC;AACjB,YAAY,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAG1D,OAAO,EACL,aAAa,EACb,YAAY,EACZ,qBAAqB,EACrB,oBAAoB,EACpB,kBAAkB,EAClB,wBAAwB,EACxB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,GACvB,MAAM,iCAAiC,CAAC;AACzC,YAAY,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,YAAY,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AACtE,OAAO,EAAE,uBAAuB,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAC7E,YAAY,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,EACL,oCAAoC,EACpC,gCAAgC,EAChC,sBAAsB,GACvB,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -31,6 +31,9 @@ export { defineScopeSweeperDO, SCOPE_SWEEPER_NAME } from './scope-sweeper-do.js'
|
|
|
31
31
|
export { createD1TenantStores, d1TenantRelationalStore, tenantStoreDatabaseName, } from './d1.js';
|
|
32
32
|
export { blobStoreBucketName, createR2BlobStores, r2TenantBlobStore, } from './r2.js';
|
|
33
33
|
export { createRouteResolver } from './route-resolver.js';
|
|
34
|
+
// #3395: the routing read model's one projection writer and its entry builders, for every source
|
|
35
|
+
// that will feed it (the directory today; the registry and per-tenant objects after K-68's split).
|
|
36
|
+
export { routeEntryKey, routeEntryOf, servingPolicyEntryKey, servingPolicyEntryOf, sqlPublishedLedger, writeRouteReadModelEntry, } from './route-read-model-publisher.js';
|
|
34
37
|
export { cloudflareClientContext, cloudflareGeo } from './client-context.js';
|
|
35
38
|
// #1978: moved here from the kernel — the hosted connector-call recorder.
|
|
36
39
|
export { analyticsEngineConnectorCallRecorder, CONNECTOR_CALL_DATA_POINT_LAYOUT, connectorCallDataPoint, } from './connector-calls.js';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAYhD,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD,uGAAuG;AACvG,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,oBAAoB,EACpB,uBAAuB,EACvB,YAAY,EACZ,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAiE,MAAM,0BAA0B,CAAC;AACrJ,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAC1F,6FAA6F;AAC7F,OAAO,EACL,qBAAqB,EACrB,iBAAiB,EACjB,6BAA6B,GAK9B,MAAM,wBAAwB,CAAC;AAEhC,wEAAwE;AACxE,OAAO,EAAE,eAAe,EAAgF,MAAM,kBAAkB,CAAC;AACjI,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE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;AAEjB,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,iGAAiG;AACjG,mGAAmG;AACnG,OAAO,EACL,aAAa,EACb,YAAY,EACZ,qBAAqB,EACrB,oBAAoB,EACpB,kBAAkB,EAClB,wBAAwB,GAKzB,MAAM,iCAAiC,CAAC;AAGzC,OAAO,EAAE,uBAAuB,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAE7E,0EAA0E;AAC1E,OAAO,EACL,oCAAoC,EACpC,gCAAgC,EAChC,sBAAsB,GACvB,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/** The `_substrat_meta` key holding the version this scope last asked a reconcile for. */
|
|
2
|
+
export declare const RECONCILE_ASKED_KEY = "reconcile_asked_for";
|
|
3
|
+
/** Who a `provision-reconcile` intent is requested by: the scope's host, never a person. */
|
|
4
|
+
export declare const RECONCILE_ON_WAKE_REQUESTED_BY: string;
|
|
5
|
+
/** What one wake did, for the caller's signal and a test's assertion. */
|
|
6
|
+
export type ReconcileOnWake =
|
|
7
|
+
/** An intent was written: the response that woke the scope should flag a drain. */
|
|
8
|
+
'requested'
|
|
9
|
+
/** Already asked for this version (or for an earlier one still pending): nothing written. */
|
|
10
|
+
| 'asked'
|
|
11
|
+
/** A first provision: the platform's own provision marks the receipt; recorded, nothing asked. */
|
|
12
|
+
| 'first-provision'
|
|
13
|
+
/** A preview or a fork (#2005): nothing reconciles a copy, so it asks for nothing. */
|
|
14
|
+
| 'copy'
|
|
15
|
+
/** The journal is at its cap: nothing written, asked again on the next wake. */
|
|
16
|
+
| 'full'
|
|
17
|
+
/** No version identity (local dev, a test host): nothing to compare. */
|
|
18
|
+
| 'no-version';
|
|
19
|
+
/** The slice of the object's SQL handle this reads and writes. */
|
|
20
|
+
export interface WakeSql {
|
|
21
|
+
exec(sql: string, ...bindings: unknown[]): {
|
|
22
|
+
toArray(): unknown[];
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Ask for a reconcile if this wake is the first on `version`. `upgrade` is whether the scope held
|
|
27
|
+
* applied migrations before the pass that just succeeded: a scope with none is being provisioned,
|
|
28
|
+
* and its provision runs the hook and writes the receipt itself.
|
|
29
|
+
*
|
|
30
|
+
* Synchronous on purpose, and called with no `await` between the reads and the writes, so the
|
|
31
|
+
* check, the intent and the key land in one of the object's implicit transactions and two
|
|
32
|
+
* requests racing to wake the scope cannot both ask (the object runs one at a time).
|
|
33
|
+
*/
|
|
34
|
+
export declare function reconcileOnWake(sql: WakeSql, version: string | null | undefined, upgrade: boolean, now: string): ReconcileOnWake;
|
|
35
|
+
//# sourceMappingURL=reconcile-on-wake.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reconcile-on-wake.d.ts","sourceRoot":"","sources":["../src/reconcile-on-wake.ts"],"names":[],"mappings":"AAwBA,0FAA0F;AAC1F,eAAO,MAAM,mBAAmB,wBAAwB,CAAC;AAEzD,4FAA4F;AAC5F,eAAO,MAAM,8BAA8B,QAAkD,CAAC;AAE9F,yEAAyE;AACzE,MAAM,MAAM,eAAe;AACzB,mFAAmF;AACjF,WAAW;AACb,6FAA6F;GAC3F,OAAO;AACT,kGAAkG;GAChG,iBAAiB;AACnB,sFAAsF;GACpF,MAAM;AACR,gFAAgF;GAC9E,MAAM;AACR,wEAAwE;GACtE,YAAY,CAAC;AAEjB,kEAAkE;AAClE,MAAM,WAAW,OAAO;IACtB,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,OAAO,EAAE,GAAG;QAAE,OAAO,IAAI,OAAO,EAAE,CAAA;KAAE,CAAC;CACrE;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAC7B,GAAG,EAAE,OAAO,EACZ,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAClC,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,MAAM,GACV,eAAe,CA6CjB"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* K-69 (no scheduled walk over tenants), step 5 of rfc/tenant-scale.md §7.5: the scope's half of
|
|
3
|
+
* the on-wake provision reconcile.
|
|
4
|
+
*
|
|
5
|
+
* A promote re-uploads the serving script in place (K-33), so every scope runs the new code from
|
|
6
|
+
* its next wake, and its migration pass runs on that wake (`ensureMigrations`). What the code
|
|
7
|
+
* cannot do from inside the scope is the provision reconcile (#1172): it needs the platform's
|
|
8
|
+
* directory (entitlements, identity links, connection grants, the receipt), which a sandboxed
|
|
9
|
+
* vertical never reaches. So the scope ASKS, once per version, through the road a sandbox-clean
|
|
10
|
+
* scope already has upward: an intent in its own platform-intent journal
|
|
11
|
+
* (docs/architecture/platform-intents.md). The router's kick after the request that woke it drains
|
|
12
|
+
* the intent in seconds; the drain's backstop, and from step 4 the scope's own alarm, reach a scope
|
|
13
|
+
* woken by an alarm. The handler decides from the directory, with the batched pass's own rule
|
|
14
|
+
* (`provisionReconcileTarget`), and does nothing when the receipt already matches.
|
|
15
|
+
*
|
|
16
|
+
* The scope remembers what it asked for in `_substrat_meta` (`RECONCILE_ASKED_KEY`), in the same
|
|
17
|
+
* transaction as the intent row, so asking is once per version, not once per wake: a scope evicted
|
|
18
|
+
* and revived a hundred times a day writes one row per promote. Nothing here may fail the
|
|
19
|
+
* migration pass it runs after: a scope that cannot ask stays on the batched pass, which is still
|
|
20
|
+
* running (step 5 keeps it until the count has been watched through several promotes).
|
|
21
|
+
*/
|
|
22
|
+
import { MAX_PENDING_PLATFORM_REQUESTS, PROVISION_RECONCILE_KIND, platformRequestId } from '@substrat-run/contracts';
|
|
23
|
+
import { CONNECTOR_DISPATCH_REQUESTED_BY, IS_COPY_SQL, ulid } from '@substrat-run/kernel';
|
|
24
|
+
/** The `_substrat_meta` key holding the version this scope last asked a reconcile for. */
|
|
25
|
+
export const RECONCILE_ASKED_KEY = 'reconcile_asked_for';
|
|
26
|
+
/** Who a `provision-reconcile` intent is requested by: the scope's host, never a person. */
|
|
27
|
+
export const RECONCILE_ON_WAKE_REQUESTED_BY = JSON.stringify({ system: 'reconcile-on-wake' });
|
|
28
|
+
/**
|
|
29
|
+
* Ask for a reconcile if this wake is the first on `version`. `upgrade` is whether the scope held
|
|
30
|
+
* applied migrations before the pass that just succeeded: a scope with none is being provisioned,
|
|
31
|
+
* and its provision runs the hook and writes the receipt itself.
|
|
32
|
+
*
|
|
33
|
+
* Synchronous on purpose, and called with no `await` between the reads and the writes, so the
|
|
34
|
+
* check, the intent and the key land in one of the object's implicit transactions and two
|
|
35
|
+
* requests racing to wake the scope cannot both ask (the object runs one at a time).
|
|
36
|
+
*/
|
|
37
|
+
export function reconcileOnWake(sql, version, upgrade, now) {
|
|
38
|
+
if (!version)
|
|
39
|
+
return 'no-version';
|
|
40
|
+
const asked = sql.exec(`SELECT value FROM _substrat_meta WHERE key = ?`, RECONCILE_ASKED_KEY).toArray()[0]?.value;
|
|
41
|
+
if (asked === version)
|
|
42
|
+
return 'asked';
|
|
43
|
+
const remember = () => sql.exec(`INSERT OR REPLACE INTO _substrat_meta (key, value) VALUES (?, ?)`, RECONCILE_ASKED_KEY, version);
|
|
44
|
+
if (!upgrade) {
|
|
45
|
+
remember();
|
|
46
|
+
return 'first-provision';
|
|
47
|
+
}
|
|
48
|
+
if (hasTable(sql, '_substrat_copy_origin') && sql.exec(IS_COPY_SQL).toArray().length > 0)
|
|
49
|
+
return 'copy';
|
|
50
|
+
// One pending ask is enough whatever version it named: the handler reconciles against what the
|
|
51
|
+
// scope runs when it is drained, not against the payload.
|
|
52
|
+
const pending = sql
|
|
53
|
+
.exec(`SELECT 1 FROM _substrat_platform_requests WHERE kind = ? AND status = 'pending' LIMIT 1`, PROVISION_RECONCILE_KIND)
|
|
54
|
+
.toArray();
|
|
55
|
+
if (pending.length > 0) {
|
|
56
|
+
remember();
|
|
57
|
+
return 'asked';
|
|
58
|
+
}
|
|
59
|
+
// The shared journal's room (platform-intents.md): a wake never takes the last slot a vertical's
|
|
60
|
+
// own intent needs by more than one, and never writes past the cap.
|
|
61
|
+
const held = sql
|
|
62
|
+
.exec(`SELECT COUNT(*) AS c FROM _substrat_platform_requests WHERE status = 'pending' AND requested_by != ?`, CONNECTOR_DISPATCH_REQUESTED_BY)
|
|
63
|
+
.toArray()[0].c;
|
|
64
|
+
if (held >= MAX_PENDING_PLATFORM_REQUESTS)
|
|
65
|
+
return 'full';
|
|
66
|
+
sql.exec(`INSERT INTO _substrat_platform_requests
|
|
67
|
+
(id, kind, payload, requested_by, impersonation, status, attempts, requested_at)
|
|
68
|
+
VALUES (?, ?, ?, ?, NULL, 'pending', 0, ?)`, platformRequestId.parse(ulid()), PROVISION_RECONCILE_KIND, JSON.stringify({ wokeOn: version }), RECONCILE_ON_WAKE_REQUESTED_BY, now);
|
|
69
|
+
remember();
|
|
70
|
+
return 'requested';
|
|
71
|
+
}
|
|
72
|
+
function hasTable(sql, name) {
|
|
73
|
+
return sql.exec(`SELECT 1 FROM sqlite_master WHERE type = 'table' AND name = ?`, name).toArray().length > 0;
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=reconcile-on-wake.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reconcile-on-wake.js","sourceRoot":"","sources":["../src/reconcile-on-wake.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,EAAE,6BAA6B,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACrH,OAAO,EAAE,+BAA+B,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAE1F,0FAA0F;AAC1F,MAAM,CAAC,MAAM,mBAAmB,GAAG,qBAAqB,CAAC;AAEzD,4FAA4F;AAC5F,MAAM,CAAC,MAAM,8BAA8B,GAAG,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D,GAAG,CAAC,IAAI,CACN;;gDAE4C,EAC5C,iBAAiB,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,EAC/B,wBAAwB,EACxB,IAAI,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EACnC,8BAA8B,EAC9B,GAAG,CACJ,CAAC;IACF,QAAQ,EAAE,CAAC;IACX,OAAO,WAAW,CAAC;AACrB,CAAC;AAED,SAAS,QAAQ,CAAC,GAAY,EAAE,IAAY;IAC1C,OAAO,GAAG,CAAC,IAAI,CAAC,+DAA+D,EAAE,IAAI,CAAC,CAAC,OAAO,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC;AAC9G,CAAC"}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { type RefusedRouteEntry, type RouteEntry, type ServingPolicyEntry } from './route-read-model.js';
|
|
2
|
+
type Entry = RouteEntry | RefusedRouteEntry | ServingPolicyEntry;
|
|
3
|
+
/** The tables this owns. Excluded from a directory dump, and from a restore's drop. */
|
|
4
|
+
export declare const ROUTE_READ_MODEL_TABLE_GLOB = "route_read_model_*";
|
|
5
|
+
/** The slice of a KV binding the publisher writes through (and reads its ledger marker from). */
|
|
6
|
+
export interface RouteKvWriter {
|
|
7
|
+
get(key: string): Promise<string | null>;
|
|
8
|
+
put(key: string, value: string): Promise<void>;
|
|
9
|
+
delete(key: string): Promise<void>;
|
|
10
|
+
}
|
|
11
|
+
/** A binding that looks like KV, or nothing: the read model is on only where one is bound. */
|
|
12
|
+
export declare function routeKvWriterOf(value: unknown): RouteKvWriter | null;
|
|
13
|
+
/**
|
|
14
|
+
* The KV key naming which ledger the namespace's entries were confirmed by. The ledger keeps the
|
|
15
|
+
* same id; a namespace whose marker differs (or is missing) is not the one the ledger describes —
|
|
16
|
+
* the `ROUTES` binding was pointed at another namespace — so the ledger is cleared and every key
|
|
17
|
+
* republished. The router never reads it (it is no route entry).
|
|
18
|
+
*/
|
|
19
|
+
export declare const ROUTE_LEDGER_MARKER_KEY = "route/v1/meta/ledger";
|
|
20
|
+
export declare const ROUTE_READ_MODEL_TRIGGERS: string[];
|
|
21
|
+
type Sql = SqlStorage;
|
|
22
|
+
/** The read model's own key for an entry: `h:<hostname>` for a route, `v:<slug>` for a policy. */
|
|
23
|
+
export type RouteReadModelKey = `h:${string}` | `v:${string}`;
|
|
24
|
+
export declare const routeEntryKey: (hostname: string) => RouteReadModelKey;
|
|
25
|
+
export declare const servingPolicyEntryKey: (slug: string) => RouteReadModelKey;
|
|
26
|
+
/** What the source knows about one hostname: its row, its scope's and whether the route serves. */
|
|
27
|
+
export interface RouteSourceFields {
|
|
28
|
+
/** The hostname is active AND its scope and its tenant are active, correctly paired (#1713). */
|
|
29
|
+
routes: boolean;
|
|
30
|
+
/** The hostname itself is active (a refusal is published only for an active name). */
|
|
31
|
+
hostnameActive: boolean;
|
|
32
|
+
tenant_id: string;
|
|
33
|
+
scope_id: string;
|
|
34
|
+
vertical_slug: string | null;
|
|
35
|
+
surface: string;
|
|
36
|
+
region: string | null;
|
|
37
|
+
jurisdiction: string | null;
|
|
38
|
+
serving_ref: string | null;
|
|
39
|
+
/** The scope's vertical: whose serving policy a `serving` dispatch takes. */
|
|
40
|
+
vertical: string | null;
|
|
41
|
+
kind: string | null;
|
|
42
|
+
forked_from: string | null;
|
|
43
|
+
/** The scope's bound version, when it exists: its id, script and policy as manifest JSON text. */
|
|
44
|
+
version: ({
|
|
45
|
+
id: string;
|
|
46
|
+
deployment_ref: string | null;
|
|
47
|
+
} & PolicyFields) | null;
|
|
48
|
+
/** The scope's active hostnames, sorted, at most `ROUTE_SCOPE_HOSTNAMES_MAX`. */
|
|
49
|
+
scope_hostnames: string[];
|
|
50
|
+
/** Any active hostname of the scope is region-pinned: its NAME would be in this route's value. */
|
|
51
|
+
scopeHasPinnedHostname: boolean;
|
|
52
|
+
}
|
|
53
|
+
type PolicyFields = Pick<ServingPolicyEntry, 'outbound_json' | 'calls_json' | 'scope_stores_json'>;
|
|
54
|
+
/**
|
|
55
|
+
* A hostname's entry, from its source fields: a route, a refusal, or null for no entry. Null for
|
|
56
|
+
* any residency-pinned name (K-36): KV has no jurisdiction, so the router asks the source. Null too
|
|
57
|
+
* for a route whose scope also holds a pinned hostname, because the route's value lists the scope's
|
|
58
|
+
* hostnames, and no pinned name may appear in any KV value.
|
|
59
|
+
*/
|
|
60
|
+
export declare function routeEntryOf(f: RouteSourceFields): RouteEntry | RefusedRouteEntry | null;
|
|
61
|
+
/** A vertical's serving policy, from its row and its serving version's manifest fields. */
|
|
62
|
+
export declare function servingPolicyEntryOf(f: {
|
|
63
|
+
serving_ref: string | null;
|
|
64
|
+
} & PolicyFields): ServingPolicyEntry;
|
|
65
|
+
/** What has been published, by key: the digest the writer compares against. Kept by the source. */
|
|
66
|
+
export interface PublishedLedger {
|
|
67
|
+
digest(key: RouteReadModelKey): string | undefined;
|
|
68
|
+
set(key: RouteReadModelKey, digest: string): void;
|
|
69
|
+
delete(key: RouteReadModelKey): void;
|
|
70
|
+
}
|
|
71
|
+
/** The ledger as a table in the source's own SQLite (`route_read_model_published`). */
|
|
72
|
+
export declare function sqlPublishedLedger(sql: SqlStorage): PublishedLedger;
|
|
73
|
+
/**
|
|
74
|
+
* The ledger's mark for a write that was started and not confirmed. It matches no digest, so the
|
|
75
|
+
* key is written again, and it is a ledger entry, so a later "no entry" deletes from KV: an object
|
|
76
|
+
* that stopped between KV accepting a put and the ledger recording it leaves nothing behind.
|
|
77
|
+
*/
|
|
78
|
+
export declare const UNCERTAIN_DIGEST = "uncertain";
|
|
79
|
+
/**
|
|
80
|
+
* THE projection writer: put one entry in KV, or delete it, unless the ledger says KV already holds
|
|
81
|
+
* it. The ledger records the write as uncertain before KV is asked and as confirmed only after KV
|
|
82
|
+
* accepted, so neither a refused nor an interrupted write is ever taken for done. Every source
|
|
83
|
+
* writes through this, and nothing else writes the namespace.
|
|
84
|
+
*/
|
|
85
|
+
export declare function writeRouteReadModelEntry(to: {
|
|
86
|
+
kv: RouteKvWriter;
|
|
87
|
+
ledger: PublishedLedger;
|
|
88
|
+
}, key: RouteReadModelKey, value: Entry | null): Promise<'written' | 'deleted' | 'unchanged'>;
|
|
89
|
+
/** The comparison the reconcile makes: would the writer change anything for this entry? */
|
|
90
|
+
export declare function routeReadModelEntryDiffers(ledger: PublishedLedger, key: RouteReadModelKey, value: Entry | null): Promise<boolean>;
|
|
91
|
+
/** What a dirty key publishes now, read from the directory: an entry, or null for no entry. */
|
|
92
|
+
export declare function computeRouteReadModelEntry(sql: Sql, key: string): Entry | null;
|
|
93
|
+
/** One flush's account. `remaining` > 0 means it stopped at its bound, not that it failed. */
|
|
94
|
+
export interface RouteReadModelFlush {
|
|
95
|
+
written: number;
|
|
96
|
+
deleted: number;
|
|
97
|
+
unchanged: number;
|
|
98
|
+
/** Keys whose directory read threw (a malformed manifest): published as absent, logged. */
|
|
99
|
+
unreadable: number;
|
|
100
|
+
remaining: number;
|
|
101
|
+
/** It stopped because the source was busy (`quiet()` false); the source restarts it. */
|
|
102
|
+
deferred: boolean;
|
|
103
|
+
}
|
|
104
|
+
export interface RouteReadModelStatus {
|
|
105
|
+
enabled: boolean;
|
|
106
|
+
/** Dirty keys not yet published. */
|
|
107
|
+
outbox: number;
|
|
108
|
+
published: number;
|
|
109
|
+
/** Hostnames a complete read model holds a ROUTE for: the projection's own gates (`routeEntryOf`). */
|
|
110
|
+
routable: number;
|
|
111
|
+
/** Hostnames it holds a REFUSAL for: active themselves, unpinned, their scope or tenant not active. */
|
|
112
|
+
refused: number;
|
|
113
|
+
/** Active hostnames it holds nothing for, left to the directory: pinned, or naming a pinned sibling (K-36). */
|
|
114
|
+
pinned: number;
|
|
115
|
+
verticals: number;
|
|
116
|
+
}
|
|
117
|
+
export declare class RouteReadModelPublisher {
|
|
118
|
+
private readonly sql;
|
|
119
|
+
private readonly kv;
|
|
120
|
+
private readonly ledger;
|
|
121
|
+
constructor(sql: Sql, kv: RouteKvWriter);
|
|
122
|
+
/**
|
|
123
|
+
* Create the tables and triggers. True when the triggers were not there before: the read model
|
|
124
|
+
* was just switched on (or the directory was just rebuilt), so nothing published can be trusted
|
|
125
|
+
* to match, and the caller marks every key dirty.
|
|
126
|
+
*/
|
|
127
|
+
install(): boolean;
|
|
128
|
+
/** Every key the directory could publish, and every key KV may still hold. */
|
|
129
|
+
markAll(): void;
|
|
130
|
+
/**
|
|
131
|
+
* The router's miss (`readRoute(…, { publish: true })`): queue the route and its policy, unless
|
|
132
|
+
* they are published already and only KV's propagation is behind — then a queue write per
|
|
133
|
+
* request would buy nothing.
|
|
134
|
+
*/
|
|
135
|
+
requestPublish(hostname: string): void;
|
|
136
|
+
pending(): boolean;
|
|
137
|
+
/**
|
|
138
|
+
* Publish up to `maxKeys` dirty keys. Throws when KV refuses a write, once every write it started
|
|
139
|
+
* has settled: what was published stays published and out of the outbox, the rest is still dirty,
|
|
140
|
+
* and no write of this flush is still in flight to race the next one.
|
|
141
|
+
*
|
|
142
|
+
* `quiet` is asked before each group of keys is read: entries are computed synchronously from the
|
|
143
|
+
* source, and a source whose own call is still in flight may be inside a transaction that has not
|
|
144
|
+
* committed. A flush that meets a busy source stops (`deferred`) and is restarted by the source.
|
|
145
|
+
*/
|
|
146
|
+
flush(maxKeys?: number, quiet?: () => boolean): Promise<RouteReadModelFlush>;
|
|
147
|
+
/**
|
|
148
|
+
* The ledger describes the namespace it was confirmed against, or its confirmations are withdrawn
|
|
149
|
+
* (see `ROUTE_LEDGER_MARKER_KEY`). True when they were, and every key queued to be published again.
|
|
150
|
+
*/
|
|
151
|
+
verifyNamespace(): Promise<boolean>;
|
|
152
|
+
private publishOne;
|
|
153
|
+
/**
|
|
154
|
+
* One slice of the drift repair, for the scheduled pass: up to `limit` keys from each source
|
|
155
|
+
* (active hostnames, verticals, published keys), resuming where the last pass stopped. A key
|
|
156
|
+
* whose entry differs from what was published is queued. Returns how many were queued.
|
|
157
|
+
*/
|
|
158
|
+
reconcile(limit?: number): Promise<{
|
|
159
|
+
checked: number;
|
|
160
|
+
queued: number;
|
|
161
|
+
}>;
|
|
162
|
+
status(): RouteReadModelStatus;
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Switch the read model off on a directory that had it: drop the triggers and the outbox, so
|
|
166
|
+
* nothing queues for a binding that is gone. The published ledger stays — it still describes KV,
|
|
167
|
+
* and switching back on marks every key dirty, which reconciles the two.
|
|
168
|
+
*/
|
|
169
|
+
export declare function uninstallRouteReadModel(sql: Sql): void;
|
|
170
|
+
export {};
|
|
171
|
+
//# sourceMappingURL=route-read-model-publisher.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"route-read-model-publisher.d.ts","sourceRoot":"","sources":["../src/route-read-model-publisher.ts"],"names":[],"mappings":"AA6BA,OAAO,EAIL,KAAK,iBAAiB,EACtB,KAAK,UAAU,EACf,KAAK,kBAAkB,EACxB,MAAM,uBAAuB,CAAC;AAE/B,KAAK,KAAK,GAAG,UAAU,GAAG,iBAAiB,GAAG,kBAAkB,CAAC;AAEjE,uFAAuF;AACvF,eAAO,MAAM,2BAA2B,uBAAuB,CAAC;AAEhE,iGAAiG;AACjG,MAAM,WAAW,aAAa;IAC5B,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACzC,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/C,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACpC;AAED,8FAA8F;AAC9F,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,aAAa,GAAG,IAAI,CAIpE;AAED;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,yBAAyB,CAAC;AAwE9D,eAAO,MAAM,yBAAyB,UAAiC,CAAC;AAgCxE,KAAK,GAAG,GAAG,UAAU,CAAC;AAmBtB,kGAAkG;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