@substrat-run/kernel 0.117.0 → 0.119.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.
Files changed (51) hide show
  1. package/dist/capability.d.ts +22 -1
  2. package/dist/capability.d.ts.map +1 -1
  3. package/dist/capability.js +20 -0
  4. package/dist/capability.js.map +1 -1
  5. package/dist/connector-calls.d.ts +205 -0
  6. package/dist/connector-calls.d.ts.map +1 -0
  7. package/dist/connector-calls.js +192 -0
  8. package/dist/connector-calls.js.map +1 -0
  9. package/dist/idempotency.d.ts +7 -1
  10. package/dist/idempotency.d.ts.map +1 -1
  11. package/dist/idempotency.js +8 -2
  12. package/dist/idempotency.js.map +1 -1
  13. package/dist/index.d.ts +14 -9
  14. package/dist/index.d.ts.map +1 -1
  15. package/dist/index.js +8 -5
  16. package/dist/index.js.map +1 -1
  17. package/dist/job-run.d.ts +28 -0
  18. package/dist/job-run.d.ts.map +1 -1
  19. package/dist/job-run.js +37 -0
  20. package/dist/job-run.js.map +1 -1
  21. package/dist/peer.d.ts +132 -0
  22. package/dist/peer.d.ts.map +1 -0
  23. package/dist/peer.js +177 -0
  24. package/dist/peer.js.map +1 -0
  25. package/dist/permission-checker.d.ts +1 -1
  26. package/dist/permission-checker.d.ts.map +1 -1
  27. package/dist/permission-checker.js +4 -1
  28. package/dist/permission-checker.js.map +1 -1
  29. package/dist/platform-sweep.d.ts +116 -1
  30. package/dist/platform-sweep.d.ts.map +1 -1
  31. package/dist/platform-sweep.js +209 -0
  32. package/dist/platform-sweep.js.map +1 -1
  33. package/dist/scope-host.d.ts +228 -7
  34. package/dist/scope-host.d.ts.map +1 -1
  35. package/dist/scope-host.js.map +1 -1
  36. package/dist/subject-redaction.d.ts +120 -7
  37. package/dist/subject-redaction.d.ts.map +1 -1
  38. package/dist/subject-redaction.js +155 -3
  39. package/dist/subject-redaction.js.map +1 -1
  40. package/dist/system-switch.d.ts +38 -0
  41. package/dist/system-switch.d.ts.map +1 -1
  42. package/dist/system-switch.js +50 -3
  43. package/dist/system-switch.js.map +1 -1
  44. package/dist/timeline.d.ts.map +1 -1
  45. package/dist/timeline.js +30 -3
  46. package/dist/timeline.js.map +1 -1
  47. package/dist/vertical-events.d.ts +162 -0
  48. package/dist/vertical-events.d.ts.map +1 -0
  49. package/dist/vertical-events.js +348 -0
  50. package/dist/vertical-events.js.map +1 -0
  51. package/package.json +2 -2
