@substrat-run/kernel 0.139.0 → 0.140.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 (140) hide show
  1. package/dist/admin-log-ddl.d.ts +21 -0
  2. package/dist/admin-log-ddl.d.ts.map +1 -0
  3. package/dist/admin-log-ddl.js +32 -0
  4. package/dist/admin-log-ddl.js.map +1 -0
  5. package/dist/attachment-extractor.d.ts +12 -1
  6. package/dist/attachment-extractor.d.ts.map +1 -1
  7. package/dist/attachment-extractor.js +10 -5
  8. package/dist/attachment-extractor.js.map +1 -1
  9. package/dist/audit-outcome.d.ts +149 -0
  10. package/dist/audit-outcome.d.ts.map +1 -0
  11. package/dist/audit-outcome.js +233 -0
  12. package/dist/audit-outcome.js.map +1 -0
  13. package/dist/connect-links.d.ts +91 -0
  14. package/dist/connect-links.d.ts.map +1 -0
  15. package/dist/connect-links.js +189 -0
  16. package/dist/connect-links.js.map +1 -0
  17. package/dist/connect-state.d.ts +12 -3
  18. package/dist/connect-state.d.ts.map +1 -1
  19. package/dist/connect-state.js +8 -3
  20. package/dist/connect-state.js.map +1 -1
  21. package/dist/derived-object.d.ts +14 -0
  22. package/dist/derived-object.d.ts.map +1 -0
  23. package/dist/derived-object.js +2 -0
  24. package/dist/derived-object.js.map +1 -0
  25. package/dist/derived-objects.d.ts +108 -0
  26. package/dist/derived-objects.d.ts.map +1 -0
  27. package/dist/derived-objects.js +199 -0
  28. package/dist/derived-objects.js.map +1 -0
  29. package/dist/email-intent.d.ts +56 -0
  30. package/dist/email-intent.d.ts.map +1 -0
  31. package/dist/email-intent.js +71 -0
  32. package/dist/email-intent.js.map +1 -0
  33. package/dist/entity-edges.d.ts +6 -1
  34. package/dist/entity-edges.d.ts.map +1 -1
  35. package/dist/entity-edges.js +13 -0
  36. package/dist/entity-edges.js.map +1 -1
  37. package/dist/entity-grant-shape.d.ts +94 -0
  38. package/dist/entity-grant-shape.d.ts.map +1 -0
  39. package/dist/entity-grant-shape.js +329 -0
  40. package/dist/entity-grant-shape.js.map +1 -0
  41. package/dist/entity-grant.d.ts +45 -0
  42. package/dist/entity-grant.d.ts.map +1 -0
  43. package/dist/entity-grant.js +71 -0
  44. package/dist/entity-grant.js.map +1 -0
  45. package/dist/entity-state-reads.d.ts +4 -7
  46. package/dist/entity-state-reads.d.ts.map +1 -1
  47. package/dist/entity-state-reads.js +13 -57
  48. package/dist/entity-state-reads.js.map +1 -1
  49. package/dist/entity-state.d.ts +37 -10
  50. package/dist/entity-state.d.ts.map +1 -1
  51. package/dist/entity-state.js +80 -69
  52. package/dist/entity-state.js.map +1 -1
  53. package/dist/entity-trash.d.ts +245 -0
  54. package/dist/entity-trash.d.ts.map +1 -0
  55. package/dist/entity-trash.js +380 -0
  56. package/dist/entity-trash.js.map +1 -0
  57. package/dist/grant-scoped-read.d.ts +41 -0
  58. package/dist/grant-scoped-read.d.ts.map +1 -0
  59. package/dist/grant-scoped-read.js +100 -0
  60. package/dist/grant-scoped-read.js.map +1 -0
  61. package/dist/index.d.ts +31 -5
  62. package/dist/index.d.ts.map +1 -1
  63. package/dist/index.js +20 -4
  64. package/dist/index.js.map +1 -1
  65. package/dist/kernel-outbox.d.ts +14 -0
  66. package/dist/kernel-outbox.d.ts.map +1 -0
  67. package/dist/kernel-outbox.js +37 -0
  68. package/dist/kernel-outbox.js.map +1 -0
  69. package/dist/list-index.d.ts +11 -2
  70. package/dist/list-index.d.ts.map +1 -1
  71. package/dist/list-index.js +29 -21
  72. package/dist/list-index.js.map +1 -1
  73. package/dist/mail-sender.d.ts +78 -0
  74. package/dist/mail-sender.d.ts.map +1 -0
  75. package/dist/mail-sender.js +2 -0
  76. package/dist/mail-sender.js.map +1 -0
  77. package/dist/membership-executor.d.ts +0 -52
  78. package/dist/membership-executor.d.ts.map +1 -1
  79. package/dist/membership-executor.js +19 -59
  80. package/dist/membership-executor.js.map +1 -1
  81. package/dist/migration-digest.d.ts +161 -0
  82. package/dist/migration-digest.d.ts.map +1 -0
  83. package/dist/migration-digest.js +237 -0
  84. package/dist/migration-digest.js.map +1 -0
  85. package/dist/module-erasure.d.ts +156 -0
  86. package/dist/module-erasure.d.ts.map +1 -0
  87. package/dist/module-erasure.js +440 -0
  88. package/dist/module-erasure.js.map +1 -0
  89. package/dist/peer.d.ts +9 -1
  90. package/dist/peer.d.ts.map +1 -1
  91. package/dist/peer.js +29 -0
  92. package/dist/peer.js.map +1 -1
  93. package/dist/permission-checker.d.ts +6 -0
  94. package/dist/permission-checker.d.ts.map +1 -1
  95. package/dist/permission-checker.js.map +1 -1
  96. package/dist/permission-eval.d.ts +10 -1
  97. package/dist/permission-eval.d.ts.map +1 -1
  98. package/dist/permission-eval.js +51 -2
  99. package/dist/permission-eval.js.map +1 -1
  100. package/dist/platform-sweep.d.ts +1 -1
  101. package/dist/platform-sweep.d.ts.map +1 -1
  102. package/dist/platform-sweep.js +5 -0
  103. package/dist/platform-sweep.js.map +1 -1
  104. package/dist/scope-host.d.ts +301 -22
  105. package/dist/scope-host.d.ts.map +1 -1
  106. package/dist/scope-host.js +72 -5
  107. package/dist/scope-host.js.map +1 -1
  108. package/dist/search-index.d.ts +8 -0
  109. package/dist/search-index.d.ts.map +1 -1
  110. package/dist/search-index.js +51 -21
  111. package/dist/search-index.js.map +1 -1
  112. package/dist/spine-guard.d.ts +7 -0
  113. package/dist/spine-guard.d.ts.map +1 -1
  114. package/dist/spine-guard.js +54 -6
  115. package/dist/spine-guard.js.map +1 -1
  116. package/dist/spine-restore.d.ts.map +1 -1
  117. package/dist/spine-restore.js +5 -0
  118. package/dist/spine-restore.js.map +1 -1
  119. package/dist/sql-statements.d.ts +71 -0
  120. package/dist/sql-statements.d.ts.map +1 -0
  121. package/dist/sql-statements.js +191 -0
  122. package/dist/sql-statements.js.map +1 -0
  123. package/dist/subject-redaction.d.ts +9 -1
  124. package/dist/subject-redaction.d.ts.map +1 -1
  125. package/dist/subject-redaction.js.map +1 -1
  126. package/dist/system-switch-record.d.ts +3 -0
  127. package/dist/system-switch-record.d.ts.map +1 -1
  128. package/dist/system-switch-record.js +2 -0
  129. package/dist/system-switch-record.js.map +1 -1
  130. package/dist/table-ownership.d.ts +103 -0
  131. package/dist/table-ownership.d.ts.map +1 -0
  132. package/dist/table-ownership.js +285 -0
  133. package/dist/table-ownership.js.map +1 -0
  134. package/dist/timeline.d.ts +4 -4
  135. package/dist/timeline.js +4 -4
  136. package/dist/visible-continuation.d.ts +38 -0
  137. package/dist/visible-continuation.d.ts.map +1 -0
  138. package/dist/visible-continuation.js +162 -0
  139. package/dist/visible-continuation.js.map +1 -0
  140. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"list-index.js","sourceRoot":"","sources":["../src/list-index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAE,YAAY,EAAE,CAAC,EAAE,MAAM,yBAAyB,CAAC;AAC9F,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE5D,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,cAAc,EAAE,OAAO,EAAqB,MAAM,mBAAmB,CAAC;AAEnH,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAyC1E,mDAAmD;AACnD,MAAM,CAAC,MAAM,iBAAiB,GAAG,iBAAiB,CAAC;AAEnD,6DAA6D;AAC7D,MAAM,UAAU,eAAe,CAAC,IAAY;IAC1C,OAAO,IAAI,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAC;AAC5C,CAAC;AAED,MAAM,gBAAgB,GAAG,CAAC,IAAY,EAAE,KAAa,EAAE,KAAa,EAAU,EAAE,CAC9E,mBAAmB,CAAC,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;AAElD,+FAA+F;AAC/F,SAAS,IAAI,CAAC,KAAa;I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from './scope-host.js';
3
+ /**
4
+ * A connection that can send mail as an address the tenant owns (#2098) — a tenant's own
5
+ * mailbox behind the platform's email relay.
6
+ *
7
+ * A vertical says what to send and from which address; the platform decides who sends it.
8
+ * With no `from` the relay sends as the platform's own address, as it always has. With one,
9
+ * it looks for a live connection of the tenant's whose sender says it may send as that
10
+ * address, and hands the message to it. So Microsoft 365, Google Workspace or a tenant's own
11
+ * Resend account is a connector implementing this, and a vertical never branches on which.
12
+ *
13
+ * **Shaped like a connection inspector, not a dispatch.** The relay runs top-level on the
14
+ * control plane, not inside a delivery for a scope, so the sender is handed the host and the
15
+ * connection's row and opens its own credential — the same way `probe(host, row)` does —
16
+ * rather than being handed a connection the relay opened for it.
17
+ */
18
+ export interface MailSender {
19
+ /**
20
+ * The addresses this connection may send as. Compared case-insensitively by the relay.
21
+ *
22
+ * Asked on every send that names a `from`, so it should answer from what the connection
23
+ * already holds (its configuration, its secret) rather than a provider round trip.
24
+ */
25
+ senders(host: ScopeHost, connection: Connection): Promise<readonly string[]>;
26
+ /**
27
+ * Send one message as `mail.from.email`, which `senders` has already admitted.
28
+ *
29
+ * A failure should throw an error carrying the provider's numeric `status`, and for a
30
+ * throttle its `Retry-After` in seconds as `retryAfter` (#2102): the platform retries a
31
+ * send whose status is 429 or 5xx (or absent) and refuses one whose status is any other 4xx,
32
+ * reading both structurally, so a sender that rewords an error must keep the two fields.
33
+ */
34
+ send(host: ScopeHost, connection: Connection, mail: OutboundMail): Promise<MailSendResult>;
35
+ }
36
+ /** An address, optionally with a display name. */
37
+ export interface MailAddress {
38
+ email: string;
39
+ name?: string;
40
+ }
41
+ /**
42
+ * One file sent with a message, as bytes. The relay reads it from the scope's attachments by
43
+ * id, as the sending connection, before the sender sees it — so a sender never needs a door
44
+ * into the scope, and reads nothing its connection was not granted.
45
+ */
46
+ export interface OutboundMailAttachment {
47
+ filename: string;
48
+ contentType: string;
49
+ content: Uint8Array;
50
+ }
51
+ /**
52
+ * A message after the relay has validated it: recipients are a list, both parts are
53
+ * present, attachments are bytes. Structurally the email adapter's prepared message plus
54
+ * attachments; declared here because connectors depend on the kernel and not on the adapter.
55
+ */
56
+ export interface OutboundMail {
57
+ from: MailAddress;
58
+ to: MailAddress[];
59
+ replyTo?: MailAddress;
60
+ subject: string;
61
+ html: string;
62
+ text: string;
63
+ headers?: Record<string, string>;
64
+ attachments: OutboundMailAttachment[];
65
+ }
66
+ /**
67
+ * The immediate outcome, per recipient, on the email adapter's neutral names: `delivered`
68
+ * (accepted by the recipient's server), `queued` (accepted, still in flight) and `bounced`
69
+ * (refused for good). A sender that only learns "accepted" reports every recipient `queued`.
70
+ */
71
+ export interface MailSendResult {
72
+ delivered: string[];
73
+ queued: string[];
74
+ bounced: string[];
75
+ /** The provider's id for the message, when it returns one (#2102). Graph's `sendMail` does not. */
76
+ messageId?: string;
77
+ }
78
+ //# sourceMappingURL=mail-sender.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mail-sender.d.ts","sourceRoot":"","sources":["../src/mail-sender.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEjD;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,UAAU;IACzB;;;;;OAKG;IACH,OAAO,CAAC,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,GAAG,OAAO,CAAC,SAAS,MAAM,EAAE,CAAC,CAAC;IAC7E;;;;;;;OAOG;IACH,IAAI,CAAC,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;CAC5F;AAED,kDAAkD;AAClD,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,UAAU,CAAC;CACrB;AAED;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,WAAW,CAAC;IAClB,EAAE,EAAE,WAAW,EAAE,CAAC;IAClB,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,WAAW,EAAE,sBAAsB,EAAE,CAAC;CACvC;AAED;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,mGAAmG;IACnG,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=mail-sender.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mail-sender.js","sourceRoot":"","sources":["../src/mail-sender.ts"],"names":[],"mappings":""}
@@ -1,57 +1,5 @@
1
1
  import { z, type EntityRef, type PlatformActorId } from '@substrat-run/contracts';
2
2
  import { type ExecutorRetryPolicy, type ScopeHost } from './scope-host.js';
3
- /**
4
- * The membership executor (K-22 §4.2, membership.md §4.2; #1184) — the out-of-band half of
5
- * joining and leaving, written once so a host mounts it instead of hand-rolling the effect.
6
- *
7
- * Module code asks in its own transaction and this effects after commit, through `HostAdmin`:
8
- * an invite engine's accept emits `member.add-requested`; a vertical's removal emits
9
- * `member.remove-requested`. A rolled-back operation leaves no event and nothing to effect.
10
- * Both are driven inline by the emitting call, with the outbox and `_substrat_deliveries` as
11
- * the retry backstop, so the common case completes inside the request.
12
- *
13
- * **What it effects: a tenant-level role, and — opted into — the org.** An add assigns the
14
- * invited role at the tenant node; a removal unassigns it. By default neither joins nor leaves
15
- * the org both payloads name (the invites engine keys its invitations by org). A mount with
16
- * `orgs: 'join'` (#2047) also joins it on an add and takes the person out of it on a removal, in
17
- * the same directory unit as the role, bounded by MEMBERSHIP: the inviter or remover must be a
18
- * live member of that org. A member holds everything the org confers, at every node — its
19
- * grants in each scope's own store included — so that is the exact bound, and no scope store
20
- * is read. A tenant admin who is not a member of the org cannot invite anyone into it, by
21
- * design. A join's membership expires no later than the inviter's own: a temporary member
22
- * cannot confer a permanent one.
23
- *
24
- * **Authority.** Every payload field is module-written, so none of them is authority.
25
- *
26
- * - An ADD is bounded by the inviter: the kernel-stamped `actor` of the invitation's own
27
- * `invites.sent` event, asked through the K-21 set comparison at the tenant node. Asked
28
- * twice: early, to refuse cheaply, and again inside the directory unit that writes the role
29
- * (`applyMembership`), so a demotion, a grant lost or a role widened in between is not
30
- * written past. The joiner is the request's own actor, who must have made the invitation's
31
- * first acceptance, and the request must be the first one naming that invitation: one
32
- * invitation, one join. The most a module can do is make the principal who actually invoked
33
- * it look like the sender — the same delegation bound `ctx.grant` has.
34
- * - A REMOVE is bounded by the remover, the request's own actor (§5.1: removal takes the
35
- * same bound, or a junior admin could strip a role they could not have granted) — asked the
36
- * same two ways, so a remover demoted in between removes nobody.
37
- *
38
- * **Removal wins.** An add is refused when the joiner was removed after it was requested: by a
39
- * later `member.remove-requested` on the same membership (ordered by outbox id), or by any
40
- * tenant-level removal at all — staff's included, and a no-op one — which raises the person's
41
- * removal fence in the directory unit that revokes. The add's own unit reads the fence, and a
42
- * fence at or after `occurredAt - MEMBERSHIP_REMOVAL_SKEW_MS` refuses it.
43
- *
44
- * A refusal is terminal (`refuseDelivery`): journaled with its reason, never retried, listed
45
- * by `executorDeadLetters`, and reported to the emitting call through `onExecutorOutcomes`.
46
- *
47
- * **The trail.** Admin rows are written by `actor`, the platform identity that executed them,
48
- * `onBehalfOf` (#977) the person whose authority bounded them, and with `causedBy` = the event
49
- * id: the correlation id that joins the scope's half of the trail to the directory's. A
50
- * removal that took nothing writes no row (K-21), but still raises the fence.
51
- *
52
- * **Idempotent.** A delivered event never reaches its handler again. A crash between the
53
- * effect and its journal row re-runs the handler, and every write it makes is idempotent.
54
- */
55
3
  /** What the add path consumes, and the version it reads. */
56
4
  export declare const MEMBER_ADD_REQUESTED = "member.add-requested";
57
5
  /** What the remove path consumes, and the version it reads. */
@@ -1 +1 @@
1
- {"version":3,"file":"membership-executor.d.ts","sourceRoot":"","sources":["../src/membership-executor.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,CAAC,EAED,KAAK,SAAS,EAGd,KAAK,eAAe,EAErB,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EACL,KAAK,mBAAmB,EAIxB,KAAK,SAAS,EACf,MAAM,iBAAiB,CAAC;AAEzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AAEH,4DAA4D;AAC5D,eAAO,MAAM,oBAAoB,yBAAyB,CAAC;AAC3D,+DAA+D;AAC/D,eAAO,MAAM,uBAAuB,4BAA4B,CAAC;AAEjE,oGAAoG;AACpG,eAAO,MAAM,sBAAsB,eAAe,CAAC;AACnD,wEAAwE;AACxE,eAAO,MAAM,0BAA0B,QAAQ,MAAM,KAA4B,MAAwB,CAAC;AAE1G,+FAA+F;AAC/F,eAAO,MAAM,gBAAgB,cAAe,MAAM,KAAG,SAAgE,CAAC;AAWtH;;;;GAIG;AACH,eAAO,MAAM,4BAA4B;;;;;iBAKvC,CAAC;AACH,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAMxF,MAAM,WAAW,yBAAyB;IACxC,8FAA8F;IAC9F,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,gFAAgF;IAChF,KAAK,EAAE,eAAe,CAAC;IACvB;;;;;;OAMG;IACH,KAAK,CAAC,EAAE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C;IACzB,KAAK,CAAC,EAAE,mBAAmB,CAAC;CAC7B;AAED;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B,QAAa,CAAC;AAErD,8FAA8F;AAC9F,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,yBAAyB,GAAG,IAAI,CAsEpG"}
@@ -2,58 +2,6 @@ import { instant, orgId, principalId, z, } from '@substrat-run/contracts';
2
2
  import { isUnknownRoleError } from './permission-checker.js';
3
3
  import { refuseDelivery } from './delivery-refusal.js';
4
4
  import {} from './scope-host.js';
5
- /**
6
- * The membership executor (K-22 §4.2, membership.md §4.2; #1184) — the out-of-band half of
7
- * joining and leaving, written once so a host mounts it instead of hand-rolling the effect.
8
- *
9
- * Module code asks in its own transaction and this effects after commit, through `HostAdmin`:
10
- * an invite engine's accept emits `member.add-requested`; a vertical's removal emits
11
- * `member.remove-requested`. A rolled-back operation leaves no event and nothing to effect.
12
- * Both are driven inline by the emitting call, with the outbox and `_substrat_deliveries` as
13
- * the retry backstop, so the common case completes inside the request.
14
- *
15
- * **What it effects: a tenant-level role, and — opted into — the org.** An add assigns the
16
- * invited role at the tenant node; a removal unassigns it. By default neither joins nor leaves
17
- * the org both payloads name (the invites engine keys its invitations by org). A mount with
18
- * `orgs: 'join'` (#2047) also joins it on an add and takes the person out of it on a removal, in
19
- * the same directory unit as the role, bounded by MEMBERSHIP: the inviter or remover must be a
20
- * live member of that org. A member holds everything the org confers, at every node — its
21
- * grants in each scope's own store included — so that is the exact bound, and no scope store
22
- * is read. A tenant admin who is not a member of the org cannot invite anyone into it, by
23
- * design. A join's membership expires no later than the inviter's own: a temporary member
24
- * cannot confer a permanent one.
25
- *
26
- * **Authority.** Every payload field is module-written, so none of them is authority.
27
- *
28
- * - An ADD is bounded by the inviter: the kernel-stamped `actor` of the invitation's own
29
- * `invites.sent` event, asked through the K-21 set comparison at the tenant node. Asked
30
- * twice: early, to refuse cheaply, and again inside the directory unit that writes the role
31
- * (`applyMembership`), so a demotion, a grant lost or a role widened in between is not
32
- * written past. The joiner is the request's own actor, who must have made the invitation's
33
- * first acceptance, and the request must be the first one naming that invitation: one
34
- * invitation, one join. The most a module can do is make the principal who actually invoked
35
- * it look like the sender — the same delegation bound `ctx.grant` has.
36
- * - A REMOVE is bounded by the remover, the request's own actor (§5.1: removal takes the
37
- * same bound, or a junior admin could strip a role they could not have granted) — asked the
38
- * same two ways, so a remover demoted in between removes nobody.
39
- *
40
- * **Removal wins.** An add is refused when the joiner was removed after it was requested: by a
41
- * later `member.remove-requested` on the same membership (ordered by outbox id), or by any
42
- * tenant-level removal at all — staff's included, and a no-op one — which raises the person's
43
- * removal fence in the directory unit that revokes. The add's own unit reads the fence, and a
44
- * fence at or after `occurredAt - MEMBERSHIP_REMOVAL_SKEW_MS` refuses it.
45
- *
46
- * A refusal is terminal (`refuseDelivery`): journaled with its reason, never retried, listed
47
- * by `executorDeadLetters`, and reported to the emitting call through `onExecutorOutcomes`.
48
- *
49
- * **The trail.** Admin rows are written by `actor`, the platform identity that executed them,
50
- * `onBehalfOf` (#977) the person whose authority bounded them, and with `causedBy` = the event
51
- * id: the correlation id that joins the scope's half of the trail to the directory's. A
52
- * removal that took nothing writes no row (K-21), but still raises the fence.
53
- *
54
- * **Idempotent.** A delivered event never reaches its handler again. A crash between the
55
- * effect and its journal row re-runs the handler, and every write it makes is idempotent.
56
- */
57
5
  /** What the add path consumes, and the version it reads. */
58
6
  export const MEMBER_ADD_REQUESTED = 'member.add-requested';
59
7
  /** What the remove path consumes, and the version it reads. */
@@ -101,13 +49,25 @@ export function registerMembershipExecutor(host, options) {
101
49
  'spans the directory and a scope store. A scope role has assignScopeRoleBounded.');
102
50
  }
103
51
  const id = options.id ?? MEMBERSHIP_EXECUTOR_ID;
52
+ const removeId = membershipRemoveExecutorId(id);
104
53
  // The org a request names rides along only on a mount that joins orgs (#2047).
105
54
  const orgOf = (request) => (options.orgs === 'join' ? { orgId: request.orgId } : {});
106
55
  // Attributed (#977): the person whose authority bounded the write, beside the platform
107
- // actor that executed it. `causedBy` is passed, never stamped by the host (#2055): a view of
108
- // the host is not the `admin` the dispatch handed the handler, so the event goes with it.
109
- // A host without `attributed` writes through that `admin`, which carries the event already.
110
- const adminFor = (admin, who, event) => host.attributed?.({ principal: who, tenantId: event.tenantId }, { causedBy: event.id }).admin ?? admin;
56
+ // actor that executed it — added to the `admin` the dispatch handed the handler, which
57
+ // already carries the event (#2069). A host built before `HostAdmin.attributed` (an adapter
58
+ // at 0.139) hands an admin without it but has the deprecated `host.attributed(…, { causedBy })`,
59
+ // so that form is the fallback, and is why it is kept. A host with neither predates #977 and
60
+ // records no person on any row; that is said aloud rather than lost quietly.
61
+ // `executorId` is the id the calling path is registered under, so a warning names that path.
62
+ const adminFor = (executorId, admin, who, event) => {
63
+ const onBehalfOf = { principal: who, tenantId: event.tenantId };
64
+ if (admin.attributed)
65
+ return admin.attributed(onBehalfOf);
66
+ if (host.attributed)
67
+ return host.attributed(onBehalfOf, { causedBy: event.id }).admin;
68
+ console.warn(`executor:${executorId}: this host cannot attribute an admin to a person; ${event.id}'s rows name no onBehalfOf`);
69
+ return admin;
70
+ };
111
71
  host.registerExecutor(id, MEMBER_ADD_REQUESTED, async (admin, event, scope) => {
112
72
  const decided = await authorizeAdd(event, scope);
113
73
  if ('refused' in decided)
@@ -115,7 +75,7 @@ export function registerMembershipExecutor(host, options) {
115
75
  const { request, inviter } = decided;
116
76
  // One directory unit: the fence, the bound asked again, the role and its audit row. A
117
77
  // removal or a change of authority lands wholly before it or wholly after it.
118
- const applied = await adminFor(admin, inviter, event).applyMembership(options.actor, {
78
+ const applied = await adminFor(id, admin, inviter, event).applyMembership(options.actor, {
119
79
  op: 'add',
120
80
  tenantId: event.tenantId,
121
81
  principal: request.principal,
@@ -126,14 +86,14 @@ export function registerMembershipExecutor(host, options) {
126
86
  });
127
87
  return applied.applied ? undefined : refusalOf(applied, request, 'inviter', inviter);
128
88
  }, options.retry);
129
- host.registerExecutor(membershipRemoveExecutorId(id), MEMBER_REMOVE_REQUESTED, async (admin, event, scope) => {
89
+ host.registerExecutor(removeId, MEMBER_REMOVE_REQUESTED, async (admin, event, scope) => {
130
90
  const decided = await authorizeRemove(event, scope);
131
91
  if ('refused' in decided)
132
92
  return decided.refused;
133
93
  const { request, remover } = decided;
134
94
  // One directory unit: the remover's bound asked again, the revoke, its audit row if it
135
95
  // took anything, and the fence — raised even with nothing held, so a pending add sees it.
136
- const applied = await adminFor(admin, remover, event).applyMembership(options.actor, {
96
+ const applied = await adminFor(removeId, admin, remover, event).applyMembership(options.actor, {
137
97
  op: 'remove',
138
98
  tenantId: event.tenantId,
139
99
  principal: request.principal,
@@ -1 +1 @@
1
- {"version":3,"file":"membership-executor.js","sourceRoot":"","sources":["../src/membership-executor.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,KAAK,EACL,WAAW,EACX,CAAC,GAOF,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAwB,MAAM,uBAAuB,CAAC;AAC7E,OAAO,EAMN,MAAM,iBAAiB,CAAC;AAEzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AAEH,4DAA4D;AAC5D,MAAM,CAAC,MAAM,oBAAoB,GAAG,sBAAsB,CAAC;AAC3D,+DAA+D;AAC/D,MAAM,CAAC,MAAM,uBAAuB,GAAG,yBAAyB,CAAC;AAEjE,oGAAoG;AACpG,MAAM,CAAC,MAAM,sBAAsB,GAAG,YAAY,CAAC;AACnD,wEAAwE;AACxE,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,EAAE,GAAW,sBAAsB,EAAU,EAAE,CAAC,GAAG,EAAE,SAAS,CAAC;AAE1G,+FAA+F;AAC/F,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,SAAiB,EAAa,EAAE,CAAC,CAAC,EAA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,SAAS,CAAC;AAC/D,CAAC;AAED,4FAA4F;AAC5F,KAAK,UAAU,UAAU,CAAC,KAAoB,EAAE,MAAiB;IAC/D,MAAM,OAAO,GAAmB,EAAE,CAAC;IACnC,IAAI,MAA0B,CAAC;IAC/B,GAAG,CAAC;QACF,MAAM,IAAI,GAAG,MAAM,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;QACrD,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC;QAC9B,MAAM,GAAG,IAAI,CAAC,UAAU,IAAI,SAAS,CAAC;IACxC,CAAC,QAAQ,MAAM,EAAE;IACjB,OAAO,OAAO,CAAC;AACjB,CAAC"}
@@ -0,0 +1,161 @@
1
+ import { moduleMigrations } from './module-migrations.js';
2
+ import { type SqlMigration } from './scope-host.js';
3
+ /**
4
+ * What a scope's migration journal records beside each version, and the check that reads it
5
+ * (#2066). Shared by both adapters, so the rule and the sentence an operator reads are one.
6
+ *
7
+ * A scope used to record an applied migration by `(module_id, version)` alone, so a later
8
+ * `0025` whose SQL differed from the `0025` it ran was skipped as already applied: a dev
9
+ * database that ran one branch's `0025` and then `main`'s, or a preview that ran an unmerged
10
+ * branch, kept whichever schema it got first, and the first sign was a query failing against
11
+ * a column that was not there. `_substrat_migrations.sql_digest` closes that.
12
+ *
13
+ * - **The digest is SHA-256 over the exact SQL text**, lowercase hex, with no normalisation:
14
+ * not whitespace, not comments, not line endings. Any change is a different migration. A
15
+ * shipped migration's text never changes on `main` (`lint:migrations --check` refuses the
16
+ * edit upstream), so a difference at a scope means the scope ran something else.
17
+ * - **Only a module's AUTHORED migrations are held to it.** The kernel-derived DDL
18
+ * (`search/…`, `state/…`, `list/…`, see `moduleMigrations`) is versioned by its
19
+ * declaration on purpose: the version names what decides the DDL, so the kernel may change
20
+ * how it spells the same declaration between releases. Holding those rows to a digest would
21
+ * fail every scope with a searchable entity closed on the kernel upgrade that respelled a
22
+ * trigger. Their digest is still recorded, as the fact of what ran.
23
+ * - **A row applied before the column carries `'legacy'`, and is accepted.** Nobody measured
24
+ * what it ran, so it gets no digest: backfilling the registered one would write a value
25
+ * nobody measured, and bless the one row this exists to catch if that scope did run
26
+ * something else. The mark is explicit rather than a NULL, because a NULL cannot say where it
27
+ * came from: the rows present when the column arrives are marked (`MIGRATION_DIGEST_MARK_LEGACY`),
28
+ * a dump taken before the column restores as `'legacy'` (the restore derives it), and from
29
+ * then on the fence below refuses a NULL however it is written. So `'legacy'` is provenance,
30
+ * and a NULL — say a dump edited to clear a digest — is refused rather than trusted. Such a
31
+ * row is unprotected for good, which is the price of not lying in the journal.
32
+ */
33
+ export declare function migrationDigest(sql: string): Promise<string>;
34
+ /** What a journal row applied before digests were recorded carries in `sql_digest` (#2066). */
35
+ export declare const MIGRATION_DIGEST_LEGACY = "legacy";
36
+ /**
37
+ * Marks the rows present when the column arrived. Run right after the column's ALTER on every
38
+ * wake: once the fence is in place it can only ever find those rows, since nothing else can
39
+ * leave a NULL. Literal text, like the fence, so `lint:spine-ddl` and a reviewer read one spelling.
40
+ */
41
+ export declare const MIGRATION_DIGEST_MARK_LEGACY = "UPDATE _substrat_migrations SET sql_digest = 'legacy' WHERE sql_digest IS NULL";
42
+ /**
43
+ * The fence: no journal row is written, or rewritten, without a digest or the legacy mark — in
44
+ * both adapters' KERNEL_DDL, after the journal table, so `lint:spine-ddl` holds it like any
45
+ * spine trigger.
46
+ *
47
+ * Without it an older writer (an instance still on the previous release during a rollout or a
48
+ * rollback, or a second process over the same SQLite file) inserts a row that omits the
49
+ * column, and SQLite records NULL. With it that INSERT aborts, so the older writer's migration
50
+ * fails and its scope fails closed until code that records the digest serves it, which then
51
+ * applies the migration properly. KERNEL_DDL runs before the column is ALTERed onto a legacy
52
+ * journal, and on a table without the column the INSERT trigger makes any INSERT fail with
53
+ * `no such column`: there is no window in which a NULL can be written. A restore loads its
54
+ * rows under the fence too, so a dump that carries a NULL is refused (`spineRowsInsert` gives a
55
+ * dump from before the column the legacy mark instead).
56
+ *
57
+ * Migration SQL cannot drop it: `assertNoJournalSql` refuses any migration naming the journal.
58
+ * Literal text, no interpolation: `lint:spine-ddl` inlines a kernel fragment one level deep.
59
+ */
60
+ export declare const MIGRATION_DIGEST_FENCE_DDL = "\n CREATE TRIGGER IF NOT EXISTS _substrat_migrations_digest_required\n BEFORE INSERT ON _substrat_migrations WHEN NEW.sql_digest IS NULL\n BEGIN\n SELECT RAISE(ABORT, 'a migration journal row must carry its sql_digest (#2066)');\n END;\n CREATE TRIGGER IF NOT EXISTS _substrat_migrations_digest_kept\n BEFORE UPDATE OF sql_digest ON _substrat_migrations WHEN NEW.sql_digest IS NULL\n BEGIN\n SELECT RAISE(ABORT, 'a migration journal row must carry its sql_digest (#2066)');\n END;\n";
61
+ /**
62
+ * Refuse migration SQL that names the migration journal (`_substrat_migration…`: the table, its
63
+ * fence, the DO's bookmarks), in any spelling the grammar allows — quoted, any case, schema-
64
+ * qualified — before any of it runs.
65
+ *
66
+ * A migration runs on the kernel's own handle, not `ctx.sql`, so the spine write guard never
67
+ * sees it, and an authored migration that repairs `_substrat_tuples` is a reviewed, linted path
68
+ * (`boundary-lint-allow R4 migration`). The journal is different: a migration that drops the
69
+ * fence, or writes its own journal rows, makes the digest check say whatever it wrote. Nothing
70
+ * legitimate in a module's migration names it, reads included.
71
+ */
72
+ export declare function assertNoJournalSql(sql: string, what: string): void;
73
+ /**
74
+ * Refuse a migration's SQL before any of it runs, if it reaches where a migration must not.
75
+ *
76
+ * A migration runs on the kernel's own handle, not `ctx.sql`, so `ctx.sql`'s guard never sees it.
77
+ * Every migration is held to: no foreign key to the spine (#1898), and nothing that names the
78
+ * journal (`assertNoJournalSql`). An AUTHORED one is also held to the full spine write guard —
79
+ * no write, DDL or same-named TEMP object on any `_substrat_*` table — unless it is one of the
80
+ * exact reviewed texts above. Kernel-derived DDL is exempt from that last rule: creating
81
+ * `_substrat_*` indexes and triggers is what it is for.
82
+ */
83
+ export declare function assertMigrationSql(sql: string, step: {
84
+ key: string;
85
+ digest: string;
86
+ authored: boolean;
87
+ }): void;
88
+ /**
89
+ * Refuse a dump whose journal is not consistent with its own shape (#2066 r3): a table whose
90
+ * recorded DDL declares `sql_digest` while its columns omit it, or the other way round.
91
+ *
92
+ * A dump exported before digests were recorded restores as `'legacy'` (`spineRowsInsert`), so
93
+ * the shape of the journal is what says which kind of dump this is — and a current dump with
94
+ * the column stripped would otherwise pass as legacy and unprotect every row. The dump's DDL is
95
+ * `sqlite_master`'s text, which an ALTER rewrites, so a real pre-#2066 journal carries neither.
96
+ * Nothing else a dump carries changed with #2066 to cross-check against (the fence is a trigger,
97
+ * and a dump holds tables). A dump is freely editable data: a consistent edit of both is not
98
+ * detectable, and restore is privileged, audited staff work that could forge any digest anyway.
99
+ * This catches corruption and partial edits, not an author set on lying.
100
+ */
101
+ export declare function assertJournalDumpCoherent(tables: readonly {
102
+ name: string;
103
+ ddl: string;
104
+ columns: readonly string[];
105
+ }[]): void;
106
+ /** One migration a host applies, with its digest and whether it is held to it. */
107
+ export interface MigrationStep {
108
+ migration: SqlMigration;
109
+ digest: string;
110
+ /** Authored by the module, so held to its digest; false for kernel-derived DDL. */
111
+ authored: boolean;
112
+ }
113
+ /**
114
+ * A module's migrations in the order the host applies them (`moduleMigrations`), each with its
115
+ * digest and whether it is authored — read from the registration as it is now. The digest of a
116
+ * text is computed once per isolate, so a Durable Object that wakes with the same code hashes
117
+ * nothing again.
118
+ */
119
+ export declare function migrationSteps(registration: Parameters<typeof moduleMigrations>[0]): Promise<readonly MigrationStep[]>;
120
+ /** A step a migration pass still has to run, with the module it belongs to. */
121
+ export interface PendingMigration extends MigrationStep {
122
+ moduleId: string;
123
+ }
124
+ /** What a migration pass has to do, or the divergence that fails the scope closed instead. */
125
+ export type MigrationPlan = {
126
+ pending: PendingMigration[];
127
+ diverged?: undefined;
128
+ } | {
129
+ pending: [];
130
+ diverged: {
131
+ version: string;
132
+ error: string;
133
+ };
134
+ };
135
+ /**
136
+ * Plan a scope's migration pass against its journal (`module@version` → recorded digest): the
137
+ * registered steps it has not applied, or the first applied one whose SQL differs, which fails
138
+ * the scope closed before anything else runs. Both adapters plan through this.
139
+ */
140
+ export declare function planMigrations(modules: Iterable<{
141
+ readonly id: string;
142
+ readonly steps: Promise<readonly MigrationStep[]>;
143
+ }>, applied: ReadonlyMap<string, string | null>): Promise<MigrationPlan>;
144
+ /** The error a scope fails closed with when `module@version` cannot be applied or trusted. */
145
+ export declare function migrationFailedError(key: string, cause: string): Error;
146
+ /**
147
+ * Why a registered migration the scope has already applied cannot be trusted, or null when it
148
+ * can: on an authored migration, a recorded digest that differs from the registered one, or
149
+ * no digest and no legacy mark at all.
150
+ *
151
+ * The caller fails the scope closed with this as the cause, the way a migration that threw
152
+ * does — the same `migration failed for <module>@<version> — scope fails closed:` record, so
153
+ * the directory, the sweep and the dashboard read it with nothing new. The scope recovers
154
+ * when its journal and its schema agree with the deployment again: a scope that ran another
155
+ * branch's migration is rebuilt (a dev database, a preview) or restored to a dump taken before
156
+ * it ran; a deployment carrying the wrong SQL is redeployed with the SQL the scope ran. A
157
+ * migration is never edited or renumbered once a scope has it, so re-numbering is not a
158
+ * recovery: the scope would still hold the other SQL under this version.
159
+ */
160
+ export declare function migrationDivergence(recorded: string | null | undefined, registered: string, authored: boolean): string | null;
161
+ //# sourceMappingURL=migration-digest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"migration-digest.d.ts","sourceRoot":"","sources":["../src/migration-digest.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE1D,OAAO,EAAoB,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAKtE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAE5D;AAED,+FAA+F;AAC/F,eAAO,MAAM,u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