@substrat-run/kernel 0.142.0 → 0.144.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 (169) hide show
  1. package/dist/attachment-extractor.d.ts +0 -9
  2. package/dist/attachment-extractor.d.ts.map +1 -1
  3. package/dist/attachment-extractor.js +2 -2
  4. package/dist/attachment-extractor.js.map +1 -1
  5. package/dist/attachment-text.d.ts +0 -5
  6. package/dist/attachment-text.d.ts.map +1 -1
  7. package/dist/attachment-text.js +0 -4
  8. package/dist/attachment-text.js.map +1 -1
  9. package/dist/attribution.d.ts +0 -7
  10. package/dist/attribution.d.ts.map +1 -1
  11. package/dist/attribution.js +0 -7
  12. package/dist/attribution.js.map +1 -1
  13. package/dist/audit-outcome.d.ts +60 -2
  14. package/dist/audit-outcome.d.ts.map +1 -1
  15. package/dist/audit-outcome.js +63 -3
  16. package/dist/audit-outcome.js.map +1 -1
  17. package/dist/capability.d.ts +20 -13
  18. package/dist/capability.d.ts.map +1 -1
  19. package/dist/capability.js +76 -16
  20. package/dist/capability.js.map +1 -1
  21. package/dist/connector-calls.d.ts +0 -5
  22. package/dist/connector-calls.d.ts.map +1 -1
  23. package/dist/connector-calls.js +1 -1
  24. package/dist/connector-calls.js.map +1 -1
  25. package/dist/denial-query.d.ts +0 -14
  26. package/dist/denial-query.d.ts.map +1 -1
  27. package/dist/denial-query.js +1 -1
  28. package/dist/denial-query.js.map +1 -1
  29. package/dist/derived-handlers.d.ts +17 -0
  30. package/dist/derived-handlers.d.ts.map +1 -0
  31. package/dist/derived-handlers.js +198 -0
  32. package/dist/derived-handlers.js.map +1 -0
  33. package/dist/entity-binding.d.ts +121 -0
  34. package/dist/entity-binding.d.ts.map +1 -0
  35. package/dist/entity-binding.js +235 -0
  36. package/dist/entity-binding.js.map +1 -0
  37. package/dist/entity-grant-shape.d.ts +127 -12
  38. package/dist/entity-grant-shape.d.ts.map +1 -1
  39. package/dist/entity-grant-shape.js +399 -137
  40. package/dist/entity-grant-shape.js.map +1 -1
  41. package/dist/entity-grant.d.ts +5 -7
  42. package/dist/entity-grant.d.ts.map +1 -1
  43. package/dist/entity-grant.js +6 -7
  44. package/dist/entity-grant.js.map +1 -1
  45. package/dist/entity-state.d.ts +0 -17
  46. package/dist/entity-state.d.ts.map +1 -1
  47. package/dist/entity-state.js +2 -2
  48. package/dist/entity-state.js.map +1 -1
  49. package/dist/entity-trash.d.ts +2 -2
  50. package/dist/entity-trash.d.ts.map +1 -1
  51. package/dist/entity-trash.js +6 -6
  52. package/dist/entity-trash.js.map +1 -1
  53. package/dist/grant-scoped-read.d.ts +0 -2
  54. package/dist/grant-scoped-read.d.ts.map +1 -1
  55. package/dist/grant-scoped-read.js +2 -2
  56. package/dist/grant-scoped-read.js.map +1 -1
  57. package/dist/index.d.ts +53 -55
  58. package/dist/index.d.ts.map +1 -1
  59. package/dist/index.js +51 -53
  60. package/dist/index.js.map +1 -1
  61. package/dist/job-run.d.ts +0 -39
  62. package/dist/job-run.d.ts.map +1 -1
  63. package/dist/job-run.js +6 -6
  64. package/dist/job-run.js.map +1 -1
  65. package/dist/list-index.d.ts +0 -45
  66. package/dist/list-index.d.ts.map +1 -1
  67. package/dist/list-index.js +2 -39
  68. package/dist/list-index.js.map +1 -1
  69. package/dist/membership-executor.d.ts +2 -1
  70. package/dist/membership-executor.d.ts.map +1 -1
  71. package/dist/membership-executor.js +1 -1
  72. package/dist/membership-executor.js.map +1 -1
  73. package/dist/migration-digest.d.ts +0 -12
  74. package/dist/migration-digest.d.ts.map +1 -1
  75. package/dist/migration-digest.js +1 -1
  76. package/dist/migration-digest.js.map +1 -1
  77. package/dist/module-erasure.d.ts +2 -1
  78. package/dist/module-erasure.d.ts.map +1 -1
  79. package/dist/module-erasure.js +12 -1
  80. package/dist/module-erasure.js.map +1 -1
  81. package/dist/module-operations.d.ts +146 -0
  82. package/dist/module-operations.d.ts.map +1 -0
  83. package/dist/module-operations.js +174 -0
  84. package/dist/module-operations.js.map +1 -0
  85. package/dist/peer.d.ts +0 -2
  86. package/dist/peer.d.ts.map +1 -1
  87. package/dist/peer.js +0 -4
  88. package/dist/peer.js.map +1 -1
  89. package/dist/platform-request-query.d.ts +6 -6
  90. package/dist/platform-request-query.d.ts.map +1 -1
  91. package/dist/platform-request-query.js +23 -7
  92. package/dist/platform-request-query.js.map +1 -1
  93. package/dist/platform-sweep.d.ts +26 -2
  94. package/dist/platform-sweep.d.ts.map +1 -1
  95. package/dist/platform-sweep.js +6 -2
  96. package/dist/platform-sweep.js.map +1 -1
  97. package/dist/refusal-query.d.ts +0 -11
  98. package/dist/refusal-query.d.ts.map +1 -1
  99. package/dist/refusal-query.js +1 -1
  100. package/dist/refusal-query.js.map +1 -1
  101. package/dist/refusals.d.ts +1 -3
  102. package/dist/refusals.d.ts.map +1 -1
  103. package/dist/refusals.js +0 -2
  104. package/dist/refusals.js.map +1 -1
  105. package/dist/row-decode.d.ts +16 -1
  106. package/dist/row-decode.d.ts.map +1 -1
  107. package/dist/row-decode.js +18 -6
  108. package/dist/row-decode.js.map +1 -1
  109. package/dist/scope-copy-ledger.d.ts +0 -2
  110. package/dist/scope-copy-ledger.d.ts.map +1 -1
  111. package/dist/scope-copy-ledger.js +1 -1
  112. package/dist/scope-copy-ledger.js.map +1 -1
  113. package/dist/scope-host.d.ts +47 -101
  114. package/dist/scope-host.d.ts.map +1 -1
  115. package/dist/scope-host.js +0 -17
  116. package/dist/scope-host.js.map +1 -1
  117. package/dist/scope-lifecycle.d.ts +0 -21
  118. package/dist/scope-lifecycle.d.ts.map +1 -1
  119. package/dist/scope-lifecycle.js +1 -1
  120. package/dist/scope-lifecycle.js.map +1 -1
  121. package/dist/scope-role-admin.d.ts +0 -6
  122. package/dist/scope-role-admin.d.ts.map +1 -1
  123. package/dist/scope-role-admin.js +1 -1
  124. package/dist/scope-role-admin.js.map +1 -1
  125. package/dist/search-index.d.ts +0 -23
  126. package/dist/search-index.d.ts.map +1 -1
  127. package/dist/search-index.js +2 -24
  128. package/dist/search-index.js.map +1 -1
  129. package/dist/spine-restore.d.ts +0 -22
  130. package/dist/spine-restore.d.ts.map +1 -1
  131. package/dist/spine-restore.js +2 -2
  132. package/dist/spine-restore.js.map +1 -1
  133. package/dist/sql-identifier.d.ts +3 -0
  134. package/dist/sql-identifier.d.ts.map +1 -1
  135. package/dist/sql-identifier.js +2 -0
  136. package/dist/sql-identifier.js.map +1 -1
  137. package/dist/sql-limits.d.ts +4 -0
  138. package/dist/sql-limits.d.ts.map +1 -1
  139. package/dist/sql-limits.js +4 -0
  140. package/dist/sql-limits.js.map +1 -1
  141. package/dist/subject-redaction.d.ts +0 -38
  142. package/dist/subject-redaction.d.ts.map +1 -1
  143. package/dist/subject-redaction.js +4 -4
  144. package/dist/subject-redaction.js.map +1 -1
  145. package/dist/system-switch-record.d.ts +0 -4
  146. package/dist/system-switch-record.d.ts.map +1 -1
  147. package/dist/system-switch-record.js +2 -2
  148. package/dist/system-switch-record.js.map +1 -1
  149. package/dist/system-switch.d.ts +5 -23
  150. package/dist/system-switch.d.ts.map +1 -1
  151. package/dist/system-switch.js +8 -1
  152. package/dist/system-switch.js.map +1 -1
  153. package/dist/table-ownership.d.ts +0 -32
  154. package/dist/table-ownership.d.ts.map +1 -1
  155. package/dist/table-ownership.js +5 -5
  156. package/dist/table-ownership.js.map +1 -1
  157. package/dist/testing.d.ts +17 -0
  158. package/dist/testing.d.ts.map +1 -0
  159. package/dist/testing.js +15 -0
  160. package/dist/testing.js.map +1 -0
  161. package/dist/vertical-events.d.ts +1 -7
  162. package/dist/vertical-events.d.ts.map +1 -1
  163. package/dist/vertical-events.js +2 -10
  164. package/dist/vertical-events.js.map +1 -1
  165. package/package.json +6 -2
  166. package/dist/connect-state.d.ts +0 -103
  167. package/dist/connect-state.d.ts.map +0 -1
  168. package/dist/connect-state.js +0 -128
  169. package/dist/connect-state.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"refusals.d.ts","sourceRoot":"","sources":["../src/refusals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AM,GAAG,IAAI,CAYzF;AAYD,+FAA+F;AAC/F,wBAAgB,SAAS,CAAC,GAAG,EAAE,OAAO,GAAG,iBAAiB,GAAG,YAAY,GAAG,IAAI,CAM/E;AAED,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,qFAAqF;IACrF,OAAO,EAAE,iBAAiB,GAAG,YAAY,CAAC;IAC1C,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,iDAAiD;IACjD,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,8EAA8E;AAC9E,wBAAgB,aAAa,CAAC,GAAG,EAAE,UAAU,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,CAAA;CAAE,CA+BzF"}