package/dist/peer.js ADDED
@@ -0,0 +1,177 @@
1
+ /**
2
+ * Peers (#1706) — the kernel's half of one vertical calling another's operations, written once
3
+ * so both adapters (and the platform's resolver) cannot disagree about any of it.
4
+ *
5
+ * What lives here, and why each is one function:
6
+ *
7
+ * - **`collectPeers`** — the union of every registered module's `peers` declaration. A vertical
8
+ * is several modules on one host; the door reads them as one declaration per peer vertical.
9
+ * - **`peerSeats`** — the `vertical:<slug>` grants provisioning seats on a scope. The ONE place
10
+ * that decides "a declared peer holds its keys once installed" (decision F2 on #1706): if that
11
+ * decision flips to "a tenant admin enables each edge", this call moves from provisioning to
12
+ * the enabling verb and nothing else changes.
13
+ * - **`admitPeer`** — the door's admission, run inside the scope's own serialized task on every
14
+ * call: the peer is declared, its kill switch is on, and the operation is on its allowlist.
15
+ * None of those refusals is a K-35 denial (no key was checked), exactly as the capability
16
+ * door's are. `operation: null` admits a DELIVERY rather than an invocation (#1705's
17
+ * cross-vertical events) — the same declaration and the same switch, and no allowlist, since
18
+ * a delivery names no operation.
19
+ * - **`switchPeer`** — the per-(scope, peer) kill switch, which is #1666's switch applied to a
20
+ * `vertical:` subject (`switchSubjectGrants`): OFF tombstones every grant the peer holds on the
21
+ * scope and makes an OFF marker live. The checker reads only live `granted:`/`role:` tuples,
22
+ * so a switched-off peer holds nothing to ANY check — `covers` included — without the checker
23
+ * knowing the marker exists; and `seatScopeTuple` seats nothing for a subject whose marker is
24
+ * live, so no re-provision can hand the grants back. `restoreToPeer` is the only way back.
25
+ * - **`peerGrantsStatus`** — the read half of that switch: every peer this scope holds or has
26
+ * held grants for, and where each stands. The SAME predicate `admitPeer` gates on, so the
27
+ * status a tenant reads and the answer a call gets cannot disagree.
28
+ * - **`resolveVerticalInstanceFrom`** — "the instance of vertical Y in tenant T": one rule for
29
+ * every directory that is asked.
30
+ *
31
+ * What is deliberately NOT here: who is calling. The door is handed a `VerticalCaller` by the
32
+ * platform (the router on the hosted path, the local broker on the pure host), and trusts it the
33
+ * way `getConnectorScope` trusts the connection id the control plane hands it. The door's own
34
+ * guarantees are the ones above; the caller's liveness and tenancy are the platform's gate.
35
+ */
36
+ import { substratError, } from '@substrat-run/contracts';
37
+ import { isPrimaryScope } from './platform-sweep.js';
38
+ import { SYSTEM_SWITCH_OFF_RELATION, subjectGrantState, subjectSwitchedOff, switchSubjectGrants, } from './system-switch.js';
39
+ /** The tuple-subject prefix of a peer vertical — `vertical:acme/board-room`. */
40
+ export const PEER_SUBJECT_PREFIX = 'vertical:';
41
+ /** The tuple subject a peer's grants are seated under. The slug only, never the instance. */
42
+ export const peerSubjectRef = (vertical) => `${PEER_SUBJECT_PREFIX}${vertical}`;
43
+ /**
44
+ * The union of every module's `peers` declaration, keyed by peer slug. Two modules naming one
45
+ * peer contribute both of their allowlists and both of their key sets: each module speaks for
46
+ * its own operations, and a reviewer reads each entry in its own module's permission section.
47
+ */
48
+ export function collectPeers(manifests) {
49
+ const out = new Map();
50
+ for (const manifest of manifests) {
51
+ for (const peer of manifest.peers ?? []) {
52
+ const entry = out.get(peer.vertical) ?? {
53
+ vertical: peer.vertical,
54
+ operations: new Set(),
55
+ permissions: new Set(),
56
+ };
57
+ for (const op of peer.operations)
58
+ entry.operations.add(op);
59
+ for (const p of peer.permissions)
60
+ entry.permissions.add(p);
61
+ out.set(peer.vertical, entry);
62
+ }
63
+ }
64
+ return out;
65
+ }
66
+ /**
67
+ * The grants a scope holds for its declared peers: `vertical:<slug>` / `granted:<perm>` /
68
+ * `scope:<id>`, one per declared key, in a stable order. Seated with `seatScopeTuple` — so a
69
+ * grant an operator's switch tombstoned stays tombstoned (#1659), and a peer whose switch is off
70
+ * gets nothing seated at all.
71
+ */
72
+ export function peerSeats(peers, scopeId) {
73
+ const out = [];
74
+ for (const peer of [...peers.values()].sort((a, b) => a.vertical.localeCompare(b.vertical))) {
75
+ for (const permission of [...peer.permissions].sort()) {
76
+ out.push({ subject: peerSubjectRef(peer.vertical), relation: `granted:${permission}`, object: `scope:${scopeId}` });
77
+ }
78
+ }
79
+ return out;
80
+ }
81
+ /**
82
+ * The door's admission (#1706), run inside the scope's own serialized task on every call, so a
83
+ * switch pulled between two calls refuses the second. Throws `forbidden` — a door refusal, never
84
+ * a K-35 denial: no permission was checked, exactly as for a capability's allowlist. Returns the
85
+ * check subject the operation then runs as, with every ordinary `ctx.check` inside it.
86
+ *
87
+ * `operation: null` is a delivery (#1705), which names no operation and so meets no allowlist.
88
+ */
89
+ export function admitPeer(db, peers, caller, operation) {
90
+ const declared = peers.get(caller.vertical);
91
+ if (!declared) {
92
+ throw substratError('forbidden', `vertical '${caller.vertical}' is not a declared peer of this vertical — a peer is declared in ` +
93
+ `the target's module manifest (\`peers\`), and reviewed in its PERMISSIONS.md`);
94
+ }
95
+ if (subjectSwitchedOff(db, peerSubjectRef(caller.vertical))) {
96
+ throw substratError('forbidden', `vertical '${caller.vertical}' is switched off on this scope — restoreToPeer turns it back on`);
97
+ }
98
+ if (operation !== null && !declared.operations.has(operation)) {
99
+ throw substratError('forbidden', `vertical '${caller.vertical}' may not invoke '${operation}' — it is not among the operations ` +
100
+ `this vertical's \`peers\` declaration allows it`);
101
+ }
102
+ return { kind: 'vertical', id: caller.vertical, scope: caller.scope };
103
+ }
104
+ /**
105
+ * Move one peer's kill switch on one scope. Idempotent, and `held: false` with nothing written
106
+ * when the scope holds neither a grant nor a marker for that peer — a typo'd slug, or a peer this
107
+ * scope was never provisioned with, must not write a marker that silently blocks it the day a
108
+ * version declaring it lands. Run inside one transaction.
109
+ */
110
+ export function switchPeer(db, input) {
111
+ return switchSubjectGrants(db, {
112
+ subject: peerSubjectRef(input.vertical),
113
+ scopeId: input.scopeId,
114
+ to: input.to,
115
+ at: input.at,
116
+ });
117
+ }
118
+ /** Is this peer switched off on the scope `db` is? */
119
+ export function peerSwitchedOff(db, vertical) {
120
+ return subjectSwitchedOff(db, peerSubjectRef(vertical));
121
+ }
122
+ /**
123
+ * Every peer this scope holds or has held grants for, and where each stands (#1706) — the
124
+ * read half of the kill switch, and `systemGrantsStatus`'s shape with the subject swapped.
125
+ *
126
+ * One SELECT enumerating the `vertical:<slug>` subjects this scope's storage has a `granted:`
127
+ * tuple or an OFF marker for — revoked rows included, deliberately: a peer whose grants were
128
+ * tombstoned must keep appearing, as `ungranted`, rather than vanishing from the view that
129
+ * exists to say where it stands. A peer the scope never had any row for is absent, which is
130
+ * the honest answer to "what does this scope know about peers" — "not installed here" is a
131
+ * fact the DIRECTORY holds, not this storage, and the surfaces above join the two.
132
+ *
133
+ * Then `subjectGrantState` per subject: the SAME predicate `admitPeer` refuses on, so the
134
+ * status a tenant reads and the answer the next call gets cannot disagree.
135
+ *
136
+ * `substr` rather than `LIKE`, as everywhere on this table: `LIKE` is case-insensitive in
137
+ * SQLite and a Durable Object caps its patterns (#1655).
138
+ */
139
+ export function peerGrantsStatus(db, now) {
140
+ const rows = db.all(`SELECT DISTINCT subject FROM _substrat_tuples
141
+ WHERE substr(subject, 1, ${PEER_SUBJECT_PREFIX.length}) = '${PEER_SUBJECT_PREFIX}'
142
+ AND (substr(relation, 1, 8) = 'granted:' OR relation = '${SYSTEM_SWITCH_OFF_RELATION}')
143
+ ORDER BY subject`);
144
+ return rows.map((row) => {
145
+ const vertical = row.subject.slice(PEER_SUBJECT_PREFIX.length);
146
+ return { vertical, calls: subjectGrantState(db, row.subject, now) };
147
+ });
148
+ }
149
+ /**
150
+ * "The instance of vertical Y in tenant T" (#1706) — the one rule every directory applies.
151
+ *
152
+ * A candidate is a scope of THAT tenant, bound to THAT vertical, primary (`isPrimaryScope`: not a
153
+ * fork, not a preview — a preview must never receive another app's production calls), and
154
+ * `active` (a suspended or archived instance answers nothing). Exactly one → `resolved`; none →
155
+ * `not-installed`; more than one → `ambiguous`, refused rather than guessed.
156
+ *
157
+ * The tenant is a parameter, and it is the ONLY tenant searched: nothing in a caller's request
158
+ * names a tenant, so a cross-tenant answer is not reachable from here.
159
+ */
160
+ export function resolveVerticalInstanceFrom(scopes, tenantId, vertical) {
161
+ const matches = [];
162
+ for (const scope of scopes) {
163
+ if (scope.tenantId !== tenantId || scope.vertical !== vertical)
164
+ continue;
165
+ if (scope.status !== 'active' || !isPrimaryScope(scope))
166
+ continue;
167
+ matches.push(scope);
168
+ }
169
+ const [only] = matches;
170
+ if (only && matches.length === 1) {
171
+ return { outcome: 'resolved', instance: { tenantId: only.tenantId, scopeId: only.id, vertical } };
172
+ }
173
+ if (matches.length === 0)
174
+ return { outcome: 'not-installed', tenantId, vertical };
175
+ return { outcome: 'ambiguous', tenantId, vertical, count: matches.length };
176
+ }
177
+ //# sourceMappingURL=peer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"peer.js","sourceRoot":"","sources":["../src/peer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,OAAO,EACL,aAAa,GAOd,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EACL,0BAA0B,EAC1B,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,GAGpB,MAAM,oBAAoB,CAAC;AAE5B,gFAAgF;AAChF,MAAM,CAAC,MAAM,mBAAmB,GAAG,WAAW,CAAC;AAE/C,6FAA6F;AAC7F,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,QAAgB,EAAU,EAAE,CAAC,GAAG,mBAAmB,GAAG,QAAQ,EAAE,CAAC;AAYhG;;;;GAIG;AACH,MAAM,UAAU,YAAY,CAAC,SAAoD;IAC/E,MAAM,GAAG,GAAG,IAAI,G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EAAE,CAAC;QACjC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,EAAE,QAAQ,EAAE,EAAE,CAAC;IACpG,CAAC;IACD,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC;IAClF,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC;AAC7E,CAAC"}
@@ -50,7 +50,7 @@ export declare const asPrincipal: (id: PrincipalId) => CheckSubject;
50
50
  * The spine ACTOR a check subject is recorded as — on an event, a denial, a platform
