@substrat-run/kernel 0.147.0 → 0.148.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/audit-outcome.d.ts +1 -1
- package/dist/audit-outcome.d.ts.map +1 -1
- package/dist/audit-outcome.js +4 -2
- package/dist/audit-outcome.js.map +1 -1
- package/dist/export-break.d.ts +137 -0
- package/dist/export-break.d.ts.map +1 -0
- package/dist/export-break.js +219 -0
- package/dist/export-break.js.map +1 -0
- package/dist/index.d.ts +15 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -4
- package/dist/index.js.map +1 -1
- package/dist/install-receipts.d.ts +116 -0
- package/dist/install-receipts.d.ts.map +1 -0
- package/dist/install-receipts.js +162 -0
- package/dist/install-receipts.js.map +1 -0
- package/dist/map-bounded.d.ts +8 -0
- package/dist/map-bounded.d.ts.map +1 -0
- package/dist/map-bounded.js +16 -0
- package/dist/map-bounded.js.map +1 -0
- package/dist/peer.js +1 -1
- package/dist/platform-sweep.d.ts +20 -360
- package/dist/platform-sweep.d.ts.map +1 -1
- package/dist/platform-sweep.js +4 -561
- package/dist/platform-sweep.js.map +1 -1
- package/dist/schedule-state.d.ts +91 -0
- package/dist/schedule-state.d.ts.map +1 -0
- package/dist/schedule-state.js +118 -0
- package/dist/schedule-state.js.map +1 -0
- package/dist/scope-copy-ledger.d.ts +29 -0
- package/dist/scope-copy-ledger.d.ts.map +1 -1
- package/dist/scope-copy-ledger.js +23 -0
- package/dist/scope-copy-ledger.js.map +1 -1
- package/dist/scope-copy.d.ts.map +1 -1
- package/dist/scope-copy.js +3 -2
- package/dist/scope-copy.js.map +1 -1
- package/dist/scope-host.d.ts +140 -10
- package/dist/scope-host.d.ts.map +1 -1
- package/dist/scope-host.js.map +1 -1
- package/dist/scope-identity.d.ts +68 -0
- package/dist/scope-identity.d.ts.map +1 -0
- package/dist/scope-identity.js +75 -0
- package/dist/scope-identity.js.map +1 -0
- package/dist/scope-store.d.ts +4 -1
- package/dist/scope-store.d.ts.map +1 -1
- package/dist/scope-store.js.map +1 -1
- package/dist/spine-restore.js +1 -1
- package/dist/store-kind-releases.d.ts +137 -0
- package/dist/store-kind-releases.d.ts.map +1 -0
- package/dist/store-kind-releases.js +252 -0
- package/dist/store-kind-releases.js.map +1 -0
- package/dist/upload-link.d.ts +89 -0
- package/dist/upload-link.d.ts.map +1 -0
- package/dist/upload-link.js +277 -0
- package/dist/upload-link.js.map +1 -0
- package/dist/vertical-scope-stores.d.ts +43 -0
- package/dist/vertical-scope-stores.d.ts.map +1 -0
- package/dist/vertical-scope-stores.js +195 -0
- package/dist/vertical-scope-stores.js.map +1 -0
- package/package.json +2 -2
package/dist/audit-outcome.d.ts
CHANGED
|
@@ -38,7 +38,7 @@ import type { OpsFailureInput } from './scope-host.js';
|
|
|
38
38
|
* capability revoke is written the same way around the revoke in the scope's store
|
|
39
39
|
* (`auditedCapabilityRevoke`), which on the shared control plane is another deployment's.
|
|
40
40
|
*/
|
|
41
|
-
export declare const AUDITED_CHANGE_ACTIONS: readonly ["transferOwner", "manageScopeMember", "setPeerBinding", "revokeFromSystem", "restoreToSystem", "revokeFromPeer", "restoreToPeer", "moveImportCursor", "revokeCapability"];
|
|
41
|
+
export declare const AUDITED_CHANGE_ACTIONS: readonly ["bindConnectionScope", "transferOwner", "manageScopeMember", "setPeerBinding", "revokeFromSystem", "restoreToSystem", "revokeFromPeer", "restoreToPeer", "moveImportCursor", "revokeCapability"];
|
|
42
42
|
export type AuditedChangeAction = (typeof AUDITED_CHANGE_ACTIONS)[number];
|
|
43
43
|
/** The structured line an outcome row that could not be written leaves, keyed so a log search finds every one. */
|
|
44
44
|
export declare const UNRECORDED_OUTCOME_LOG = "audit-outcome-unrecorded";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit-outcome.d.ts","sourceRoot":"","sources":["../src/audit-outcome.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,EAAE,KAAK,EAAE,MAAM,GAAG,cAAc,CAyBlH;AAaD,iDAAiD;AACjD,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC;AAKnF,oFAAoF;AACpF,MAAM,WAAW,gBAAgB;IAC/B,sFAAsF;IACtF,OAAO,EAAE,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,GAAG,aAAa,CAAC;IACtE,+FAA+F;IAC/F,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,SAAS,CAAC,mBAAmB,GAAG;IAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAC,EAAE,GAChE,GAAG,CAAC,YAAY,EAAE,gBAAgB,CAAC,CAiBrC;AAED,iHAAiH;AACjH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,EAAE,SAAS,EAAE,gBAAgB,GAAG,SAAS,GAAG,OAAO,CAE1G"}
|
package/dist/audit-outcome.js
CHANGED
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
* settle's grace window, so a live request cannot normally be overtaken this way. The rule is
|
|
28
28
|
* stated for the case where one is.
|
|
29
29
|
*/
|
|
30
|
-
import { AUDIT_ERROR_MAX, auditOperationId, memberChangeAudit, ownerTransferAudit, peerBindingAudit, provesNothingChanged, substratError } from '@substrat-run/contracts';
|
|
30
|
+
import { AUDIT_ERROR_MAX, auditOperationId, connectionBindingAudit, memberChangeAudit, ownerTransferAudit, peerBindingAudit, provesNothingChanged, substratError } from '@substrat-run/contracts';
|
|
31
31
|
import { SWITCH_ACTIONS } from './system-switch-record.js';
|
|
32
32
|
import { ulid } from './ulid.js';
|
|
33
33
|
/**
|
|
@@ -40,6 +40,7 @@ import { ulid } from './ulid.js';
|
|
|
40
40
|
* (`auditedCapabilityRevoke`), which on the shared control plane is another deployment's.
|
|
41
41
|
*/
|
|
42
42
|
export const AUDITED_CHANGE_ACTIONS = [
|
|
43
|
+
'bindConnectionScope',
|
|
43
44
|
'transferOwner',
|
|
44
45
|
'manageScopeMember',
|
|
45
46
|
'setPeerBinding',
|
|
@@ -252,7 +253,8 @@ function auditedUnknownOf(row, after, error) {
|
|
|
252
253
|
const entry = { ...after, tenantId: row.tenant_id, scopeId: row.scope_id, phase: 'unknown', error };
|
|
253
254
|
const { tenantId: _t, scopeId: _s, ...parsed } = row.action === 'transferOwner' ? ownerTransferAudit.parse(entry)
|
|
254
255
|
: row.action === 'manageScopeMember' ? memberChangeAudit.parse(entry)
|
|
255
|
-
:
|
|
256
|
+
: row.action === 'bindConnectionScope' ? connectionBindingAudit.parse(entry)
|
|
257
|
+
: peerBindingAudit.parse(entry);
|
|
256
258
|
return parsed;
|
|
257
259
|
}
|
|
258
260
|
const REAL_OUTCOMES = new Set(['applied', 'refused', 'failed']);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit-outcome.js","sourceRoot":"","sources":["../src/audit-outcome.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,aAAa,EAA2C,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"audit-outcome.js","sourceRoot":"","sources":["../src/audit-outcome.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,aAAa,EAA2C,MAAM,yBAAyB,CAAC;AAE3O,OAAO,EAAE,cAAc,EAAqB,MAAM,2BAA2B,CAAC;AAC9E,OAAO,EAAE,IAAI,EAAE,MAAM,W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,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC;QACvD,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IACvB,CAAC;IACD,MAAM,GAAG,GAAG,IAAI,GAAG,EAAkC,CAAC;IACtD,KAAK,MAAM,CAAC,GAAG,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC;QAC5C,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC;YAAE,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;aAC/D,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;YAAE,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC,CAAgC,EAAE,IAAI,EAAE,CAAC,CAAC;aAC/F,IAAI,OAAO;YAAE,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAC/D,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED,iHAAiH;AACjH,MAAM,UAAU,mBAAmB,CAAC,KAAoB,EAAE,SAAuC;IAC/F,OAAO,KAAK,KAAK,SAAS,IAAI,SAAS,KAAK,SAAS,IAAI,SAAS,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;AACrF,CAAC"}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import type { ExportBreak, ManifestExports, ManifestImports, PlatformActorId, Scope, TenantId } from '@substrat-run/contracts';
|
|
2
|
+
import type { HostAdmin } from './scope-host.js';
|
|
3
|
+
import { type ServingPointer } from './scope-identity.js';
|
|
4
|
+
/**
|
|
5
|
+
* The export-break gate (#1705 PR 3, #1756): whom a promote, a bind or a route change breaks,
|
|
6
|
+
* judged by each adapter's promote and bind doors, and the refusals they answer with.
|
|
7
|
+
* Split out of `platform-sweep.ts` (#1978).
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* What each scope's RUNNING version imports, from the registry (#1705): one `listVerticals` when
|
|
11
|
+
* a scope is on a serving script, then one `readImports` per distinct running version, at most
|
|
12
|
+
* `concurrency` in flight. A failure on one version never stops the others: a read that throws is
|
|
13
|
+
* reported as `threw` beside the fact, since a caller may treat "the registry could not be asked"
|
|
14
|
+
* differently from "the manifest does not parse". A scope bound to no version gets no fact. The narrowing and the promote gate
|
|
15
|
+
* both ask it, so the two cannot come to disagree about which code a scope runs.
|
|
16
|
+
*/
|
|
17
|
+
export declare function runningImportsOf(admin: Pick<HostAdmin, 'listVerticals'>, actor: PlatformActorId, scopes: readonly Scope[], readImports: (verticalSlug: string, versionId: string) => Promise<ManifestImports>, concurrency: number): Promise<{
|
|
18
|
+
scope: Scope;
|
|
19
|
+
key: string;
|
|
20
|
+
versionId: string | null;
|
|
21
|
+
fact: ManifestImports | undefined;
|
|
22
|
+
threw?: string;
|
|
23
|
+
}[]>;
|
|
24
|
+
/**
|
|
25
|
+
* Who a promote breaks (#1705 PR 3): the installed consumers whose RUNNING code imports an
|
|
26
|
+
* exported (type, schemaVersion) that the outgoing version promised and the incoming one drops
|
|
27
|
+
* or exports at another version. The promote gate refuses on a non-empty answer unless it is
|
|
28
|
+
* acknowledged (`exportBreak`), and the refusal lists them.
|
|
29
|
+
*
|
|
30
|
+
* - **What changed** is outgoing versus incoming, from the two versions' registries. An outgoing
|
|
31
|
+
* version whose registry states no exports (a first promote, or a push by a CLI older than
|
|
32
|
+
* 0.34.0) promised nothing the registry can name, so nothing is judged broken. Nothing it
|
|
33
|
+
* exported at run time could be listed either, which is what the permission-digest gate
|
|
34
|
+
* beside this one is for.
|
|
35
|
+
* - **Who is a consumer** is the edge's own rule: a primary, active scope of ANOTHER vertical, in
|
|
36
|
+
* a tenant where the producer is installed (any primary, active install, so two installs still
|
|
37
|
+
* count), whose running version (`runningVersionOf`) declares the import. That over-approximates
|
|
38
|
+
* on purpose, for a listed vertical's tenants still pinned to an older producer version: a
|
|
39
|
+
* refusal that names one tenant too many costs an acknowledgement, and one that names too few
|
|
40
|
+
* costs a silent stall.
|
|
41
|
+
* - **A consumer version whose manifest does not parse** is not judged. It cannot be said to
|
|
42
|
+
* break, and refusing every promote over a manifest nobody can parse would make the gate one
|
|
43
|
+
* nobody can pass. A read that THREW is different: the registry could not be asked, so whom the
|
|
44
|
+
* promote breaks is unknown, and this throws. The gate then refuses rather than failing open.
|
|
45
|
+
* A failed directory read throws the same way.
|
|
46
|
+
*
|
|
47
|
+
* Cost: nothing at all unless an export changed. Then one fleet `listScopes`, one
|
|
48
|
+
* `listVerticals` when a scope is on a serving script, and one `readImports` per distinct
|
|
49
|
+
* running consumer version, at most `concurrency` in flight.
|
|
50
|
+
*/
|
|
51
|
+
export declare function exportBreaksOf(input: {
|
|
52
|
+
admin: Pick<HostAdmin, 'listScopes' | 'listVerticals'>;
|
|
53
|
+
actor: PlatformActorId;
|
|
54
|
+
producer: string;
|
|
55
|
+
outgoing: ManifestExports;
|
|
56
|
+
incoming: ManifestExports;
|
|
57
|
+
readImports: (verticalSlug: string, versionId: string) => Promise<ManifestImports>;
|
|
58
|
+
concurrency?: number;
|
|
59
|
+
/**
|
|
60
|
+
* #1756: judge ONE tenant's consumers only — a bind moves one install, and an edge never
|
|
61
|
+
* crosses a tenant, so no other tenant's app can be broken by it. The tenant is taken to run
|
|
62
|
+
* the producer (the scope being bound is that install), whatever its status.
|
|
63
|
+
*/
|
|
64
|
+
tenantId?: TenantId;
|
|
65
|
+
/** What is being judged, for the wording of a refusal to judge it. Default `'promotion'`. */
|
|
66
|
+
act?: 'promotion' | 'bind';
|
|
67
|
+
}): Promise<ExportBreak[]>;
|
|
68
|
+
/** Whether a throw is the promote gate's export-break refusal (`exportBreakRefusal`). */
|
|
69
|
+
export declare function isExportBreakRefusal(err: unknown): err is Error;
|
|
70
|
+
/**
|
|
71
|
+
* The refusal a promote gets for a non-empty `exportBreaksOf` (#1705 PR 3). Counts only: the
|
|
72
|
+
* adapters do not know who is promoting, and a builder must not learn from an error which other
|
|
73
|
+
* tenants import its events. The route that knows the caller lists what they may see.
|
|
74
|
+
*/
|
|
75
|
+
export declare function exportBreakRefusal(breaks: readonly ExportBreak[]): string;
|
|
76
|
+
/** How `bindExportBreakRefusal` begins: what lets the bind route recognise it (#1756). */
|
|
77
|
+
export declare const BIND_EXPORT_BREAK_REFUSAL = "this bind drops or re-versions";
|
|
78
|
+
/** Whether a throw is the bind gate's export-break refusal (`bindExportBreakRefusal`). */
|
|
79
|
+
export declare function isBindExportBreakRefusal(err: unknown): err is Error;
|
|
80
|
+
/**
|
|
81
|
+
* The refusal a bind gets for a non-empty `bindExportBreaksOf` (#1756). Every break is in the
|
|
82
|
+
* bound scope's own tenant, which the caller addressed, so it names no one else — but it stays in
|
|
83
|
+
* counts, as the promote refusal does, and the route that knows the caller adds the listing.
|
|
84
|
+
*/
|
|
85
|
+
export declare function bindExportBreakRefusal(breaks: readonly ExportBreak[]): string;
|
|
86
|
+
/**
|
|
87
|
+
* What a bind or a route change moves `scope` between (#1756, #2178): the version it runs before
|
|
88
|
+
* and the one it runs after (`runningVersionOf` on both of its inputs), or null when the move
|
|
89
|
+
* changes nothing it runs — a re-point that stays on the serving script — or it ran nothing before
|
|
90
|
+
* (a first bind). `servingRef` omitted: the route is unchanged.
|
|
91
|
+
*/
|
|
92
|
+
export declare function scopeMoveOf(scope: Pick<Scope, 'verticalVersionId' | 'servingRef'>, incomingVersionId: string, servingRef: string | null | undefined, serving: ServingPointer | null): {
|
|
93
|
+
before: string;
|
|
94
|
+
after: string;
|
|
95
|
+
} | null;
|
|
96
|
+
/**
|
|
97
|
+
* Whom moving `scope` breaks (#1756): the promote gate's question (`exportBreaksOf`), asked of
|
|
98
|
+
* ONE install in its own tenant, since an edge never crosses one.
|
|
99
|
+
*
|
|
100
|
+
* A scope's exports leave from the code it RUNS, and `runningVersionOf` names that code from two
|
|
101
|
+
* inputs: the version pointer and the serving ref. So a move is either or both of them changing —
|
|
102
|
+
* a bind (`next.versionId`), or a route onto or off a serving script (`next.servingRef`, which is
|
|
103
|
+
* how an adopt moves a scope before its pointer ever does). Both are judged by the same rule, on
|
|
104
|
+
* the running version before against the running version after, the rule the consumers are judged
|
|
105
|
+
* on too:
|
|
106
|
+
*
|
|
107
|
+
* - **Re-pointing a scope that stays on its vertical's serving script** changes nothing it runs,
|
|
108
|
+
* so it is never refused. The change reached it when the serving script was replaced — at a
|
|
109
|
+
* promote, which judged every tenant then. A route ONTO the serving script is not that case:
|
|
110
|
+
* the scope goes from its own version to whatever is served, and that is judged.
|
|
111
|
+
* - **A fork or a preview** is never an edge's producer (`resolveVerticalInstanceFrom` takes the
|
|
112
|
+
* primary install only), so nothing it runs can break an edge.
|
|
113
|
+
* - **A scope still provisioning** has never been active, so no edge has ever delivered from it.
|
|
114
|
+
* - **A first bind** runs nothing before it, so it promised nothing.
|
|
115
|
+
* - **A lineage crossing** (the version belongs to another vertical than the scope's, or the route
|
|
116
|
+
* goes onto a script that is not this vertical's serving script) is not judged here, and nothing
|
|
117
|
+
* else judges it either: every consumer importing `from` the old slug
|
|
118
|
+
* loses its producer, and `rebind-vertical`'s acknowledgements are about migrations, not about
|
|
119
|
+
* that. A known gap, older than this gate.
|
|
120
|
+
*/
|
|
121
|
+
export declare function bindExportBreaksOf(input: {
|
|
122
|
+
admin: Pick<HostAdmin, 'listScopes' | 'listVerticals'>;
|
|
123
|
+
actor: PlatformActorId;
|
|
124
|
+
scope: Pick<Scope, 'tenantId' | 'forkedFrom' | 'kind' | 'status' | 'vertical' | 'verticalVersionId' | 'servingRef'>;
|
|
125
|
+
/** The version the scope is bound to after the move (its vertical's slug beside it). */
|
|
126
|
+
incoming: {
|
|
127
|
+
id: string;
|
|
128
|
+
verticalSlug: string;
|
|
129
|
+
};
|
|
130
|
+
/** The serving ref it routes by after the move. Omitted: unchanged. */
|
|
131
|
+
servingRef?: string | null;
|
|
132
|
+
/** The serving pointer of the scope's vertical, or null when nothing is served in place. */
|
|
133
|
+
serving: ServingPointer | null;
|
|
134
|
+
readExports: (versionId: string) => Promise<ManifestExports>;
|
|
135
|
+
readImports: (verticalSlug: string, versionId: string) => Promise<ManifestImports>;
|
|
136
|
+
}): Promise<ExportBreak[]>;
|
|
137
|
+
//# sourceMappingURL=export-break.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"export-break.d.ts","sourceRoot":"","sources":["../src/export-break.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,eAAe,EAAE,eAAe,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAC/H,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEjD,OAAO,EAAwD,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAEhH;;;;GAIG;AAEH;;;;;;;GAOG;AACH,wBAAsB,gBAAgB,CACpC,KAAK,EAAE,IAAI,CAAC,SAAS,EAAE,eAAe,CAAC,EACvC,KAAK,EAAE,eAAe,EACtB,MAAM,EAAE,SAAS,KAAK,EAAE,EACxB,WAAW,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,eAAe,CAAC,EAClF,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC;IAAE,KAAK,EAAE,KAAK,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,IAAI,EAAE,eAAe,GAAG,SAAS,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,EAAE,CAAC,CAsBvH;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAsB,cAAc,CAAC,KAAK,EAAE;IAC1C,KAAK,EAAE,IAAI,CAAC,SAAS,EAAE,YAAY,GAAG,eAAe,CAAC,CAAC;IACvD,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,EAAE;IAC9C,KAAK,EAAE,IAAI,CAAC,SAAS,EAAE,YAAY,GAAG,eAAe,CAAC,CAAC;IACvD,KAAK,EAAE,eAAe,CAAC;IACvB,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,UAAU,GAAG,YAAY,GAAG,MAAM,GAAG,QAAQ,GAAG,UAAU,GAAG,mBAAmB,GAAG,YAAY,CAAC,CAAC;IACpH,wFAAwF;IACxF,QAAQ,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAA;KAAE,CAAC;IAC/C,uEAAuE;IACvE,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,4FAA4F;IAC5F,OAAO,EAAE,cAAc,GAAG,IAAI,CAAC;IAC/B,WAAW,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,eAAe,CAAC,CAAC;IAC7D,WAAW,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,eAAe,CAAC,CAAC;CACpF,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC,CAqBzB"}
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import { errorCodeOf, substratError } from '@substrat-run/contracts';
|
|
2
|
+
import { mapBounded, message } from './map-bounded.js';
|
|
3
|
+
import { isPrimaryScope, runningVersionOf, servingPointersFor } from './scope-identity.js';
|
|
4
|
+
/**
|
|
5
|
+
* The export-break gate (#1705 PR 3, #1756): whom a promote, a bind or a route change breaks,
|
|
6
|
+
* judged by each adapter's promote and bind doors, and the refusals they answer with.
|
|
7
|
+
* Split out of `platform-sweep.ts` (#1978).
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* What each scope's RUNNING version imports, from the registry (#1705): one `listVerticals` when
|
|
11
|
+
* a scope is on a serving script, then one `readImports` per distinct running version, at most
|
|
12
|
+
* `concurrency` in flight. A failure on one version never stops the others: a read that throws is
|
|
13
|
+
* reported as `threw` beside the fact, since a caller may treat "the registry could not be asked"
|
|
14
|
+
* differently from "the manifest does not parse". A scope bound to no version gets no fact. The narrowing and the promote gate
|
|
15
|
+
* both ask it, so the two cannot come to disagree about which code a scope runs.
|
|
16
|
+
*/
|
|
17
|
+
export async function runningImportsOf(admin, actor, scopes, readImports, concurrency) {
|
|
18
|
+
const serving = await servingPointersFor(admin, actor, scopes);
|
|
19
|
+
const versions = new Map();
|
|
20
|
+
const keyed = [];
|
|
21
|
+
for (const s of scopes) {
|
|
22
|
+
if (!s.vertical)
|
|
23
|
+
continue;
|
|
24
|
+
const versionId = runningVersionOf(s, serving.get(s.vertical));
|
|
25
|
+
const key = `${s.vertical}@${versionId ?? '(no version)'}`;
|
|
26
|
+
if (versionId && !versions.has(key))
|
|
27
|
+
versions.set(key, { slug: s.vertical, versionId });
|
|
28
|
+
keyed.push({ scope: s, key, versionId });
|
|
29
|
+
}
|
|
30
|
+
const facts = new Map();
|
|
31
|
+
const threw = new Map();
|
|
32
|
+
await mapBounded([...versions], concurrency, async ([key, v]) => {
|
|
33
|
+
try {
|
|
34
|
+
facts.set(key, await readImports(v.slug, v.versionId));
|
|
35
|
+
}
|
|
36
|
+
catch (err) {
|
|
37
|
+
facts.set(key, { kind: 'unreadable', reason: message(err) });
|
|
38
|
+
threw.set(key, message(err));
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
return keyed.map((k) => ({ ...k, fact: facts.get(k.key), ...(threw.has(k.key) ? { threw: threw.get(k.key) } : {}) }));
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Who a promote breaks (#1705 PR 3): the installed consumers whose RUNNING code imports an
|
|
45
|
+
* exported (type, schemaVersion) that the outgoing version promised and the incoming one drops
|
|
46
|
+
* or exports at another version. The promote gate refuses on a non-empty answer unless it is
|
|
47
|
+
* acknowledged (`exportBreak`), and the refusal lists them.
|
|
48
|
+
*
|
|
49
|
+
* - **What changed** is outgoing versus incoming, from the two versions' registries. An outgoing
|
|
50
|
+
* version whose registry states no exports (a first promote, or a push by a CLI older than
|
|
51
|
+
* 0.34.0) promised nothing the registry can name, so nothing is judged broken. Nothing it
|
|
52
|
+
* exported at run time could be listed either, which is what the permission-digest gate
|
|
53
|
+
* beside this one is for.
|
|
54
|
+
* - **Who is a consumer** is the edge's own rule: a primary, active scope of ANOTHER vertical, in
|
|
55
|
+
* a tenant where the producer is installed (any primary, active install, so two installs still
|
|
56
|
+
* count), whose running version (`runningVersionOf`) declares the import. That over-approximates
|
|
57
|
+
* on purpose, for a listed vertical's tenants still pinned to an older producer version: a
|
|
58
|
+
* refusal that names one tenant too many costs an acknowledgement, and one that names too few
|
|
59
|
+
* costs a silent stall.
|
|
60
|
+
* - **A consumer version whose manifest does not parse** is not judged. It cannot be said to
|
|
61
|
+
* break, and refusing every promote over a manifest nobody can parse would make the gate one
|
|
62
|
+
* nobody can pass. A read that THREW is different: the registry could not be asked, so whom the
|
|
63
|
+
* promote breaks is unknown, and this throws. The gate then refuses rather than failing open.
|
|
64
|
+
* A failed directory read throws the same way.
|
|
65
|
+
*
|
|
66
|
+
* Cost: nothing at all unless an export changed. Then one fleet `listScopes`, one
|
|
67
|
+
* `listVerticals` when a scope is on a serving script, and one `readImports` per distinct
|
|
68
|
+
* running consumer version, at most `concurrency` in flight.
|
|
69
|
+
*/
|
|
70
|
+
export async function exportBreaksOf(input) {
|
|
71
|
+
const act = input.act ?? 'promotion';
|
|
72
|
+
// An outgoing manifest that does not parse promised SOMETHING nobody can read. Judging it as
|
|
73
|
+
// "promised nothing" would pass every break unacknowledged, so it refuses, as a thrown read does.
|
|
74
|
+
if (input.outgoing.kind === 'unreadable') {
|
|
75
|
+
throw substratError('unavailable', `cannot say whom this ${act} breaks: the outgoing version's exports could not be read (${input.outgoing.reason})`);
|
|
76
|
+
}
|
|
77
|
+
if (input.outgoing.kind !== 'exports')
|
|
78
|
+
return [];
|
|
79
|
+
const incoming = new Map(input.incoming.kind === 'exports' ? input.incoming.rows.map((r) => [r.type, r.schemaVersion]) : []);
|
|
80
|
+
const changed = new Map();
|
|
81
|
+
for (const r of input.outgoing.rows) {
|
|
82
|
+
const now = incoming.get(r.type) ?? null;
|
|
83
|
+
if (now !== r.schemaVersion)
|
|
84
|
+
changed.set(r.type, { schemaVersion: r.schemaVersion, incoming: now });
|
|
85
|
+
}
|
|
86
|
+
if (changed.size === 0)
|
|
87
|
+
return [];
|
|
88
|
+
const scopes = (await input.admin.listScopes(input.actor, { status: 'active', tenantId: input.tenantId })).filter((s) => isPrimaryScope(s) && s.vertical !== null);
|
|
89
|
+
// Narrowed to one tenant, every scope read is already in a tenant that runs the producer.
|
|
90
|
+
const installedIn = input.tenantId === undefined
|
|
91
|
+
? new Set(scopes.filter((s) => s.vertical === input.producer).map((s) => s.tenantId))
|
|
92
|
+
: null;
|
|
93
|
+
const consumers = scopes.filter((s) => s.vertical !== input.producer && (installedIn?.has(s.tenantId) ?? true));
|
|
94
|
+
if (consumers.length === 0)
|
|
95
|
+
return [];
|
|
96
|
+
const out = [];
|
|
97
|
+
for (const { scope, key, versionId, fact, threw } of await runningImportsOf(input.admin, input.actor, consumers, input.readImports, input.concurrency ?? 8)) {
|
|
98
|
+
if (threw !== undefined) {
|
|
99
|
+
throw substratError('unavailable', `cannot say whom this ${act} breaks: the registry could not be asked what ${key} imports (${threw}) — retry`);
|
|
100
|
+
}
|
|
101
|
+
if (fact?.kind !== 'imports')
|
|
102
|
+
continue;
|
|
103
|
+
for (const row of fact.rows) {
|
|
104
|
+
const hit = row.from === input.producer ? changed.get(row.type) : undefined;
|
|
105
|
+
if (!hit || hit.schemaVersion !== row.schemaVersion)
|
|
106
|
+
continue;
|
|
107
|
+
out.push({
|
|
108
|
+
tenantId: scope.tenantId,
|
|
109
|
+
scopeId: scope.id,
|
|
110
|
+
vertical: scope.vertical,
|
|
111
|
+
version: versionId,
|
|
112
|
+
type: row.type,
|
|
113
|
+
schemaVersion: row.schemaVersion,
|
|
114
|
+
incoming: hit.incoming,
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
return out.sort((a, b) => a.tenantId.localeCompare(b.tenantId) || a.scopeId.localeCompare(b.scopeId) || a.type.localeCompare(b.type));
|
|
119
|
+
}
|
|
120
|
+
/** How `exportBreakRefusal` begins: what lets the promote route recognise it and add the listing. */
|
|
121
|
+
const EXPORT_BREAK_REFUSAL = 'promotion drops or re-versions';
|
|
122
|
+
/** Whether a throw is the promote gate's export-break refusal (`exportBreakRefusal`). */
|
|
123
|
+
export function isExportBreakRefusal(err) {
|
|
124
|
+
return errorCodeOf(err) === 'precondition_failed' && err instanceof Error && err.message.startsWith(EXPORT_BREAK_REFUSAL);
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* The refusal a promote gets for a non-empty `exportBreaksOf` (#1705 PR 3). Counts only: the
|
|
128
|
+
* adapters do not know who is promoting, and a builder must not learn from an error which other
|
|
129
|
+
* tenants import its events. The route that knows the caller lists what they may see.
|
|
130
|
+
*/
|
|
131
|
+
export function exportBreakRefusal(breaks) {
|
|
132
|
+
const types = new Set(breaks.map((b) => b.type)).size;
|
|
133
|
+
const apps = new Set(breaks.map((b) => b.scopeId)).size;
|
|
134
|
+
const tenants = new Set(breaks.map((b) => b.tenantId)).size;
|
|
135
|
+
return (`${EXPORT_BREAK_REFUSAL} ${types} exported event type(s) that ${apps} installed app(s) in ` +
|
|
136
|
+
`${tenants} tenant(s) import — their edges would stop delivering it. Acknowledge it explicitly ` +
|
|
137
|
+
`(exportBreak) to promote, or keep the export and bump its consumers first`);
|
|
138
|
+
}
|
|
139
|
+
/** How `bindExportBreakRefusal` begins: what lets the bind route recognise it (#1756). */
|
|
140
|
+
export const BIND_EXPORT_BREAK_REFUSAL = 'this bind drops or re-versions';
|
|
141
|
+
/** Whether a throw is the bind gate's export-break refusal (`bindExportBreakRefusal`). */
|
|
142
|
+
export function isBindExportBreakRefusal(err) {
|
|
143
|
+
return errorCodeOf(err) === 'precondition_failed' && err instanceof Error && err.message.startsWith(BIND_EXPORT_BREAK_REFUSAL);
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* The refusal a bind gets for a non-empty `bindExportBreaksOf` (#1756). Every break is in the
|
|
147
|
+
* bound scope's own tenant, which the caller addressed, so it names no one else — but it stays in
|
|
148
|
+
* counts, as the promote refusal does, and the route that knows the caller adds the listing.
|
|
149
|
+
*/
|
|
150
|
+
export function bindExportBreakRefusal(breaks) {
|
|
151
|
+
const types = new Set(breaks.map((b) => b.type)).size;
|
|
152
|
+
const apps = new Set(breaks.map((b) => b.scopeId)).size;
|
|
153
|
+
return (`${BIND_EXPORT_BREAK_REFUSAL} ${types} exported event type(s) that ${apps} installed app(s) in ` +
|
|
154
|
+
`this tenant import — their edges would stop delivering it. Acknowledge it explicitly ` +
|
|
155
|
+
`(exportBreak) to bind, or bind a version that keeps the export`);
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* What a bind or a route change moves `scope` between (#1756, #2178): the version it runs before
|
|
159
|
+
* and the one it runs after (`runningVersionOf` on both of its inputs), or null when the move
|
|
160
|
+
* changes nothing it runs — a re-point that stays on the serving script — or it ran nothing before
|
|
161
|
+
* (a first bind). `servingRef` omitted: the route is unchanged.
|
|
162
|
+
*/
|
|
163
|
+
export function scopeMoveOf(scope, incomingVersionId, servingRef, serving) {
|
|
164
|
+
const before = runningVersionOf(scope, serving);
|
|
165
|
+
const after = runningVersionOf({ verticalVersionId: incomingVersionId, servingRef: servingRef === undefined ? scope.servingRef : servingRef }, serving);
|
|
166
|
+
return before === null || after === null || before === after ? null : { before, after };
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Whom moving `scope` breaks (#1756): the promote gate's question (`exportBreaksOf`), asked of
|
|
170
|
+
* ONE install in its own tenant, since an edge never crosses one.
|
|
171
|
+
*
|
|
172
|
+
* A scope's exports leave from the code it RUNS, and `runningVersionOf` names that code from two
|
|
173
|
+
* inputs: the version pointer and the serving ref. So a move is either or both of them changing —
|
|
174
|
+
* a bind (`next.versionId`), or a route onto or off a serving script (`next.servingRef`, which is
|
|
175
|
+
* how an adopt moves a scope before its pointer ever does). Both are judged by the same rule, on
|
|
176
|
+
* the running version before against the running version after, the rule the consumers are judged
|
|
177
|
+
* on too:
|
|
178
|
+
*
|
|
179
|
+
* - **Re-pointing a scope that stays on its vertical's serving script** changes nothing it runs,
|
|
180
|
+
* so it is never refused. The change reached it when the serving script was replaced — at a
|
|
181
|
+
* promote, which judged every tenant then. A route ONTO the serving script is not that case:
|
|
182
|
+
* the scope goes from its own version to whatever is served, and that is judged.
|
|
183
|
+
* - **A fork or a preview** is never an edge's producer (`resolveVerticalInstanceFrom` takes the
|
|
184
|
+
* primary install only), so nothing it runs can break an edge.
|
|
185
|
+
* - **A scope still provisioning** has never been active, so no edge has ever delivered from it.
|
|
186
|
+
* - **A first bind** runs nothing before it, so it promised nothing.
|
|
187
|
+
* - **A lineage crossing** (the version belongs to another vertical than the scope's, or the route
|
|
188
|
+
* goes onto a script that is not this vertical's serving script) is not judged here, and nothing
|
|
189
|
+
* else judges it either: every consumer importing `from` the old slug
|
|
190
|
+
* loses its producer, and `rebind-vertical`'s acknowledgements are about migrations, not about
|
|
191
|
+
* that. A known gap, older than this gate.
|
|
192
|
+
*/
|
|
193
|
+
export async function bindExportBreaksOf(input) {
|
|
194
|
+
const { scope } = input;
|
|
195
|
+
if (!isPrimaryScope(scope) || scope.status === 'provisioning')
|
|
196
|
+
return [];
|
|
197
|
+
if (scope.vertical === null || scope.vertical !== input.incoming.verticalSlug)
|
|
198
|
+
return [];
|
|
199
|
+
// A route onto a script that is not this vertical's serving script is a lineage crossing (or a
|
|
200
|
+
// ref this host cannot name), and what the scope runs there is not this vertical's code at all:
|
|
201
|
+
// the same known gap as above, never a phantom move judged against the wrong vertical.
|
|
202
|
+
if (typeof input.servingRef === 'string' && input.servingRef !== input.serving?.ref)
|
|
203
|
+
return [];
|
|
204
|
+
const move = scopeMoveOf(scope, input.incoming.id, input.servingRef, input.serving);
|
|
205
|
+
if (move === null)
|
|
206
|
+
return [];
|
|
207
|
+
const [outgoing, incoming] = await Promise.all([input.readExports(move.before), input.readExports(move.after)]);
|
|
208
|
+
return exportBreaksOf({
|
|
209
|
+
admin: input.admin,
|
|
210
|
+
actor: input.actor,
|
|
211
|
+
producer: scope.vertical,
|
|
212
|
+
outgoing,
|
|
213
|
+
incoming,
|
|
214
|
+
readImports: input.readImports,
|
|
215
|
+
tenantId: scope.tenantId,
|
|
216
|
+
act: 'bind',
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
//# sourceMappingURL=export-break.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"export-break.js","sourceRoot":"","sources":["../src/export-break.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAGrE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,kBAAkB,EAAuB,MAAM,qBAAqB,CAAC;AAEhH;;;;GAIG;AAEH;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,KAAuC,EACvC,KAAsB,EACtB,MAAwB,EACxB,WAAkF,EAClF,WAAmB;IAEnB,MAAM,OAAO,GAAG,MAAM,kBAAkB,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;IAC/D,MAAM,QAAQ,GAAG,IAAI,GAAG,EAA+C,CAAC;IACxE,MAAM,KAAK,GAA8D,EAAE,CAAC;IAC5E,KAAK,MAAM,CAAC,IAAI,MAAM,EAAE,CAAC;QACvB,IAAI,CAAC,CAAC,CAAC,QAAQ;YAAE,SAAS;QAC1B,MAAM,SAAS,GAAG,gBAAgB,CAAC,CAAC,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;QAC/D,MAAM,GAAG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IACzF,+FAA+F;IAC/F,gGAAgG;IAChG,uFAAuF;IACvF,IAAI,OAAO,KAAK,CAAC,UAAU,KAAK,QAAQ,IAAI,KAAK,CAAC,UAAU,KAAK,KAAK,CAAC,OAAO,EAAE,GAAG;QAAE,OAAO,EAAE,CAAC;IAC/F,MAAM,IAAI,GAAG,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IACpF,IAAI,IAAI,KAAK,IAAI;QAAE,OAAO,EAAE,CAAC;IAC7B,MAAM,CAAC,QAAQ,EAAE,QAAQ,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAChH,OAAO,cAAc,CAAC;QACpB,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,QAAQ;QACR,QAAQ;QACR,WAAW,EAAE,KAAK,CAAC,WAAW;QAC9B,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,GAAG,EAAE,MAAM;KACZ,CAAC,CAAC;AACL,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type { AccessLogFilter, AttachmentSearchOptions, AttachmentUploadInput, AuditLogFilter, BlobStoreProvisionInput, BlobStoreRecord, ConsumerHandler, ImportHandler, ExecutorDeadLetter, ExecutorDrainReport, ExecutorHandler, ExecutorOutcome, ExecutorRetryPolicy, ExecutorScope, MembershipChange, MembershipChangeResult, ConnectorConnection, ScopedConnectorConnection, ConnectorContext, ConnectorHandler, ConnectorOptions, ConnectorRequestInit, ConnectorResponse, Clock, FetchLike, GuardPredicate, HostAdmin, MigrateScopeOutcome, ReconcileOutcome, MigrationFrontier, ModuleRegistration, ConsumersOf, EventContract, EventPayloadOf, EventTypeOf, TypedConsumerHandler, TypedConsumers, OpenedAttachment, OperationContext, PageParams, OperationHandler, AppliedMigration, OpsFailureFilter, OpsFailureInput, KeptCopyResolution, ScopeScriptCopy, ScopeCopyRole, ScopeCopyMoveConfirmation, IssueFilter, TelemetryPruneReport, SweepRunFilter, SweepRunInput, ProvisionScopeInput, RoleFilter, FreshnessRegistration, FreshnessReport, LiveChange, LiveFrame, LiveNudge, LiveReadSurface, LiveUpgradeRequest, OperationEntitlement, ScheduleRegistration, ScheduleRunReport, ScopeAttachments, ScopedSql, ScopeFilter, ScopeHost, ScopeStub, ScopeStubOptions, InvokeOptions, EmittedEvent, EmittedReport, SqlMigration, SqlValue, TenantBlobStore, TenantRelationalStore, TenantStoreProvisionInput, TenantStoreRecord, } from './scope-host.js';
|
|
1
|
+
export type { AccessLogFilter, AttachmentSearchOptions, AttachmentUploadInput, UploadLinkRedeemInput, AuditLogFilter, BlobStoreProvisionInput, BlobStoreRecord, ConsumerHandler, ImportHandler, ExecutorDeadLetter, ExecutorDrainReport, ExecutorHandler, ExecutorOutcome, ExecutorRetryPolicy, ExecutorScope, MembershipChange, MembershipChangeResult, ConnectorConnection, ScopedConnectorConnection, ConnectorContext, ConnectorHandler, ConnectorOptions, ConnectorRequestInit, ConnectorResponse, Clock, FetchLike, GuardPredicate, HostAdmin, MigrateScopeOutcome, ReconcileOutcome, MigrationFrontier, ModuleRegistration, ConsumersOf, EventContract, EventPayloadOf, EventTypeOf, TypedConsumerHandler, TypedConsumers, OpenedAttachment, OperationContext, PageParams, OperationHandler, AppliedMigration, OpsFailureFilter, OpsFailureInput, KeptCopyResolution, ScopeScriptCopy, ScopeCopyRole, ScopeCopyMoveConfirmation, IssueFilter, TelemetryPruneReport, SweepRunFilter, SweepRunInput, ProvisionScopeInput, RoleFilter, FreshnessRegistration, FreshnessReport, LiveChange, LiveFrame, LiveNudge, LiveReadSurface, LiveUpgradeRequest, OperationEntitlement, ScheduleRegistration, ScheduleRunReport, ScopeAttachments, ScopedSql, ScopeFilter, ScopeHost, ScopeStub, ScopeStubOptions, InvokeOptions, EmittedEvent, EmittedReport, SqlMigration, SqlValue, TenantBlobStore, TenantRelationalStore, TenantStoreProvisionInput, TenantStoreRecord, } from './scope-host.js';
|
|
2
2
|
export { GRANT_CHILDREN_INDEX_DDL } from './grant-scoped-read.js';
|
|
3
3
|
export { callReservedStoreOperation, callScopeStore, observeStoreCall, replayStoreErasures, scopeStoreLifecycleOf, scopeStoreRunnersOf, type ReservedStoreResult, type ScopeStoreAddress, type ScopeStoreHostOptions, type ScopeStoreLifecycle, type ScopeStoreRunner, type ScopeStoreStubOptions, type StoreCallReport, type StoreErasureReplay, type StoreStub, } from './scope-store.js';
|
|
4
4
|
export type { GrantedEntitiesPage, GrantedEntityIdsMayRepeatPage } from './grant-scoped-read.js';
|
|
@@ -7,7 +7,7 @@ export { connectorCallRecord, noopConnectorCallRecorder, recordConnectorCall, se
|
|
|
7
7
|
export { requestEmail, settlePlatformRequestIn } from './email-intent.js';
|
|
8
8
|
export type { OutcomeEventStamp, PlatformRequestSettle } from './email-intent.js';
|
|
9
9
|
export type { MailAddress, MailSender, MailSendResult, OutboundMail, OutboundMailAttachment, } from './mail-sender.js';
|
|
10
|
-
export { COPY_CLAIM_SQL, COPY_RESTORE_FENCE_LAPSED, copyRestoreFence, copyRestoreFenceLapsed, type CopyRestoreFence, BACKFILL_MOVE_ID, COPY_BACKFILL_SCOPE_SQL, COPY_BACKFILL_SQL, COPY_BACKFILL_SUPERSEDE_SQL, copyBackfillParams, copyBackfillRefusal, type ScopeCopyBackfillResult, type CopyBackfillScopeRow, type ErasureEpochStamp, COPY_EXPIRED_SQL, COPY_MOVE_CONFIRM_SQL, COPY_MOVE_LIVE_PREDICATE, SCOPE_SCRIPT_COPY_COLUMNS, copyMoveConfirmParams, copyMoveLiveParams, scopeScriptCopyOf, type ScopeScriptCopyRow, } from './scope-copy-ledger.js';
|
|
10
|
+
export { COPY_CLAIM_SQL, COPY_RESTORE_FENCE_LAPSED, copyRestoreFence, copyRestoreFenceLapsed, type CopyRestoreFence, BACKFILL_MOVE_ID, COPY_BACKFILL_SCOPE_SQL, COPY_BACKFILL_SQL, COPY_BACKFILL_SUPERSEDE_SQL, copyBackfillParams, copyBackfillRefusal, type ScopeCopyBackfillResult, type CopyBackfillScopeRow, type ErasureEpochStamp, SUBJECT_ERASURE_CLAIM_SQL, subjectErasureClaimParams, type SubjectErasureFence, COPY_EXPIRED_SQL, COPY_MOVE_CONFIRM_SQL, COPY_MOVE_LIVE_PREDICATE, SCOPE_SCRIPT_COPY_COLUMNS, copyMoveConfirmParams, copyMoveLiveParams, scopeScriptCopyOf, type ScopeScriptCopyRow, } from './scope-copy-ledger.js';
|
|
11
11
|
export { SCOPE_COPY_LEASE_MS, assertRedrainWindow, attachmentBlobKey, attachmentSha256, consumersFor, entitlementDenial, requiredEntitlementFor, backoffAt, globalFetch, executorOutcomeOf, parseValidationRecords, resolveRetryPolicy, OPS_FAILURE_RETENTION_DAYS, SWEEP_RUN_RETENTION_DAYS, SWEEP_RUNS_INTENT_INDEX, sweepRunsIntentHasKind, ISSUE_RETENTION_DAYS, telemetryRetentionStatements, assertRowLimit, assertRowOffset, EMITTED_REPORT_CAP, isUpgradeRequest, isVouchedWithin, vouchedWithin, type VouchedWithin, checkedWithin, isCheckedWithin, type CheckedWithin, } from './scope-host.js';
|
|
12
12
|
export { assertBoundOperations, operationsFor, undeclaredOperations, type BoundOperations, type HandlerMap, } from './module-operations.js';
|
|
13
13
|
export { isSecretBoxConfigured, SecretBoxUnconfiguredError, unconfiguredSecretBox, webCryptoSecretBox, } from './secret-box.js';
|
|
@@ -25,6 +25,8 @@ export { actorOf, asPrincipal, unknownRoleError } from './permission-checker.js'
|
|
|
25
25
|
export type { Holdings, PermissionChecker } from './permission-checker.js';
|
|
26
26
|
export { ancestorsWithin, createTupleEvaluator, grantedEntitiesForContext, memberAddedAudit, orgChangeBound, reachesWithin, tenantCoverage, } from './permission-eval.js';
|
|
27
27
|
export type { PermissionTupleReader, TenantDirectoryReader, PermissionTupleRow, ScopeTupleReader, } from './permission-eval.js';
|
|
28
|
+
export { UPLOAD_LINK_DDL, UPLOAD_LINK_GONE, UPLOAD_LINK_TOO_LARGE, UPLOAD_LINK_TYPE_REFUSED, UPLOAD_LINK_WRONG_TARGET, createAttachmentVerbs, inspectUploadLink, redeemUploadLinkInTransaction, uploadContentTypeAllowed, } from './upload-link.js';
|
|
29
|
+
export type { AttachmentVerbDeps, AttachmentVerbs, UploadLinkInspection, UploadTarget, } from './upload-link.js';
|
|
28
30
|
export { CAPABILITY_DDL, CAPABILITY_EXCHANGE_OPERATION, CAPABILITY_SESSION_PRUNE_BATCH, WITHHELD_SECRET, assertNoSecret, capabilityAttachmentWriteRefused, capabilityByIdQuery, capabilityTokenHash, checkBecomeInput, createCapabilityVerbs, exchangeCapability, guardSecrets, mintBecomeCapability, mintCapabilitySecret, readCapabilityPage, plausibleSessionToken, plausibleCapabilitySecret, redactSecrets, redactSecretText, resolveCapabilitySession, revokeCapabilityAsPlatform, CAPABILITY_BECOME_MINT_OPERATION, becomeMintCheck, readBecomeLinkStates, assertBecomeLinkStateIds, mintBecomeCapabilityAsPrincipal, revokeBecomeCapabilityAsPrincipal, allowedFor, } from './capability.js';
|
|
29
31
|
export type { CapabilityGrantView, CapabilityRow, CapabilityVerbDeps, CapabilityVerbs, } from './capability.js';
|
|
30
32
|
export { createEntityEdgeVerbs } from './entity-edges.js';
|
|
@@ -89,6 +91,8 @@ export { ADMIN_LOG_INDEX_DDL, ADMIN_LOG_INDEXES_SQL } from './admin-log-ddl.js';
|
|
|
89
91
|
export { AUDITED_CHANGE_ACTIONS, SETTLE_INTENT_SQL, SETTLE_OUTCOME_SQL, settleOutcomeParamsOf, operationKeyOf, auditedOperationsSql, effectiveOutcomes, isSupersededOutcome, readAuditedOperations, unknownOutcomeOf, UNRECORDED_OUTCOME_LOG, recordAuditOutcome, auditedCapabilityRevoke, auditWarningOf, } from './audit-outcome.js';
|
|
90
92
|
export type { AuditLogError, AuditedChangeAction, AuditedOperationRef, AuditedOperationRow, AuditedOperationSqlRow, AuditedPhase, EffectiveOutcome, OperationKey, SettleIntentRow, UnknownOutcome, } from './audit-outcome.js';
|
|
91
93
|
export { VERSION_MIGRATIONS_DDL, splitManifestMigrations, splitVersionMigrationsBatch, versionMigrationsOf, versionsAwaitSplit, writeVersionMigrations, } from './version-migrations.js';
|
|
94
|
+
export { VERTICAL_SCOPE_STORES_DDL, forgetVerticalScopeStores, indexVersionScopeStores, kindDeclarationsOf, verticalScopeStoresOf, type VerticalScopeStore, } from './vertical-scope-stores.js';
|
|
95
|
+
export { STORE_KIND_RELEASES_DDL, beginStoreKindRolloutIn, finishStoreKindRolloutIn, holdStoreKindIn, recordStoreKindReleaseIn, releaseStoreKindHoldIn, storeKindReleaseIn, storeKindStateIn, type StoreKindHoldMode, type StoreKindReleaseRecord, type StoreKindRolloutAction, type StoreKindRolloutRecord, type StoreKindRolloutState, type StoreKindState, } from './store-kind-releases.js';
|
|
92
96
|
export type { SplitManifest } from './version-migrations.js';
|
|
93
97
|
export { admitPeer, collectPeers, peerGrantsStatus, peerSeats, peerSubjectRef, resolveVerticalInstanceFrom, switchPeer, } from './peer.js';
|
|
94
98
|
export { PEER_BINDINGS_DDL, isPeerInstanceOf, peerCallerAt, peerVerticalSpellings, resolvePeerInstanceFrom, samePeerVertical } from './peer.js';
|
|
@@ -109,11 +113,15 @@ export type { OutboxEnvelopeRow, OutboxDrainRow, UndrainedEvents, UndrainedRead,
|
|
|
109
113
|
export { IDEMPOTENCY_DDL, assertIdempotencyKey, idempotencyLookupQuery, idempotencyPruneStatement, idempotencyRecordStatement, idempotencyOptedOutMessage, replayFor, type IdempotencyRow, type IdempotentReplay, } from './idempotency.js';
|
|
110
114
|
export { JOB_RUN_DDL, JOB_RUN_PATCH_SQL, JOB_RUN_CLAIM_SQL, JOB_RUN_RENEW_SQL, JOB_RUN_BEGIN_SQL, JOB_RUN_MISS_SQL, JOB_RUN_MISS_SETTLE_SQL, admissionMissOutcome, JOB_STEP_RECORD_SQL, JOB_LEASE_MS, JOB_LEASE_MIN_MS, JOB_ADMISSION_MISS_MAX, JOB_LEASE_TOO_SHORT_NOTE, admissionBackoffMs, JOB_LEASE_EXPIRED_NOTE, assertLeaseMs, jobRunListLimit, SYSTEM_DOOR_WAIT, JOB_DEFER_MS, JOB_RUN_DUE_AT, jobRunOf, runDueJobRuns, runJobPass, startJobRun, } from './job-run.js';
|
|
111
115
|
export type { JobDueKey, JobDriveReport, JobHandler, JobPassContext, JobPassOutcome, JobPassResult, JobRun, JobRegistration, JobRunClaim, JobRunFilter, JobRunKey, JobRunPatch, JobRunRow, JobRunStatus, JobRunStore, JobStepRow, StartJobRunInput, } from './job-run.js';
|
|
112
|
-
export { runPlatformSweep, startPlatformSweeper,
|
|
113
|
-
export
|
|
114
|
-
export {
|
|
115
|
-
export {
|
|
116
|
-
export
|
|
116
|
+
export { runPlatformSweep, startPlatformSweeper, StorageReadUnsupported, PROVISION_RECONCILE_BATCH, CROSS_VERTICAL_CONSUMERS_PER_PASS, runCrossVerticalFrom, registryImportCandidates, crossVerticalHealth, } from './platform-sweep.js';
|
|
117
|
+
export { SCHEDULE_STATE_DDL, SCHEDULE_STATE_REBUILD, scheduleStateHasKind } from './schedule-state.js';
|
|
118
|
+
export type { ScheduleSweepReport, ScheduleStateKind } from './schedule-state.js';
|
|
119
|
+
export type { AccessLogSink, EventSink, EventDrainReport, EventDrainSkipped, PlatformRequestUnsettleable, AccessLogSweepReport, ConnectorSweeper, MigrationSweepReport, PlatformSweepOptions, PlatformSweepReport, PlatformSweeperHandle, StartPlatformSweeperOptions, StorageGaugeSweepOptions, StorageGaugeSweepReport, CandidatesHint, CrossVerticalEdge, CrossVerticalOptions, CrossVerticalReach, CrossVerticalReport, ProvisionReconcileReport, } from './platform-sweep.js';
|
|
120
|
+
export { isPrimaryScope, isPrimaryScopeRow, INERT_SCOPE_REASON, runningVersionOf } from './scope-identity.js';
|
|
121
|
+
export type { ServingPointer } from './scope-identity.js';
|
|
122
|
+
export { exportBreaksOf, exportBreakRefusal, isExportBreakRefusal, bindExportBreaksOf, scopeMoveOf, bindExportBreakRefusal, BIND_EXPORT_BREAK_REFUSAL, isBindExportBreakRefusal, } from './export-break.js';
|
|
123
|
+
export { PROVISIONED_VERSIONS_SQL, installsReconciledOf, installsReconciledNote, installReconciled, boundEverOf, boundShapesColumn, boundShapesOfColumn, provisionedVersionsParams, strandJudgmentsOf, } from './install-receipts.js';
|
|
124
|
+
export type { InstallsReconciled, StrandJudgment } from './install-receipts.js';
|
|
117
125
|
export { migrationProgress, } from './migration-progress.js';
|
|
118
126
|
export type { ScopeMigrationState } from './migration-progress.js';
|
|
119
127
|
export { foldMeterReading } from './meters.js';
|