package/dist/refusals.js CHANGED
@@ -187,6 +187,4 @@ export function refusalInsert(row) {
187
187
  ],
188
188
  };
189
189
  }
190
- /** The refused transition an operation failed with, or null. */
191
- export { refusedTransitionOf };
192
190
  //# sourceMappingURL=refusals.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"refusals.js","sourceRoot":"","sources":["../src/refusals.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,OAAO,EACL,WAAW,EACX,kBAAkB,EAClB,aAAa,EACb,2BAA2B,EAC3B,iBAAiB,EACjB,eAAe,EACf,mBAAmB,GAEpB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,gFAAgF;AAChF,MAAM,CAAC,MAAM,kBAAkB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BjC,CAAC;AAEF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,CAAC,CAAC,CAAC,IAAI,CAAC;AAC1E,CAAC;AAeD,8EAA8E;AAC9E,MAAM,UAAU,aAAa,CAAC,GAAe;IAC3C,MAAM,CAAC,GAAG,GAAG,CAAC,OAAO,CAAC;IACtB,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAC3D,MAAM,UAAU,GAAG,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAE,CAAuB,CAAC;IAC3D,OAAO;QACL,GAAG,EAAE;;;kEAGyD;QAC9D,MAAM,EAAE;YACN,IAAI,EAAE;YACN,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,YAAY;YAC9B,GAAG,CAAC,QAAQ;YACZ,GAAG,CAAC,OAAO;YACX,qFAAqF;YACrF,sFAAsF;YACtF,iBAAiB,CAAC,CAAC,CAAC,UAAU,CAAC;YAC/B,CAAC,CAAC,QAAQ;YACV,UAAU,EAAE,IAAI,IAAI,IAAI;YACxB,UAAU,EAAE,SAAS,IAAI,IAAI;YAC7B,CAAC,CAAC,SAAS;YACX,GAAG,CAAC,gBAAgB;YACpB,KAAK,EAAE,SAAS,IAAI,IAAI;YACxB,qFAAqF;YACrF,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,kBAAkB;YACrD,GAAG,CAAC,KAAK;YACT,GAAG,CAAC,aAAa;YACjB,GAAG,CAAC,YAAY;YAChB,GAAG,CAAC,EAAE;SACP;KACF,CAAC;AACJ,CAAC"}