51
51
  * intent. One mapping, so the four places that record "who" cannot disagree about it: a
52
52
  * principal is its bare id, and every subject that is not a person is the object form that
53
- * says what it is instead (#97, #383, #1672).
53
+ * says what it is instead (#97, #383, #1672, #1706).
54
54
  */
55
55
  export declare const actorOf: (subject: CheckSubject) => Actor;
56
56
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"permission-checker.d.ts","sourceRoot":"","sources":["../src/permission-checker.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,aAAa,EACb,KAAK,KAAK,EACV,KAAK,QAAQ,EACb,KAAK,QAAQ,EACb,KAAK,SAAS,EACd,KAAK,IAAI,EACT,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,WAAW,EACjB,MAAM,yBAAyB,CAAC;AAEjC;;;;;;;;;GASG;AACH,MAAM,WAAW,iBAAiB;IAChC;;;;OAIG;IACH,KAAK,CACH,OAAO,EAAE,YAAY,EACrB,UAAU,EAAE,aAAa,EACzB,IAAI,EAAE,IAAI,EACV,MAAM,CAAC,EAAE,SAAS,GACjB,OAAO,CAAC,QAAQ,CAAC,CAAC;IACrB;;;;;;;;;;;;;;;;;;;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,UAAU,EAAE,aAAa,EACzB,IAAI,EAAE,IAAI,EACV,MAAM,CAAC,EAAE,SAAS,GACjB,OAAO,CAAC,QAAQ,CAAC,CAAC;IACrB;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,MAAM,CACJ,OAAO,EAAE,YAAY,EACrB,QAAQ,EAAE,SAAS,aAAa,EAAE,EAClC,IAAI,EAAE,IAAI,GACT,OAAO,CAAC,QAAQ,CAAC,CAAC;CACtB;AAED,sDAAsD;AACtD,eAAO,MAAM,WAAW,OAAQ,WAAW,KAAG,YAA2C,CAAC;AAE1F;;;;;GAKG;AACH,eAAO,MAAM,OAAO,YAAa,YAAY,KAAG,KAc/C,CAAC;AAEF;;;;;;GAMG;AACH,qBAAa,gBAAiB,SAAQ,aAAa;IACjD,QAAQ,CAAC,UAAU,CAAC,EAAE,aAAa,CAAC;IACpC,QAAQ,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC;IACrB,YAAY,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE;QAAE,UAAU,EAAE,aAAa,CAAC;QAAC,IAAI,EAAE,IAAI,CAAA;KAAE,EAS9E;CACF;AAED,sFAAsF;AACtF,wBAAgB,aAAa,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,QAAQ,IAAI,OAAO,CAC5E,QAAQ,EACR;IAAE,OAAO,EAAE,IAAI,CAAA;CAAE,CAClB,CAOA;AAED,4FAA4F;AAC5F,eAAO,MAAM,cAAc,EAAE,iBAa5B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,EAAE,iBAgBpC,CAAC"}
@@ -5,7 +5,7 @@ export const asPrincipal = (id) => ({ kind: 'principal', id });
5
5
  * The spine ACTOR a check subject is recorded as — on an event, a denial, a platform
6
6
  * intent. One mapping, so the four places that record "who" cannot disagree about it: a
7
7
  * principal is its bare id, and every subject that is not a person is the object form that
8
- * says what it is instead (#97, #383, #1672).
8
+ * says what it is instead (#97, #383, #1672, #1706).
9
9
  */
10
10
  export const actorOf = (subject) => {
11
11
  switch (subject.kind) {
@@ -17,6 +17,9 @@ export const actorOf = (subject) => {
17
17
  return { connection: subject.id };
18
18
  case 'capability':
19
19
  return { capability: subject.id };
20
+ case 'vertical':
21
+ // #1706: the caller's slug AND the instance that called — see `verticalActor`.
22
+ return { vertical: subject.id, scope: subject.scope };
20
23
  }
21
24
  };
22
25
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"permission-checker.js","sourceRoot":"","sources":["../src/permission-checker.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,aAAa,GASd,MAAM,yBAAyB,CAAC;AAyDjC,sDAAsD;AACtD,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,EAAe,EAAgB,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,CAAC;AAE1F;;;;;GAKG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,OAAqB,EAAS,EAAE;IACtD,QAAQ,OAAO,CAAC,IAAI,EAAE,CAAC;QACrB,KAAK,WAAW;YACd,OAAO,OAAO,CAAC,EAAE,CAAC;QACpB,KAAK,QAAQ;YACX,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,EAAE,CAAC;QAChC,KAAK,YAAY;YACf,OAAO,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,EAAE,CAAC;QACpC,KAAK,YAAY;YACf,OAAO,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,EAAE,CAAC;IACtC,CAAC;AACH,CAAC,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,OAAO,gBAAiB,SAAQ,aAAa;IACxC,UAAU,CAAiB;IAC3B,IAAI,CAAQ;IACrB,YAAY,OAAe,EAAE,MAAkD;QAC7E,KAAK,CAAC,mBAAmB,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,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EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE;QAChC,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,GAAG,QAAQ,CAAC,EAAE;CACjD,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAsB;IACvD,oFAAoF;IACpF,uEAAuE;IACvE,MAAM,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;IACpD,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;QAC7C,OAAO,EAAE,IAAI;QACb,KAAK,EAAE;YACL;gBACE,OAAO,EAAE,SAAS,CAAC,KAAK,CAAC,aAAa,SAAS,EAAE,CAAC;gBAClD,QAAQ,EAAE,WAAW,UAAU,EAAE;gBACjC,MAAM,EAAE,SAAS,CAAC,KAAK,CACrB,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,UAAU,IAAI,CAAC,QAAQ,EAAE,CACnE;aACF;SACF;KACF,CAAC;CACH,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import type { AccessLogEntry, ConnectionId, MigrationProgress, MigrationStraggler, PlatformActorId, Scope, ScopeId, TenantId, DrainedEvent } from '@substrat-run/contracts';
2
+ import type { ExportReadInput, ExportedBatch, ImportBatch, ImportResult, ImportState, WantedEvent } from '@substrat-run/contracts';
2
3
  import type { ExecutorDrainReport, FetchLike, ScopeHost, SweepRunInput } from './scope-host.js';
3
4
  /**
4
5
  * A connector's reconcile sweep — the unit `runPlatformSweep` calls per live
@@ -212,6 +213,17 @@ export interface PlatformSweepOptions {
212
213
  eventSink?: EventSink;
213
214
  /** Events drained per scope per pass. Default 200. */
214
215
  eventDrainBatch?: number;
216
+ /**
217
+ * Deliver cross-vertical events (#1705). For every active primary scope whose running code
218
+ * imports from another vertical, resolve that vertical's instance in the SAME tenant, read
219
+ * its outbox after the watermark the consumer holds, and hand the batch to the consumer.
220
+ *
221
+ * UNSET skips the phase, and opting in is deliberate. On the shared control plane this host's
222
+ * own namespace is the module-less placeholder, so the default reach would construct an empty
223
+ * DO per active scope per tick and report a fleet with no edges. The control plane opts in
224
+ * with a reach over `/internal`. A self-host, whose host IS the deployment, opts in with `{}`.
225
+ */
226
+ crossVertical?: CrossVerticalOptions;
215
227
  /** Rows shipped (and pruned) per pass. Default 500. */
216
228
  accessLogBatch?: number;
217
229
  /**
@@ -477,9 +489,11 @@ export interface PlatformSweepReport {
477
489
  accessLog: AccessLogSweepReport | null;
478
490
  /** What the event drain shipped this pass (#1334). Null when no sink is bound. */
479
491
  eventDrain: EventDrainReport | null;
492
+ /** Every cross-vertical edge this pass looked at (#1705). Null when the phase is off. */
493
+ crossVertical?: CrossVerticalReport | null;
480
494
  /** Per-unit failures; the pass records and steps over each rather than aborting. */
481
495
  errors: {
482
- kind: 'drain' | 'sweep' | 'gc' | 'reap' | 'reap-tenant' | 'migrate' | 'platform-request' | 'provision-reconcile' | 'schedule' | 'freshness' | 'access-log' | 'event-drain';
496
+ kind: 'drain' | 'sweep' | 'gc' | 'reap' | 'reap-tenant' | 'migrate' | 'platform-request' | 'provision-reconcile' | 'schedule' | 'freshness' | 'access-log' | 'event-drain' | 'vertical-events';
483
497
  id: string;
484
498
  error: string;
485
499
  }[];
@@ -522,6 +536,107 @@ export interface EventDrainSkipped {
522
536
  /** The first of them, oldest first; capped (`UNDRAINED_SKIPPED_IDS`), so `count` may be larger. */
523
537
  eventIds: string[];
524
538
  }
539
+ /** How the cross-vertical phase reaches the two scopes of an edge (#1705). */
540
+ export interface CrossVerticalReach {
541
+ /**
542
+ * The listed scopes whose RUNNING code may import anything, found WITHOUT opening one.
543
+ *
544
+ * This is what keeps the phase off the fleet. It runs on a cron over every active scope,
545
+ * and each per-scope call is a Durable Object wake (plus an `/internal` hop on the hosted
546
+ * path). Asking every scope "do you import?" would be O(fleet) calls per tick even with no
547
+ * edge anywhere. The answer is a code fact: a module declares `consumes: [{ from }]`, and a
548
+ * push carries it in the version's permission registry (`imports`). So it is read where the
549
+ * code is described, never from the scope. A scope this drops is never called.
550
+ *
551
+ * Optional. Absent, the default applies: this host's own registered modules
552
+ * (`ScopeHost.registeredImports`). A host that imports nothing gets no candidates; one that
553
+ * does gets every listed scope, which is right where one host is the deployment for all of
554
+ * them (a self-host). The control plane passes the registry's answer per scope.
555
+ */
556
+ candidates?(scopes: readonly Scope[]): Promise<readonly Scope[]> | readonly Scope[];
557
+ /** The consumer's running imports and its watermark per producer. */
558
+ importState(tenantId: TenantId, scopeId: ScopeId): Promise<ImportState>;
559
+ /** The producer's release after a watermark, decided by the producer's own code. */
560
+ readExports(tenantId: TenantId, scopeId: ScopeId, input: ExportReadInput): Promise<ExportedBatch>;
561
+ /** Hand a batch to the consumer, which applies it under its watermark's compare-and-set. */
562
+ deliver(tenantId: TenantId, scopeId: ScopeId, batch: ImportBatch): Promise<ImportResult>;
563
+ }
564
+ export interface CrossVerticalOptions {
565
+ /**
566
+ * How the two sides are reached. Defaults to this host's own verbs: `admin.importState`,
567
+ * `admin.readExportedEvents` and `deliverToPeer`. That is right when one host serves both
568
+ * scopes. Overridden where they live in different deployments: the control plane reaches
569
+ * each over `/internal`, and a two-deployment dev setup routes by scope.
570
+ */
571
+ reach?: CrossVerticalReach;
572
+ /** Events one edge moves per pass, at most. Default 200. */
573
+ budget?: number;
574
+ /**
575
+ * Consumer scopes one pass visits, at most. Default {@link CROSS_VERTICAL_CONSUMERS_PER_PASS}.
576
+ * The rest are `deferred` to the next pass, not dropped: their watermarks hold, and their
577
+ * producers' outboxes keep the backlog. The window starts at a random point and wraps, the
578
+ * provision reconcile's rule (#1653), so consumers that fail on every pass cannot hold the
579
+ * same slots forever. `0` visits none, which makes it the pause switch.
580
+ */
581
+ maxConsumers?: number;
582
+ /** Where the window starts, in [0, 1). `Math.random` unless given, and injectable to test fairness. */
583
+ rng?: () => number;
584
+ }
585
+ /**
586
+ * How many consumer scopes one pass of the cross-vertical phase visits, by default (#1705).
587
+ *
588
+ * Per visited consumer a pass costs one `importState` call, then per source it imports from,
589
+ * one `readExportedEvents` on the producer and, only when something is new, one `deliverToPeer`.
590
+ * Each call is one Durable Object round trip, plus an `/internal` hop when hosted. So a pass
591
+ * is bounded by `maxConsumers × (1 + 2 × sources)` scope calls, and with no candidates it
592
+ * makes none.
593
+ */
594
+ export declare const CROSS_VERTICAL_CONSUMERS_PER_PASS = 100;
595
+ /**
596
+ * One edge's pass (#1705).
597
+ *
598
+ * - `delivered`: a batch was applied (its events delivered, dead-lettered or withheld).
599
+ * - `idle`: nothing new since the watermark.
600
+ * - `paused`: one side refused the other. The producer's principal check or the consumer's
601
+ * door answered no, so nothing moved and the backlog waits in the producer's outbox.
602
+ * - `unresolved`: the platform could not name both ends. The producer is not installed in
603
+ * the tenant, or either vertical has more than one primary instance there.
604
+ * - `stale`: the consumer's watermark moved under this pass, and the batch was refused.
605
+ * - `failed`: a transport or host error. Also in `errors`.
606
+ */
607
+ export interface CrossVerticalEdge {
608
+ tenantId: TenantId;
609
+ consumer: {
610
+ scopeId: ScopeId;
611
+ vertical: string;
612
+ };
613
+ producer: {
614
+ vertical: string;
615
+ scopeId: ScopeId | null;
616
+ };
617
+ state: 'delivered' | 'idle' | 'paused' | 'unresolved' | 'stale' | 'failed';
618
+ delivered: number;
619
+ deadLettered: number;
620
+ withheld: number;
621
+ duplicates: number;
622
+ /** The sentence a person reads. Set on every state but `delivered` and `idle`. */
623
+ reason?: string;
624
+ /** Types the consumer imports that the producer does not export (reported, not paused). */
625
+ unexported?: WantedEvent[];
626
+ /** The producer had more than one batch waiting. The next pass takes the rest. */
627
+ more?: boolean;
628
+ }
629
+ export interface CrossVerticalReport {
630
+ edges: CrossVerticalEdge[];
631
+ delivered: number;
632
+ withheld: number;
633
+ paused: number;
634
+ unresolved: number;
635
+ /** Scopes whose running code may import, per `candidates`: the only ones any pass calls. */
636
+ candidates: number;
637
+ /** Candidates past this pass's `maxConsumers`, left for the next pass. */
638
+ deferred: number;
639
+ }
525
640
  export interface AccessLogSweepReport {
526
641
  /** Rows handed to the sink and confirmed durable. */
527
642
  shipped: number;
@@ -1 +1 @@
1
- {"version":3,"file":"platform-sweep.d.ts","sourceRoot":"","sources":["../src/platform-sweep.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,cAAc,EACd,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,KAAK,EACL,OAAO,EACP,QAAQ,EACR,YAAY,EACb,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,mBAAmB,EAAE,SAAS,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAWhG;;;;;;;GAOG;AACH,MAAM,WAAW,gBAAgB;IAC/B,CAAC,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,YAAY,EAAE,IAAI,EAAE;QAAE,KAAK,EAAE,SAAS,CAAA;KAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CAC7F;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,aAAa;IAC5B;;;;OAIG;IACH,IAAI,CAAC,OAAO,EAAE,cAAc,EAAE,GAAG,OAAO,CAAC;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC3D;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,WAAW,SAAS;IACxB;;;;OAIG;IACH,IAAI,CAAC,KAAK,EAAE;QAAE,QAAQ,EAAE,QAAQ,CAAC;QAAC,OAAO,EAAE,OAAO,CAAA;KAAE,EAAE,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACzG;AAQD,MAAM,WAAW,oBAAoB;IACnC;;;;;;;OAOG;IACH,cAAc,C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