@@ -19,7 +19,8 @@ import { type Actor, type PermissionKey } from '@substrat-run/contracts';
19
19
  * - a REQUIRED scalar has no honest empty value, so a row that breaks one cannot be the
20
20
  * contract shape without lying. It is collected, and `finish` throws naming every
21
21
  * column the row broke — the strict decode this replaced, kept for exactly the part it
22
- * cannot honestly relax.
22
+ * cannot honestly relax. A read whose contract has a variant for such a row (the intent
23
+ * journal's, #1637) uses `finishOr` and returns that instead.
23
24
  *
24
25
  * **Every value a decoder built on this returns satisfies the published schema**, which
25
26
  * is #1634's review finding carried forward: a field is only ever replaced by a value its
@@ -66,6 +67,12 @@ export declare const UNDECODED_ACTOR: Actor;
66
67
  * `decodeError`, beside this self-naming marker.
67
68
  */
68
69
  export declare const UNDECODED_PERMISSION: PermissionKey;
70
+ /**
71
+ * Stored text cut to {@link QUOTED_MAX}, with `…` where it was cut — for any decoder that hands a
72
+ * stored value back verbatim (#1637), so an oversized one cannot ride into a report, a log line
73
+ * that repeats every tick, or a screen.
74
+ */
75
+ export declare function capped(text: string): string;
69
76
  /** `column: message`, for the first issue a field's schema raised. */
70
77
  export declare function issueOf(column: string, error: Extract<FieldParse<unknown>, {
71
78
  success: false;
@@ -95,6 +102,14 @@ export interface RowDecoder {
95
102
  finish<R extends object>(decoded: R): R & {
96
103
  decodeError?: string;
97
104
  };
105
+ /**
106
+ * `finish`, for a read that has a variant to return instead of throwing (#1637): when a
107
+ * required scalar broke, `unreadable` is handed the same message `finish` would throw — every
108
+ * column named — and its result is returned in place of the row.
109
+ */
110
+ finishOr<R extends object, V>(decoded: R, unreadable: (decodeError: string) => V): (R & {
111
+ decodeError?: string;
112
+ }) | V;
98
113
  }
99
114
  /**
100
115
  * One row's decoder. `subject` names the row in a throw (`platform request row "01J…"`),
@@ -1 +1 @@
1
- {"version":3,"file":"row-decode.d.ts","sourceRoot":"","sources":["../src/row-decode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,KAAK,KAAK,EAAE,KAAK,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAE/F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,KAAK,UAAU,CAAC,CAAC,IACb;IAAE,OAAO,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,CAAC,CAAA;CAAE,GAC1B;IAAE,OAAO,EAAE,KAAK,C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EAAE,MAAM,CAAA;KAAE,CAAC;IACnE;;;;OAIG;IACH,QAAQ,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG;QAAE,WAAW,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,GAAG,CAAC,CAAC;CACvH;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,UAAU,CA0DxE"}
@@ -18,6 +18,14 @@ export const UNDECODED_ACTOR = actor.parse({ system: 'undecodable' });
18
18
  export const UNDECODED_PERMISSION = permissionKey.parse('undecodable:permission');
19
19
  /** How much of a stored scalar a `marked` field quotes back — a key, not a payload. */
20
20
  const QUOTED_MAX = 200;
21
+ /**
22
+ * Stored text cut to {@link QUOTED_MAX}, with `…` where it was cut — for any decoder that hands a
23
+ * stored value back verbatim (#1637), so an oversized one cannot ride into a report, a log line
24
+ * that repeats every tick, or a screen.
25
+ */
26
+ export function capped(text) {
27
+ return text.length > QUOTED_MAX ? `${text.slice(0, QUOTED_MAX)}…` : text;
28
+ }
21
29
  /** `column: message`, for the first issue a field's schema raised. */
22
30
  export function issueOf(column, error) {
23
31
  const issue = error.issues[0];
@@ -36,6 +44,11 @@ export function rowDecoder(subject, contract) {
36
44
  const undecoded = [];
37
45
  const unreadable = [];
38
46
  const failed = new Set();
47
+ const finishOr = (decoded, onUnreadable) => {
48
+ if (unreadable.length)
49
+ return onUnreadable([...unreadable, ...undecoded].join('; '));
50
+ return undecoded.length ? { ...decoded, decodeError: undecoded.join('; ') } : decoded;
51
+ };
39
52
  return {
40
53
  failed,
41
54
  required(column, field, stored) {
@@ -58,8 +71,7 @@ export function rowDecoder(subject, contract) {
58
71
  const r = field.safeParse(stored);
59
72
  if (r.success)
60
73
  return r.data;
61
- const quoted = JSON.stringify(stored) ?? String(stored);
62
- undecoded.push(`${issueOf(column, r.error)} (stored ${quoted.length > QUOTED_MAX ? `${quoted.slice(0, QUOTED_MAX)}…` : quoted})`);
74
+ undecoded.push(`${issueOf(column, r.error)} (stored ${capped(JSON.stringify(stored) ?? String(stored))})`);
63
75
  failed.add(column);
64
76
  return marker;
65
77
  },
@@ -83,11 +95,11 @@ export function rowDecoder(subject, contract) {
83
95
  return empty;
84
96
  },
85
97
  finish(decoded) {
86
- if (unreadable.length) {
87
- throw new Error(`${subject} cannot be read as a ${contract} — ${[...unreadable, ...undecoded].join('; ')}`);
88
- }
89
- return undecoded.length ? { ...decoded, decodeError: undecoded.join('; ') } : decoded;
98
+ return finishOr(decoded, (why) => {
99
+ throw new Error(`${subject} cannot be read as a ${contract} — ${why}`);
100
+ });
90
101
  },
102
+ finishOr,
91
103
  };
92
104
  }
93
105
  //# sourceMappingURL=row-decode.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"row-decode.js","sourceRoot":"","sources":["../src/row-decode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,aAAa,EAAkC,MAAM,yBAAyB,CAAC;AA8C/F;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAAU,KAAK,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,aAAa,EAAE,CAAC,CAAC;AAE7E;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAkB,aAAa,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC;AAEjG,uFAAuF;AACvF,MAAM,UAAU,GAAG,GAAG,CAAC;AAEvB,sEAAsE;AACtE,MAAM,UAAU,OAAO,CACrB,MAAc,EACd,KAAgE;IAEhE,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IAC9B,MAAM,EAAE,GAAG,KAAK,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,GAAG,CA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EAAE,CAAC,CAAC;oBACzC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;oBACnB,OAAO,KAAK,CAAC;gBACf,CAAC;YACH,CAAC;YACD,MAAM,CAAC,GAAG,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;YACjC,IAAI,CAAC,CAAC,OAAO;gBAAE,OAAO,CAAC,CAAC,IAAI,CAAC;YAC7B,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;YACzC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;YACnB,OAAO,KAAK,CAAC;QACf,CAAC;QACD,MAAM,CAAmB,OAAU;YACjC,OAAO,QAAQ,CAAC,OAAO,EAAE,CAAC,GAAG,EAAE,EAAE;gBAC/B,MAAM,IAAI,KAAK,CAAC,GAAG,OAAO,wBAAwB,QAAQ,MAAM,GAAG,EAAE,CAAC,CAAC;YACzE,CAAC,CAAC,CAAC;QACL,CAAC;QACD,QAAQ;KACT,CAAC;AACJ,CAAC"}
@@ -102,8 +102,6 @@ export interface CopyRestoreFence {
102
102
  notAfter: string;
103
103
  erasureEpoch: number;
104
104
  }
105
- /** How far inside the lease a restore must commit: five minutes, or a quarter of a short lease. */
106
- export declare const copyRestoreFenceMarginMs: (leaseMs: number) => number;
107
105
  /** The fence for a move whose entries were recorded no earlier than `recordedAt` (epoch ms). */
108
106
  export declare const copyRestoreFence: (moveId: string, recordedAt: number, leaseMs: number, erasureEpoch: number) => CopyRestoreFence;
109
107
  /** Whether a restore carrying `fence` may no longer land at `now` (epoch ms). */
@@ -1 +1 @@
1
- {"version":3,"file":"scope-copy-ledger.d.ts","sourceRoot":"","sources":["../src/scope-copy-ledger.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,yBAAyB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElF;;;;;;;;;;;;;;;;;GAiBG;AAEH,8FAA8F;AAC9F,eA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c,MAAM,WAAW,MAAM,gBAAgB,MAAM,KACxE,gBAID,CAAC;AAEH,iFAAiF;AACjF,eAAO,MAAM,sBAAsB,UAAW,gBAAgB,OAAO,MAAM,KAAG,OAA2C,CAAC;AAE1H,6EAA6E;AAC7E,eAAO,MAAM,yBAAyB,iFAAiF,CAAC;AAExH,6CAA6C;AAC7C,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED,wFAAwF;AACxF,eAAO,MAAM,yBAAyB,6FACsD,CAAC;AAE7F,eAAO,MAAM,iBAAiB,MAAO,kBAAkB,KAAG,eAUxD,CAAC"}
@@ -98,7 +98,7 @@ export const COPY_BACKFILL_SCOPE_SQL = 'SELECT reap_claimed_at, COALESCE(erasure
98
98
  /** Read the outcome of a backfill insert that wrote nothing, from `COPY_BACKFILL_SCOPE_SQL`'s row. */
99
99
  export const copyBackfillRefusal = (scope) => !scope ? 'missing' : scope.reap_claimed_at !== null ? 'reaping' : 'ledgered';
100
100
  /** How far inside the lease a restore must commit: five minutes, or a quarter of a short lease. */
101
- export const copyRestoreFenceMarginMs = (leaseMs) => Math.min(5 * 60_000, Math.floor(leaseMs / 4));
101
+ const copyRestoreFenceMarginMs = (leaseMs) => Math.min(5 * 60_000, Math.floor(leaseMs / 4));
102
102
  /** The fence for a move whose entries were recorded no earlier than `recordedAt` (epoch ms). */
103
103
  export const copyRestoreFence = (moveId, recordedAt, leaseMs, erasureEpoch) => ({
104
104
  moveId,
@@ -1 +1 @@
1
- {"version":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ACb,CAAC,CAAC;AAEH,iFAAiF;AACjF,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,KAAuB,EAAE,GAAW,EAAW,EAAE,CAAC,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;AAE1H,6EAA6E;AAC7E,MAAM,CAAC,MAAM,yBAAyB,GAAG,8EAA8E,CAAC;AAexH,wFAAwF;AACxF,MAAM,CAAC,MAAM,yBAAyB,GACpC,0FAA0F,CAAC;AAE7F,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAqB,EAAmB,EAAE,CAAC,CAAC;IAC5E,QAAQ,EAAE,CAAC,CAAC,SAAqB;IACjC,OAAO,EAAE,CAAC,CAAC,QAAmB;IAC9B,SAAS,EAAE,CAAC,CAAC,UAAU;IACvB,MAAM,EAAE,CAAC,CAAC,OAAO;IACjB,KAAK,EAAE,CAAC,CAAC,KAAiC;IAC1C,SAAS,EAAE,CAAC,CAAC,UAAU;IACvB,QAAQ,EAAE,CAAC,CAAC,QAAQ;IACpB,IAAI,EAAE,CAAC,CAAC,IAAI,KAAK,QAAQ,IAAI,CAAC,CAAC,IAAI,KAAK,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI;IACrE,UAAU,EAAE,CAAC,CAAC,WAAW;CAC1B,CAAC,CAAC"}
@@ -1,9 +1,10 @@
1
1
  import type { ModuleLog } from './module-log.js';
2
+ import type { BoundOperations } from './module-operations.js';
2
3
  import type { DeliveryRefusal } from './delivery-refusal.js';
3
4
  import type { ScopeRoleHolder } from './scope-role-admin.js';
4
5
  import type { ScopeCopyBackfillResult } from './scope-copy-ledger.js';
5
6
  import type { SubjectRedactionCounts } from './subject-redaction.js';
6
- import type { OnBehalfOf, ExportReadInput, ExportedBatch, ImportBatch, ImportedEvent, ImportResult, ImportState, ImportCursorMove, ImportCursorMoved, AdminAction, BecomeCapabilityInput, CapabilityExchange, CapabilityFilter, CapabilityId, CapabilityPage, MintedCapability, ListPage, ConnectLink, ConnectLinkConsume, ConnectLinkFilter, ConnectLinkKey, ConsumeConnectLinkInput, MintConnectLinkInput, Connection, ConnectionFilter, ConnectionId, ConnectionGrant, ConnectionGrantRecord, ConnectionSecret, CreateConnectionInput, OpenConnection, ProjectedConnectionGrant, ProjectedConnectionKey, AccessLogEntry, DelegatedReadRecord, OwnerTransferAudit, MemberChangeAudit, PeerBindingAudit, CopyMarkAudit, BindHostnameInput, AdminLogEntry, OpsFailureEntry, PlatformRequestDrainTotalsEntry, SweepRunEntry, SweepRunKind, SweepRunOutcome, ModelUsageEntry, ModelUsageSummary, CapabilityGrant, CreateTenantInput, Decision, Instant, DomainEvent, DomainEventInput, PlatformRequestInput, PlatformRequestId, PlatformRequest, PlatformRequestFilter, PlatformRequestStatus, PlatformRequestFailure, PlatformOutcomeEvent, EntitlementGrant, EntitlementGrantInput, EntitlementView, MeterReading, ScopeStorageSample, EntityRef, IdentityLink, IdentityPool, Jurisdiction, ModuleId, ModuleManifest, ScheduleSpec, SystemGrant, PeerGrantsStatusEntry, SystemGrantsStatusEntry, SystemSwitchRecord, SystemSwitch, SystemSwitchResult, PeerCoverage, PeerSwitch, PeerSwitchResult, VerticalCaller, VerticalResolution, PeerBinding, PeerInstanceResolution, CreateOrgInput, Node, Org, OrgId, OrgMembership, PermissionKey, PlatformActorId, ChannelName, ExportBreak, ChannelHistoryEntry, DnsRecord, HostnameBinding, HostnameStatus, PromotionAcknowledgement, BindAcknowledgement, PublishVersionInput, RegisterVerticalInput, VerticalServingState, RouteTarget, DirectoryDump, IdentityMembership, PrincipalId, ResolvedIdentity, RoleAssignment, RoleDefinition, QueryScopeInput, ReadScopeTableInput, Scope, ScopeDump, SubjectShredReceipt, ScopeQueryResult, ScopeId, ScopeStatus, ScopeTable, DenialFilter, DenialSummary, RefusalFilter, RefusalRecord, PermissionDenial, Coverage, BeginImpersonationInput, ImpersonationFilter, ImpersonationSession, ImpersonationSessionId, ScopeTablePage, StorageShape, Tenant, TenantId, TenantRole, TenantStoreHandle, AttachmentRecord, BlobStoreHandle, Visibility, Vertical, VerticalChannel, VerticalVersion, TenantStatus, Page, CountedPage, FreshnessSpec, EntityHistoryInput, EventFacetInput, EventCauseInput, EventEffectsInput, EffectsTree, InvocationEventsInput, InvocationEvents, DeadLettersInput, DeadLetter, LifecycleFlowInput, LifecycleFlowResult, OperationSeriesInput, OperationSeriesResult, CauseChain, EventFacetResult, HistoryEntry, ErrorCode, PlatformRequestFailureOrigin, IssueEntry, IssueStatus, IssueStatusInput, FindingEntry, FindingFilter, FindingRuleEntry, FindingRuleInput, FindingStatusInput, DeclaredMigration, CheckSubject, EntityGrantShape } from '@substrat-run/contracts';
7
+ import type { OnBehalfOf, ExportReadInput, ExportedBatch, ImportBatch, ImportedEvent, ImportResult, ImportState, ImportCursorMove, ImportCursorMoved, AdminAction, BecomeCapabilityInput, CapabilityExchange, CapabilityFilter, CapabilityId, CapabilityPage, MintedCapability, ListPage, ConnectLink, ConnectLinkConsume, ConnectLinkFilter, ConnectLinkKey, ConsumeConnectLinkInput, MintConnectLinkInput, Connection, ConnectionFilter, ConnectionId, ConnectionGrant, ConnectionGrantRecord, ConnectionSecret, CreateConnectionInput, OpenConnection, ProjectedConnectionGrant, ProjectedConnectionKey, AccessLogEntry, DelegatedReadRecord, OwnerTransferAudit, MemberChangeAudit, PeerBindingAudit, CopyMarkAudit, BindHostnameInput, AdminLogEntry, OpsFailureEntry, PlatformRequestDrainTotalsEntry, SweepRunEntry, SweepRunKind, SweepRunOutcome, ModelUsageEntry, ModelUsageSummary, CapabilityGrant, CreateTenantInput, Decision, Instant, DomainEvent, DomainEventInput, PlatformRequestInput, PlatformRequestId, PlatformRequestEntry, PlatformRequestFilter, PlatformRequestStatus, PlatformRequestFailure, PlatformOutcomeEvent, EntitlementGrant, EntitlementGrantInput, EntitlementView, MeterReading, ScopeStorageSample, EntityRef, IdentityLink, IdentityPool, Jurisdiction, ModuleId, ModuleManifest, ScheduleSpec, SystemGrant, PeerGrantsStatusEntry, SystemGrantsStatusEntry, SystemSwitchRecord, SystemSwitch, SystemSwitchResult, PeerCoverage, PeerSwitch, PeerSwitchResult, VerticalCaller, VerticalResolution, PeerBinding, PeerInstanceResolution, CreateOrgInput, Node, Org, OrgId, OrgMembership, PermissionKey, PlatformActorId, ChannelName, ExportBreak, ChannelHistoryEntry, DnsRecord, HostnameBinding, HostnameStatus, PromotionAcknowledgement, BindAcknowledgement, PublishVersionInput, RegisterVerticalInput, VerticalServingState, RouteTarget, DirectoryDump, IdentityMembership, PrincipalId, ResolvedIdentity, RoleAssignment, RoleDefinition, QueryScopeInput, ReadScopeTableInput, Scope, ScopeDump, SubjectShredReceipt, ScopeQueryResult, ScopeId, ScopeStatus, ScopeTable, DenialFilter, DenialSummary, RefusalFilter, RefusalRecord, PermissionDenial, Coverage, BeginImpersonationInput, ImpersonationFilter, ImpersonationSession, ImpersonationSessionId, ScopeTablePage, StorageShape, Tenant, TenantId, TenantRole, TenantStoreHandle, AttachmentRecord, BlobStoreHandle, Visibility, Vertical, VerticalChannel, VerticalVersion, TenantStatus, Page, CountedPage, FreshnessSpec, EntityHistoryInput, EventFacetInput, EventCauseInput, EventEffectsInput, EffectsTree, InvocationEventsInput, InvocationEvents, DeadLettersInput, DeadLetter, LifecycleFlowInput, LifecycleFlowResult, OperationSeriesInput, OperationSeriesResult, CauseChain, EventFacetResult, HistoryEntry, ErrorCode, PlatformRequestFailureOrigin, IssueEntry, IssueStatus, IssueStatusInput, FindingEntry, FindingFilter, FindingRuleEntry, FindingRuleInput, FindingStatusInput, DeclaredMigration, CheckSubject, EntityGrantShape } from '@substrat-run/contracts';
7
8
  import type { ConnectionUseOutcome } from './connector-calls.js';
8
9
  import type { CapabilityVerbs } from './capability.js';
9
10
  import type { AuditedOperationRef, AuditedOperationRow } from './audit-outcome.js';
@@ -186,8 +187,14 @@ export interface OperationContext {
186
187
  *
187
188
  * Read-only by construction: the kernel owns every write to this table (rule 3 forbids module
188
189
  * code writing `_substrat_*`), so an intent's status is only ever the platform's answer.
190
+ *
191
+ * **A row whose identity does not decode comes back as an `UndecodablePlatformRequest`**
192
+ * (#1637) — its id, kind, status, attempts or time as stored, and why — beside every other row,
193
+ * instead of throwing for the whole list. Narrow with `isUndecodablePlatformRequest` before
194
+ * reading anything else. Only a restored dump can hold such a row; a healthy journal never
195
+ * returns one.
189
196
  */
190
- platformRequests(filter?: PlatformRequestFilter): PlatformRequest[];
197
+ platformRequests(filter?: PlatformRequestFilter): PlatformRequestEntry[];
191
198
  /**
192
199
  * This entity's version (#901) — the ULID of the last event about it, or
193
200
  * `null` if nothing has ever been emitted about it.
@@ -1505,86 +1512,28 @@ export declare function consumersFor<const C extends readonly EventContract[]>()
1505
1512
  export interface ModuleRegistration<C extends readonly EventContract[] = []> {
1506
1513
  manifest: ModuleManifest;
1507
1514
  migrations?: SqlMigration[];
1508
- operations?: Record<string, OperationHandler<never, unknown>>;
1509
- /**
1510
- * name → the schema the host parses an invocation's input against, BEFORE the
1511
- * guards and the handler see it (#893).
1512
- *
1513
- * Derived from the declared operation surface — `operationInputsOf(ops)` — and
1514
- * never written a second time. A module that declares its operations gets the
1515
- * parse by handing the same object over:
1516
- *
1517
- * ```ts
1518
- * operations: { 'rally/book': bookOp, … },
1519
- * operationInputs: operationInputsOf(rallyOperations),
1520
- * ```
1521
- *
1522
- * **This is where "parse, don't trust" is kept, rather than in 85 handlers.**
1523
- * `OperationShape.input` calls itself *"the SAME Zod object the handler
1524
- * parses"* and across the fleet it mostly was not — rally declared 32 inputs
1525
- * and parsed 2. One place that cannot be forgotten beats a rule every new
1526
- * operation has to remember, which is the same argument `mountOperations`
1527
- * already makes for the page trio.
1528
- *
1529
- * A name here that no operation binds is an error: it is a schema enforcing
1530
- * nothing, and it reads as coverage. A bound operation with no entry is
1531
- * allowed and means what it always meant — nothing was declared to parse.
1532
- *
1533
- * **It also carries the declared surface (#119).** `operationInputsOf` records, for the frozen
1534
- * map it returns, every declared operation and the entity each addresses by id. The host DERIVES
1535
- * its trash refusal from that — nothing else is handed over — and a module with a trashable
1536
- * entity must pass that map as returned, with every operation it binds declared in it.
1537
- *
1538
- * Typed structurally rather than as `z.ZodType` so the kernel keeps its single
1539
- * dependency and no zod version is pinned by the scope-host contract. The
1540
- * shape is the whole surface the host uses: throw to refuse, return the value
1541
- * to accept.
1542
- */
1543
- operationInputs?: Record<string, {
1544
- parse(value: unknown): unknown;
1545
- }>;
1546
1515
  /**
1547
- * name → the entity whose version this operation's `If-Match` is compared
1548
- * against, and the input field carrying its id (#129).
1549
- *
1550
- * Derived from the declared operation surface — `operationConcurrencyOf(ops)` —
1551
- * and never written a second time, exactly as `operationInputs` is:
1516
+ * The module's operations: its handlers and, derived from their declaration, the input schemas
1517
+ * the host parses with, the `If-Match` concurrency map and the idempotency opt-outs (#1835).
1518
+ * From `operationsFor(declaration)(handlers)` or, for a module with no declared surface,
1519
+ * `undeclaredOperations(reason, handlers)` — never an object literal:
1552
1520
  *
1553
1521
  * ```ts
1554
- * operations: { 'callout/update-customer': updateCustomerOp, … },
1555
- * operationInputs: operationInputsOf(calloutOperations),
1556
- * operationConcurrency: operationConcurrencyOf(calloutOperations),
1522
+ * ...operationsFor(rallyOperations)({ 'rally/book': bookOp, … }),
1557
1523
  * ```
1558
1524
  *
1559
- * **The host compares, not the handler.** A precondition a handler evaluates is
1560
- * a precondition a handler can forget, and the one that is forgotten is
1561
- * indistinguishable from one that passed. Here the comparison happens between
1562
- * `BEGIN` and the guards for every caller and every transport, or the operation
1563
- * does not claim to have it.
1564
- *
1565
- * A name here that no operation binds is an error, for the same reason it is on
1566
- * `operationInputs`: it reads as coverage while enforcing nothing.
1567
- */
1568
- operationConcurrency?: Record<string, {
1569
- entity: string;
1570
- idFrom: string;
1571
- }>;
1572
- /**
1573
- * The operations that declared `idempotency: false` (#116) — the ones whose
1574
- * response must not be recorded, and which therefore refuse an
1575
- * `Idempotency-Key` instead of honouring it.
1576
- *
1577
- * Derived like the two above, and never written a second time:
1578
- *
1579
- * ```ts
1580
- * operationIdempotencyOptOuts: operationIdempotencyOptOutsOf(calloutOperations),
1581
- * ```
1525
+ * **This is where "parse, don't trust" is kept, rather than in 85 handlers** (#893).
1526
+ * `OperationShape.input` calls itself *"the SAME Zod object the handler parses"* and across
1527
+ * the fleet it mostly was not — rally declared 32 inputs and parsed 2. The schemas, the
1528
+ * concurrency the host compares between `BEGIN` and the guards (#129) and the opt-outs (#116)
1529
+ * used to be three more optional fields beside the handlers, so a module could hand over the
1530
+ * handlers and forget the rest, or pair them with another declaration's. One value closes both.
1582
1531
  *
1583
- * A list of refusals rather than a list of participants, because that is what
1584
- * the declaration is. Absent means every operation honours a key, which is the
1585
- * default and the reason there is nothing to remember.
1532
+ * A schema or a concurrency entry naming no bound operation is an error: it enforces nothing
1533
+ * and reads as coverage. The inputs also carry the declared surface (#119) the host derives
1534
+ * its trash refusal from, so a module with a trashable entity must bind through `operationsFor`.
1586
1535
  */
1587
- operationIdempotencyOptOuts?: readonly string[];
1536
+ operations?: BoundOperations;
1588
1537
  /**
1589
1538
  * eventType → handler; the types must appear in manifest.events.consumes.
1590
1539
  *
@@ -1721,11 +1670,22 @@ export interface HostAdmin {
1721
1670
  * something was fully shared with as a holder.
1722
1671
  *
1723
1672
  * Bounded: `batch` rows of work (default 500, an integer from 1 to 5000, or `validation_failed`)
1724
- * per scope transaction, backfill included, repeated until a pass finishes — so it is safe
1725
- * on a large scope, and finishes on a re-run if interrupted. Each (person, entity) topped up is
1673
+ * per scope transaction, backfill included, and at most ten rows read per row of work: markers
1674
+ * on their own index (#2083), and the backfill's candidates in an index order (#2154; a table
1675
+ * holder's `idColumn` must lead an index for that, and a scope where it does not writes a
1676
+ * `shape-backfill-unbounded` warn line). Each pass resumes where the last one stopped, until one finds
1677
+ * nothing left, so it is safe on a large scope whether or not anything changed, and finishes on
1678
+ * a re-run if interrupted. A holder an older deployment grants the shape to while it runs, behind
1679
+ * the point it has reached: if they lack a key the shape gained, the next reconcile tops them up.
1680
+ * If they hold a key the shape retired, a confirming walk from the first marker, which every
1681
+ * retirement runs before it records itself finished, takes it back. Only a grant landing behind
1682
+ * that confirming walk keeps the key, as one landing after the retirement finished does. Each (person, entity) topped up is
1726
1683
  * an `entity.grants-topped-up` event on the entity, and each one retired keys were taken from an
1727
1684
  * `entity.grants-retired` event. Audited as `reconcileEntityGrantShapes` when it changed
1728
- * anything. Returns how many (person, entity) it topped up, and how many it retired keys from.
1685
+ * anything. Returns how many (person, entity) it topped up, and how many it retired keys from;
1686
+ * plus, only when nonzero, `retirementsLeftOpen`: shapes whose retirement kept meeting new
1687
+ * grants of a retired key (`SHAPE_RETIRE_CONFIRMS_MAX` confirming walks that took keys) and was
1688
+ * left for the next reconcile to run again, unrecorded.
1729
1689
  */
1730
1690
  reconcileEntityGrantShapes(actor: PlatformActorId, node: {
1731
1691
  tenantId: TenantId;
@@ -1735,6 +1695,7 @@ export interface HostAdmin {
1735
1695
  }): Promise<{
1736
1696
  toppedUp: number;
1737
1697
  retired: number;
1698
+ retirementsLeftOpen?: number;
1738
1699
  }>;
1739
1700
  /** Grant to an organization (portal customers); members reach it via membership tuples. */
1740
1701
  /**
@@ -4921,8 +4882,11 @@ export interface ScopeHost {
4921
4882
  * `ctx.requestPlatform` awaiting the platform's drain. Fleet maintenance, no actor (the same
4922
4883
  * class as `drainDue`). The platform reads these, executes each with `HostAdmin` authority, and
4923
4884
  * journals the outcome via `settlePlatformRequest` — the read-here/effect-there executor shape.
4885
+ *
4886
+ * A row whose identity does not decode is returned as an `UndecodablePlatformRequest` (#1637),
4887
+ * never thrown for the queue; the drain runs no handler on one.
4924
4888
  */
4925
- listPlatformRequests(tenantId: TenantId, scopeId: ScopeId): Promise<PlatformRequest[]>;
4889
+ listPlatformRequests(tenantId: TenantId, scopeId: ScopeId): Promise<PlatformRequestEntry[]>;
4926
4890
  /**
4927
4891
  * The scope's intent JOURNAL — every intent in whatever state it settled, newest first (#618).
4928
4892
  *
@@ -4933,9 +4897,11 @@ export interface ScopeHost {
4933
4897
  * SQL. This is the read that surfaces it: `kind` narrows to one intent family
4934
4898
  * (`connector:scrive`), `status` to one outcome, `limit` to a recency window.
4935
4899
  *
4936
- * Fleet maintenance, no actor — same class as the pending read it complements.
4900
+ * Fleet maintenance, no actor — same class as the pending read it complements. Returns an
4901
+ * `UndecodablePlatformRequest` for a row whose identity does not decode (#1637), as the
4902
+ * pending read does.
4937
4903
  */
4938
- listPlatformRequestHistory(tenantId: TenantId, scopeId: ScopeId, filter?: PlatformRequestFilter): Promise<PlatformRequest[]>;
4904
+ listPlatformRequestHistory(tenantId: TenantId, scopeId: ScopeId, filter?: PlatformRequestFilter): Promise<PlatformRequestEntry[]>;
4939
4905
  /**
4940
4906
  * Journal a platform-request outcome after the coordinator ran it: `done`, `failed` (terminal),
4941
4907
  * or `pending` (transient — retried on a later drain). `result` persists across retries (a
@@ -5089,26 +5055,6 @@ export interface LiveReadSurface<Req extends LiveUpgradeRequest = LiveUpgradeReq
5089
5055
  expiresAt?: string;
5090
5056
  }): Promise<Res>;
5091
5057
  }
5092
- /**
5093
- * The close codes a live socket ends with, so a client can tell "try again" from "poll".
5094
- *
5095
- * - `1008` (policy): the subscriber may no longer watch what it subscribed to — a
5096
- * `checkedWithin` gate refused, or the session that opened it ended. A reconnect meets
5097
- * the handshake's own refusal.
5098
- * - `4429`: this principal already holds `LIVE_SOCKETS_PER_PRINCIPAL` sockets on the scope.
5099
- * Not a reason to retry: the client should poll, which it does anyway, and stop asking.
5100
- */
5101
- export declare const LIVE_CLOSE: {
5102
- readonly revoked: 1008;
5103
- readonly tooMany: 4429;
5104
- };
5105
- /**
5106
- * How many live sockets one principal may hold on one scope (#938). A tab holds one per
5107
- * feed (the desk's, and one per open conversation in ticket0's portal), and each socket is
5108
- * work on every post-commit pass, so a principal opening more is a cost on everybody else
5109
- * writing to the scope. Eight covers several tabs; past it a socket is closed `4429`.
5110
- */
5111
- export declare const LIVE_SOCKETS_PER_PRINCIPAL = 8;
5112
5058
  /** The brand only `vouchedWithin` can apply — a literal cannot type-check as one. */
5113
5059
  declare const vouchedBrand: unique symbol;
5114
5060
  /**