@substrat-run/vertical-host 0.136.0 → 0.138.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -36,7 +36,7 @@ mountPlatformSurface(app, {
36
36
  resolveOwner: (env, r) => identityDo(env, r).getOwnerOfRecord(r.scopeId),
37
37
  onConfigure: (env, b) => identityDo(env, b).putConfig(b.scopeId, b.entries),
38
38
  ownerSeat: (env, r) => identityDo(env, r).ownerSeat(r.scopeId),
39
- mintOwnerClaim: (env, r, i) => mintOwnerClaimLink(identityDo(env, r), r.scopeId, i.origin),
39
+ mintOwnerClaim: (env, r, i) => mintOwnerClaimLink({ directory: identityDo(env, r), host: hostFor(env) }, r, i.origin, i.actor),
40
40
  transferOwner: (env, r, i) => identityDo(env, r).transferOwner(r.scopeId, i.from, i.to, i.toHoldsRole),
41
41
  completeOwnerTransfer: (env, r, i) => identityDo(env, r).completeOwnerTransfer(r.scopeId, i.from, i.to),
42
42
  abandonOwnerTransfer: (env, r, i) => identityDo(env, r).abandonOwnerTransfer(r.scopeId, i.from, i.to, i.toHoldsRole),
package/dist/errors.d.ts CHANGED
@@ -42,7 +42,7 @@ export declare function isPlatformFault(err: unknown, message: string): boolean;
42
42
  * the status a generic throw acquires on the way here, so it stays open to the
43
43
  * patterns below. A route that means "400, final" gets 400 either way.
44
44
  */
45
- export declare function classifyError(err: unknown): ErrorClassification | undefined;
45
+ export declare function classifyError(thrown: unknown): ErrorClassification | undefined;
46
46
  /** A classified failure, rendered — the status to answer with and the body to send. */
47
47
  export interface ClassifiedProblem {
48
48
  readonly status: ContentfulStatusCode;
@@ -70,8 +70,13 @@ export declare function problemFor(err: unknown, instance?: string): ClassifiedP
70
70
  * `mountPlatformSurface`'s `deps.mapError` is one: a vertical may map its own throws to
71
71
  * a status before this vocabulary is consulted, and its answer must still become a
72
72
  * problem body rather than the only `{ error }` left on the surface.
73
+ *
74
+ * **Except a scope-gate refusal (#113).** The caller's decision does not reach it: the
75
+ * neutral 404 replaces the status, the message and the body, so no mapper can widen the
76
+ * gate's answer back into the sentence that names the scope's status. Answer with the
77
+ * RETURNED status, not the one passed in.
73
78
  */
74
- export declare function problemOf(seen: ErrorClassification, err: unknown, instance?: string): ClassifiedProblem;
79
+ export declare function problemOf(decided: ErrorClassification, err: unknown, instance?: string): ClassifiedProblem;
75
80
  /**
76
81
  * The whole of a vertical's error envelope, in one call.
77
82
  *
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAEpC,OAAO,EAML,KAAK,OAAO,EACb,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAEnE,6EAA6E;AAC7E,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,MAAM,EAAE,oBAAoB,CAAC;IACtC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,yEAAyE;IACzE,QAAQ,CAAC,aAAa,CAAC,EAAE,OAAO,CAAC;CAClC;AAED,wEAAwE;AACxE,wBAAgB,SAAS,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAE9C;AAkBD,wBAAgB,eAAe,CAAC,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAItE;AAsBD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,OAAO,GAAG,mBAAmB,GAAG,SAAS,CAuB3E;AAED,uFAAuF;AACvF,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,MAAM,EAAE,oBAAoB,CAAC;IACtC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,yEAAyE;IACzE,QAAQ,CAAC,aAAa,CAAC,EAAE,OAAO,CAAC;CAClC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,IAAI,EAAE,OAAO,CAAC;IACvB,yEAAyE;IACzE,QAAQ,CAAC,aAAa,CAAC,EAAE,OAAO,CAAC;CAClC;AAkBD;;;;;;;;;;;;GAYG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,iBAAiB,CAM7E;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,SAAS,CACvB,OAAO,EAAE,mBAAmB,EAC5B,GAAG,EAAE,OAAO,EACZ,QAAQ,CAAC,EAAE,MAAM,GAChB,iBAAiB,CAUnB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,GAAG,QAAQ,CAMlE"}
package/dist/errors.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { HTTPException } from 'hono/http-exception';
2
- import { errorCodeOf, PROBLEM_CATALOG, PROBLEM_CONTENT_TYPE, problemForStatus, toProblem, } from '@substrat-run/contracts';
2
+ import { errorCodeOf, isScopeGateRefusal, NO_APPLICATION_DETAIL, PROBLEM_CATALOG, PROBLEM_CONTENT_TYPE, problemForStatus, substratError, toProblem, } from '@substrat-run/contracts';
3
3
  import { PermissionDenied } from '@substrat-run/kernel';
4
4
  /** The message a thrown value carries, whatever kind of value it is. */
5
5
  export function messageOf(err) {
@@ -56,7 +56,8 @@ function isParseFailure(err) {
56
56
  * the status a generic throw acquires on the way here, so it stays open to the
57
57
  * patterns below. A route that means "400, final" gets 400 either way.
58
58
  */
59
- export function classifyError(err) {
59
+ export function classifyError(thrown) {
60
+ const err = atTheEdge(thrown);
60
61
  const message = messageOf(err);
61
62
  const explicit = err instanceof HTTPException ? err.status : undefined;
62
63
  if (explicit !== undefined && explicit !== 400)
@@ -79,12 +80,22 @@ export function classifyError(err) {
79
80
  return { status: 404, message };
80
81
  if (/invalid transition|immutable/i.test(message))
81
82
  return { status: 409, message };
82
- // #1738: a ScopeDO refusing a projection for a tenant it was not provisioned for. It throws
83
- // inside the DO, so the code arrives flattened into the message, past the taxonomy read above.
84
- if (/applyProjection refused/.test(message))
85
- return { status: 409, message };
86
83
  return explicit === undefined ? undefined : { status: explicit, message };
87
84
  }
85
+ /**
86
+ * The scope gate's refusal as the public edge answers it (#113): the router's neutral 404.
87
+ *
88
+ * A request reaches a vertical only after the router resolved its hostname to a serving scope,
89
+ * and the router answers a scope that is not serving with `NO_APPLICATION_DETAIL`. A gate
90
+ * refusal here is that same state, met by a request that raced the directory, so it gets the
91
+ * same answer, and a caller cannot tell the race from the routing. The control plane keeps the
92
+ * refusal as thrown (`conflict` naming the status), for the operator.
93
+ */
94
+ function atTheEdge(err) {
95
+ return isScopeGateRefusal(err) ? substratError('not_found', NO_APPLICATION_DETAIL) : err;
96
+ }
97
+ /** The gate's neutral answer, classified: what no mapper may widen. */
98
+ const NEUTRAL_GATE = { status: 404, message: NO_APPLICATION_DETAIL };
88
99
  /**
89
100
  * The typed error underneath a wrapper, when there is one.
90
101
  *
@@ -127,9 +138,16 @@ export function problemFor(err, instance) {
127
138
  * `mountPlatformSurface`'s `deps.mapError` is one: a vertical may map its own throws to
128
139
  * a status before this vocabulary is consulted, and its answer must still become a
129
140
  * problem body rather than the only `{ error }` left on the surface.
141
+ *
142
+ * **Except a scope-gate refusal (#113).** The caller's decision does not reach it: the
143
+ * neutral 404 replaces the status, the message and the body, so no mapper can widen the
144
+ * gate's answer back into the sentence that names the scope's status. Answer with the
145
+ * RETURNED status, not the one passed in.
130
146
  */
131
- export function problemOf(seen, err, instance) {
132
- const inner = typedCause(err);
147
+ export function problemOf(decided, err, instance) {
148
+ const raw = typedCause(err);
149
+ const seen = isScopeGateRefusal(raw) ? NEUTRAL_GATE : decided;
150
+ const inner = atTheEdge(raw);
133
151
  const code = errorCodeOf(inner);
134
152
  const body = code !== undefined && PROBLEM_CATALOG[code].status === seen.status
135
153
  ? toProblem(inner, instance)
@@ -1 +1 @@
1
- {"version":3,"file":"errors.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AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,GAAG,UAAU,GAAG,SAAS,CA2BpF;AAQD;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,GAAG,kBAAkB,GAAG,SAAS,CA+CrG"}
1
+ {"version":3,"file":"field-coverage.d.ts","sourceRoot":"","sources":["../src/field-coverage.ts"],"names":[],"mappings":"AA8BA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAG9D,6FAA6F;AAC7F,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,gFAAgF;IAChF,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,2EAA2E;IAC3E,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;CACzB;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,GAAG,UAAU,GAAG,SAAS,CA2BpF;AAQD;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,GAAG,kBAAkB,GAAG,SAAS,CA+CrG"}
@@ -15,7 +15,10 @@
15
15
  * - **One entry per list.** A paged read's or an array output's entries are homogeneous by
16
16
  * schema, so the first entry answers for the page.
17
17
  * - **Capped.** At most `DECLARED_OUTPUT_FIELDS_MAX` declared names, the declared half's own cap.
18
- * - **Off unless armed** (`FIELD_COVERAGE_BINDING`), and resolved once per route at mount.
18
+ * - **Off unless armed**, per request, by the router (`FIELD_COVERAGE_HEADER`, #1923): it
19
+ * sends the header on a sampled fraction of requests, and the stamp honours it only on a
20
+ * request whose router assertion verifies. The walk itself is resolved once per route at
21
+ * mount.
19
22
  *
20
23
  * ## What it records, and what it never does
21
24
  *
@@ -1 +1 @@
1
- {"version":3,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I,CAAC,KAAK,KAAK,IAAI;gBAAE,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;;gBAC3C,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC3B,CAAC;QACD,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;IACpC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC"}
package/dist/index.d.ts CHANGED
@@ -24,7 +24,7 @@
24
24
  */
25
25
  import type { Hono } from 'hono';
26
26
  import { type CarriedAway, type KeptCopy, type LoadMarker, type InvokeOptions, type AppliedMigration, type SwitchedOff, type UndrainedEvents } from '@substrat-run/kernel';
27
- import { z, type ScopeLineage, ownerSeat, ownerTransferRecord, ownerTransferAbandon, type CapabilityFilter, type CapabilityPage, type DenialFilter, type DenialSummary, type PermissionDenial, readScopeTableInput, type EntityHistoryInput, type EventFacetInput, type EventCauseInput, type EventEffectsInput, type EffectsTree, type InvocationEventsInput, type InvocationEvents, type DeadLettersInput, type DeadLetter, type LifecycleFlowInput, type LifecycleFlowResult, type CauseChain, type EventFacetResult, type HistoryEntry, type Page, type ScopeId, type TenantId, type PrincipalId, type ConnectionId, type PermissionKey, type EntityRef, type Visibility, type RoleDefinition, type ScopeDumpTable, type ScopeTable, type ScopeQueryResult, type EntitlementGrant, type ProjectedConnectionGrant, type ProjectedConnectionKey, type ProjectedIdentityLink, type OwnerClaimLink, type PlatformRequest, type PlatformRequestFilter, type PlatformRequestId, type PlatformRequestStatus, type PlatformRequestFailure, type ModuleId, type SystemSwitchOutcome, type LifecycleDelivery, type ScopeLifecycle, type PeerGrantsEntry, type SystemScheduleEntry, type PeerSwitchOutcome, type VerticalCaller, type ImportCursorMoveAt, type ImportCursorMoved, type ExportReadInput, type ExportedBatch, type ImportBatch, type ImportResult, type ImportState } from '@substrat-run/contracts';
27
+ import { z, type ScopeLineage, ownerSeat, type PlatformActorId, ownerTransferRecord, ownerTransferAbandon, type CapabilityFilter, type CapabilityPage, type DenialFilter, type DenialSummary, type PermissionDenial, readScopeTableInput, type EntityHistoryInput, type EventFacetInput, type EventCauseInput, type EventEffectsInput, type EffectsTree, type InvocationEventsInput, type InvocationEvents, type DeadLettersInput, type DeadLetter, type LifecycleFlowInput, type LifecycleFlowResult, type OperationSeriesInput, type OperationSeriesResult, type CauseChain, type EventFacetResult, type HistoryEntry, type Page, type ScopeId, type TenantId, type PrincipalId, type ConnectionId, type PermissionKey, type EntityRef, type Visibility, type RoleDefinition, type ScopeDumpTable, type ScopeTable, type ScopeQueryResult, type EntitlementGrant, type ProjectedConnectionGrant, type ProjectedConnectionKey, type ProjectedIdentityLink, type OwnerClaimLink, type PlatformRequest, type PlatformRequestFilter, type PlatformRequestId, type PlatformRequestStatus, type PlatformRequestFailure, type ModuleId, type SystemSwitchOutcome, type LifecycleDelivery, type ScopeLifecycle, type PeerGrantsEntry, type SystemScheduleEntry, type PeerSwitchOutcome, type VerticalCaller, type ImportCursorMoveAt, type ImportCursorMoved, type ExportReadInput, type ExportedBatch, type ImportBatch, type ImportResult, type ImportState } from '@substrat-run/contracts';
28
28
  /**
29
29
  * The slice of the scope host the platform surface delegates to. Structural on purpose:
30
30
  * this package names behaviour, never the concrete `CloudflareScopeHost`. Every method
@@ -48,6 +48,16 @@ export interface VerticalScopeHost {
48
48
  * field and answers `void`, and the platform's re-assert after the call covers it.
49
49
  */
50
50
  switchedOff?: ModuleId[];
51
+ /** #1823: of `switchedOff`, the modules held only by a tenant-level grant, which this
52
+ * deployment has no directory to read — held for the in-unit OFF all the same. */
53
+ tenantHeld?: ModuleId[];
54
+ /** #2029: the peers the platform's record holds OFF here, switched off in the same unit; and
55
+ * (#2030) of those, the ones held only by a tenant-level grant. A host built before them
56
+ * ignores both, and the platform's re-assert after the call covers them. */
57
+ switchedOffPeers?: string[];
58
+ tenantHeldPeers?: string[];
59
+ /** #2045: each recorded-off subject's fence, by tuple subject. A host built before it ignores it. */
60
+ switchFences?: Record<string, string>;
51
61
  }): Promise<void | {
52
62
  switchedOff?: SwitchedOff[];
53
63
  }>;
@@ -58,14 +68,23 @@ export interface VerticalScopeHost {
58
68
  /** #1722: `opts.loadStamp`, the stamp a carry leaves on the copy it lands, and `opts.expect`,
59
69
  * the marker the carry read: the load is refused if the store moved since. A host built
60
70
  * before them has no `loadMarkerLocal` either, so the platform never sends `expect` there.
61
- * #2005: `opts.markCopy`, the directory's classification when the scope is not primary. */
71
+ * #2005: `opts.markCopy`, the directory's classification when the scope is not primary.
72
+ * #2016: `opts.tenantId`, the tenant restored for, recorded as the scope's own; a scope
73
+ * provisioned for another tenant refuses the load. A host built before it ignores it. */
62
74
  opts?: {
63
75
  switchedOff?: ModuleId[];
76
+ /** #1823: as on `provisionScopeLocal`. */
77
+ tenantHeld?: ModuleId[];
78
+ /** #2029: as on `provisionScopeLocal`. */
79
+ switchedOffPeers?: string[];
80
+ tenantHeldPeers?: string[];
81
+ switchFences?: Record<string, string>;
64
82
  sourceScopeId?: ScopeId;
65
83
  exact?: boolean;
66
84
  loadStamp?: string;
67
85
  expect?: LoadMarker;
68
86
  markCopy?: ScopeLineage;
87
+ tenantId?: TenantId;
69
88
  }): Promise<{
70
89
  tables: number;
71
90
  switchedOff?: SwitchedOff[];
@@ -123,7 +142,9 @@ export interface VerticalScopeHost {
123
142
  } | {
124
143
  refused: 'changed' | 'not-kept';
125
144
  }>;
126
- snapshotScopeLocal(source: ScopeId, dest: ScopeId): Promise<{
145
+ /** #2016: `tenantId`, the tenant the platform snapshots for: the source must not be another
146
+ * tenant's, and the copy records it as its own. A host built before it ignores it. */
147
+ snapshotScopeLocal(source: ScopeId, dest: ScopeId, tenantId?: TenantId): Promise<{
127
148
  tables: number;
128
149
  }>;
129
150
  deleteScopeLocal(scopeId: ScopeId): Promise<void>;
@@ -166,6 +187,7 @@ export interface VerticalScopeHost {
166
187
  invocationEventsLocal(scopeId: ScopeId, input: InvocationEventsInput): Promise<InvocationEvents>;
167
188
  deadLettersLocal(scopeId: ScopeId, input: DeadLettersInput): Promise<Page<DeadLetter>>;
168
189
  lifecycleFlowLocal(scopeId: ScopeId, input: LifecycleFlowInput): Promise<LifecycleFlowResult>;
190
+ operationSeriesLocal(scopeId: ScopeId, input: OperationSeriesInput): Promise<OperationSeriesResult>;
169
191
  rewindScopeLocal(scopeId: ScopeId, bookmark: string, opts?: {
170
192
  force?: boolean;
171
193
  }): Promise<{
@@ -212,14 +234,28 @@ export interface VerticalScopeHost {
212
234
  * before it satisfies this interface without it — and the route answers 501, which the
213
235
  * control plane reports as "redeploy", never as a switch that moved.
214
236
  */
215
- systemSwitchLocal?(scopeId: ScopeId, moduleId: ModuleId, to: 'on' | 'off'): Promise<SystemSwitchOutcome>;
237
+ /**
238
+ * #2045 (Codex r3): this host's switch movers honour the switch call's fence, and answer every
239
+ * fenced move with `fenced: true`. What `/internal/switch-fence` reports, which the platform
240
+ * asks before any switch call records or moves anything. Absent on a host built before it.
241
+ */
242
+ readonly switchFenced?: true;
243
+ systemSwitchLocal?(scopeId: ScopeId, moduleId: ModuleId, to: 'on' | 'off',
244
+ /** #2045: `fence`, the switch call's fence — see `/internal/system-switch`'s body. */
245
+ opts?: {
246
+ tenantHeld?: boolean;
247
+ fence?: string;
248
+ }): Promise<SystemSwitchOutcome>;
216
249
  /**
217
250
  * The far end of the lifecycle delivery (#1713): store the scope's lifecycle as the directory
218
251
  * holds it, unless the scope already holds a newer one. Optional for the reason
219
252
  * `systemSwitchLocal` is, and the route answers 501, which the platform records as a delivery
220
253
  * that did not land, so its heal sweep keeps asking.
221
254
  */
222
- setLifecycleLocal?(scopeId: ScopeId, lifecycle: ScopeLifecycle): Promise<LifecycleDelivery>;
255
+ setLifecycleLocal?(scopeId: ScopeId, lifecycle: ScopeLifecycle,
256
+ /** #2016: the tenant the directory delivers for; a scope of another tenant refuses it, and a
257
+ * scope provisioned before its tenant receipt existed records it. Ignored by an older host. */
258
+ tenantId?: TenantId): Promise<LifecycleDelivery>;
223
259
  /**
224
260
  * The far end of the schedule kill switch's status read (#1674): every module this
225
261
  * scope holds or has held system authority for, and where each stands. Optional for the
@@ -243,7 +279,12 @@ export interface VerticalScopeHost {
243
279
  */
244
280
  verticalInvokeLocal?(caller: VerticalCaller, tenantId: TenantId, scopeId: ScopeId, operation: string, input?: unknown, options?: InvokeOptions): Promise<unknown>;
245
281
  /** The far end of the peer kill switch (#1706). Optional, 501 when absent, like the rest. */
246
- peerSwitchLocal?(scopeId: ScopeId, vertical: string, to: 'on' | 'off'): Promise<PeerSwitchOutcome>;
282
+ peerSwitchLocal?(scopeId: ScopeId, vertical: string, to: 'on' | 'off',
283
+ /** #2030: the platform holds a live tenant-level grant for the peer — see the route's body. */
284
+ opts?: {
285
+ tenantHeld?: boolean;
286
+ fence?: string;
287
+ }): Promise<PeerSwitchOutcome>;
247
288
  /**
248
289
  * The cross-vertical far ends (#1705 PR 2): the producer's release after a watermark, the
249
290
  * consumer's imports and watermarks, and a batch applied to the consumer. Each proves the
@@ -304,6 +345,10 @@ declare const provisionBody: z.ZodObject<{
304
345
  publicKey: z.ZodString;
305
346
  }, z.core.$strip>>>;
306
347
  switchedOff: z.ZodOptional<z.ZodArray<z.core.$ZodBranded<z.ZodString, "ModuleId", "out">>>;
348
+ tenantHeld: z.ZodOptional<z.ZodArray<z.core.$ZodBranded<z.ZodString, "ModuleId", "out">>>;
349
+ switchedOffPeers: z.ZodOptional<z.ZodArray<z.ZodString>>;
350
+ tenantHeldPeers: z.ZodOptional<z.ZodArray<z.ZodString>>;
351
+ switchFences: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
307
352
  }, z.core.$strip>;
308
353
  /** The parsed provision body handed to `onProvision`. */
309
354
  export type ProvisionBody = z.infer<typeof provisionBody>;
@@ -363,14 +408,17 @@ export interface PlatformSurfaceDeps<Env> {
363
408
  * Mint a short-lived claim link for an UNCLAIMED owner seat (#925) — what the dashboard
364
409
  * hands the installer once the first-sign-in window has closed (or instead of relying on
365
410
  * it). Return `null` when the seat is already claimed (⇒ 409). The link is answered to the
366
- * platform and never persisted by it; the vertical stores only the token's hash. Omit ⇒
367
- * `/internal/owner-claim` answers 501.
411
+ * platform and never persisted by it; the vertical stores only the secret's hash. Omit ⇒
412
+ * `/internal/owner-claim` answers 501. vertical-auth's `mintOwnerClaimLink` is the reference:
413
+ * since #1686 the link is a `become` capability, and `input.actor` is the platform actor that
414
+ * asked — recorded as its minter — when the control plane names one.
368
415
  */
369
416
  mintOwnerClaim?: (env: Env, ref: {
370
417
  tenantId: TenantId;
371
418
  scopeId: ScopeId;
372
419
  }, input: {
373
420
  origin: string;
421
+ actor?: PlatformActorId;
374
422
  }) => Promise<OwnerClaimLink | null>;
375
423
  /**
376
424
  * Move the scope's owner of record from `from` to `to` (#1665). vertical-auth's IdentityDO
@@ -451,6 +499,7 @@ export * from './peer-client.js';
451
499
  export * from './live.js';
452
500
  export * from './invocation-log.js';
453
501
  export * from './routed-node.js';
502
+ export * from './rate-limit.js';
454
503
  export * from './platform-call.js';
455
504
  export * from './scope-sweep-host.js';
456
505
  export { classifyError, isPlatformFault, messageOf, problemFor, problemOf, problemResponse, } from './errors.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAIjC,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,QAAQ,EACb,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAChB,KAAK,eAAe,EACrB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EACL,CAAC,EAGD,KAAK,YAAY,EAejB,SAAS,EAIT,mBAAmB,EACnB,oBAAoB,EAIpB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,gBAA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AAC;AAC1D,cAAc,UAAU,CAAC;AACzB,cAAc,qBAAqB,CAAC;AAEpC,cAAc,0BAA0B,CAAC;AAEzC,cAAc,kBAAkB,CAAC;AAEjC,cAAc,WAAW,CAAC;AAG1B,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,OAAO,EACL,aAAa,EACb,eAAe,EACf,SAAS,EACT,UAAU,EACV,SAAS,EACT,eAAe,GAChB,MAAM,aAAa,CAAC;AACrB,YAAY,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC"}
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ import { classifyError, messageOf, problemOf } from './errors.js';
3
3
  import {} from '@substrat-run/kernel';
4
4
  import { assertPlatformCall, PlatformCallError } from './platform-call.js';
5
5
  import { platformSweeperOf, registerScopeSweepHost } from './scope-sweep-host.js';
6
- import { z, PROBLEM_CONTENT_TYPE, scopeLineage, scopeId as scopeIdOf, tenantId as tenantIdOf, principalId as principalIdOf, connectionId as connectionIdOf, permissionKey as permissionKeyOf, moduleId as moduleIdOf, switchedOffInUnit, entityRef, visibility, instant, entitlementGrant, projectedConnectionGrant, projectedConnectionKey, projectedIdentityLink, ownerSeat, ownerClaimLink, ownerTransferPair, distinctOwnerTransfer, ownerTransferRecord, ownerTransferAbandon, platformRequestFilter, denialFilter, capabilityFilterQuery, platformRequestId, platformRequestStatus, platformRequestFailure, readScopeTableInput, entityHistoryInput, eventFacetInput, eventCauseInput, eventEffectsInput, invocationEventsInput, deadLettersInput, lifecycleFlowInput, queryScopeInput, scopeLifecycle, verticalCaller, verticalSlug as verticalSlugOf, exportReadInput, importBatch, importCursorMoveAt, CONNECTOR_ATTACHMENT_RECORD_HEADER, LOAD_STAMP_HEADER, WRITE_REVISION_HEADER, } from '@substrat-run/contracts';
6
+ import { z, PROBLEM_CONTENT_TYPE, scopeLineage, scopeId as scopeIdOf, tenantId as tenantIdOf, principalId as principalIdOf, connectionId as connectionIdOf, permissionKey as permissionKeyOf, moduleId as moduleIdOf, switchedOffInUnit, entityRef, visibility, instant, entitlementGrant, projectedConnectionGrant, projectedConnectionKey, projectedIdentityLink, ownerSeat, ownerClaimLink, platformActorId, ownerTransferPair, distinctOwnerTransfer, ownerTransferRecord, ownerTransferAbandon, platformRequestFilter, denialFilter, capabilityFilterQuery, platformRequestId, platformRequestStatus, platformRequestFailure, readScopeTableInput, entityHistoryInput, eventFacetInput, eventCauseInput, eventEffectsInput, invocationEventsInput, deadLettersInput, lifecycleFlowInput, operationSeriesShape, operationSeriesWindow, queryScopeInput, scopeLifecycle, verticalCaller, verticalSlug as verticalSlugOf, exportReadInput, importBatch, importCursorMoveAt, CONNECTOR_ATTACHMENT_RECORD_HEADER, LOAD_STAMP_HEADER, WRITE_REVISION_HEADER, } from '@substrat-run/contracts';
7
7
  /**
8
8
  * The denial-log filter, off the query string (#867). Both denial routes take the same
9
9
  * one, and it is PARSED here rather than forwarded: what arrives is text, and what it
@@ -30,6 +30,12 @@ const provisionBody = z.object({
30
30
  connectionGrants: z.array(projectedConnectionGrant).optional(),
31
31
  connectionKeys: z.array(projectedConnectionKey).optional(),
32
32
  switchedOff: z.array(moduleIdOf).optional(),
33
+ tenantHeld: z.array(moduleIdOf).optional(),
34
+ /** #2029: the recorded-off peers, and (#2030) those held only by a tenant-level grant. */
35
+ switchedOffPeers: z.array(verticalSlugOf).optional(),
36
+ tenantHeldPeers: z.array(verticalSlugOf).optional(),
37
+ /** #2045: each recorded-off subject's fence, by tuple subject. */
38
+ switchFences: z.record(z.string().min(1), z.string().min(1)).optional(),
33
39
  });
34
40
  /** `/internal/reconcile` carries no owner — the vertical re-sources it via `resolveOwner` (#332). */
35
41
  const reconcileBody = z.object({
@@ -45,6 +51,12 @@ const reconcileBody = z.object({
45
51
  * field can name another. The host switches them off in the seat's own unit.
46
52
  */
47
53
  switchedOff: z.array(moduleIdOf).optional(),
54
+ tenantHeld: z.array(moduleIdOf).optional(),
55
+ /** #2029: the recorded-off peers, and (#2030) those held only by a tenant-level grant. */
56
+ switchedOffPeers: z.array(verticalSlugOf).optional(),
57
+ tenantHeldPeers: z.array(verticalSlugOf).optional(),
58
+ /** #2045: each recorded-off subject's fence, by tuple subject. */
59
+ switchFences: z.record(z.string().min(1), z.string().min(1)).optional(),
48
60
  });
49
61
  /**
50
62
  * The in-unit outcomes, parsed on the way OUT. By the time this runs, the provision, reconcile
@@ -89,6 +101,12 @@ const restoreBody = z.object({
89
101
  scopeId: scopeIdOf,
90
102
  /** #1742: as on the reconcile — applied to `scopeId`, in the restore's own event. */
91
103
  switchedOff: z.array(moduleIdOf).optional(),
104
+ tenantHeld: z.array(moduleIdOf).optional(),
105
+ /** #2029: the recorded-off peers, and (#2030) those held only by a tenant-level grant. */
106
+ switchedOffPeers: z.array(verticalSlugOf).optional(),
107
+ tenantHeldPeers: z.array(verticalSlugOf).optional(),
108
+ /** #2045: each recorded-off subject's fence, by tuple subject. */
109
+ switchFences: z.record(z.string().min(1), z.string().min(1)).optional(),
92
110
  /** #1869: the scope the dump was captured from. Only its node grants are re-pointed at
93
111
  * `scopeId`; a platform that predates the field sends none, and the host falls back. */
94
112
  sourceScopeId: scopeIdOf.optional(),
@@ -126,6 +144,8 @@ const ownerClaimBody = z.object({
126
144
  tenantId: tenantIdOf,
127
145
  scopeId: scopeIdOf,
128
146
  origin: z.string().url(),
147
+ /** The platform actor that asked (#1686) — optional, so a control plane from before it still mints. */
148
+ actor: platformActorId.optional(),
129
149
  });
130
150
  /** `/internal/owner-transfer` body (#1665): the address plus `ownerTransferInput`'s two principals. */
131
151
  const ownerTransferBody = ownerTransferPair
@@ -193,11 +213,20 @@ const systemSwitchBody = z.object({
193
213
  scopeId: scopeIdOf,
194
214
  moduleId: moduleIdOf,
195
215
  to: z.enum(['on', 'off']),
216
+ // #1823: the platform read a live TENANT-level grant for the module, which this deployment
217
+ // has no directory to read. Optional: a platform built before it sends none, and a module
218
+ // whose only authority is a tenant grant then answers `held: false`, as it always did.
219
+ tenantHeld: z.boolean().optional(),
220
+ // #2045: the switch call's fence — the scope refuses a move older than the one it applied.
221
+ // Optional: a platform built before it sends none, and the move applies as it always did.
222
+ fence: z.string().min(1).optional(),
196
223
  });
197
224
  /** `/internal/lifecycle` body (#1713) — the scope's lifecycle as the platform read it. */
198
225
  const lifecycleBody = z.object({
199
226
  scopeId: scopeIdOf,
200
227
  lifecycle: scopeLifecycle,
228
+ /** #2016: the tenant the directory holds the scope under; absent from an older platform. */
229
+ tenantId: tenantIdOf.optional(),
201
230
  });
202
231
  /**
203
232
  * `/internal/vertical-invoke` body (#1706) — one operation, invoked as a PEER vertical.
@@ -221,6 +250,14 @@ const peerSwitchBody = z.object({
221
250
  scopeId: scopeIdOf,
222
251
  vertical: verticalSlugOf,
223
252
  to: z.enum(['on', 'off']),
253
+ /**
254
+ * #2030: the platform's directory holds a live TENANT-level `vertical:` grant for the peer.
255
+ * This deployment has no directory to read it from, and a peer whose only authority on the
256
+ * scope is that grant must still be switchable here. A platform built before it sends none.
257
+ */
258
+ tenantHeld: z.boolean().optional(),
259
+ /** #2045: the switch call's fence. A platform built before it sends none. */
260
+ fence: z.string().min(1).optional(),
224
261
  });
225
262
  /**
226
263
  * `/internal/exported-events` body (#1705 PR 2): the producer scope the platform resolved, and
@@ -294,11 +331,16 @@ export function mountPlatformSurface(app, deps) {
294
331
  const host = deps.hostFor(c.env);
295
332
  const result = await host.restoreScopeLocal(body.scopeId, body.tables, {
296
333
  switchedOff: body.switchedOff,
334
+ tenantHeld: body.tenantHeld,
335
+ switchedOffPeers: body.switchedOffPeers,
336
+ tenantHeldPeers: body.tenantHeldPeers,
337
+ switchFences: body.switchFences,
297
338
  sourceScopeId: body.sourceScopeId,
298
339
  exact: body.exact,
299
340
  loadStamp: body.loadStamp,
300
341
  expect: body.expect,
301
342
  markCopy: body.markCopy,
343
+ tenantId: body.tenantId,
302
344
  });
303
345
  if (body.tenantId)
304
346
  await host.projectRolesLocal(body.tenantId, body.scopeId, deps.roles);
@@ -527,8 +569,10 @@ export function mountPlatformSurface(app, deps) {
527
569
  // Scope-storage lifecycle (preview-and-snapshots.md §9): copy a scope into a sibling DO /
528
570
  // wipe a reaped fork — both inside this deployment; no bytes cross the boundary.
529
571
  app.post('/internal/snapshot', async (c) => {
530
- const body = z.object({ sourceScopeId: scopeIdOf, newScopeId: scopeIdOf }).parse(await c.req.json());
531
- return c.json(await deps.hostFor(c.env).snapshotScopeLocal(body.sourceScopeId, body.newScopeId), 201);
572
+ const body = z
573
+ .object({ sourceScopeId: scopeIdOf, newScopeId: scopeIdOf, tenantId: tenantIdOf.optional() })
574
+ .parse(await c.req.json());
575
+ return c.json(await deps.hostFor(c.env).snapshotScopeLocal(body.sourceScopeId, body.newScopeId, body.tenantId), 201);
532
576
  });
533
577
  app.post('/internal/delete-scope', async (c) => {
534
578
  const body = z.object({ scopeId: scopeIdOf, tenantId: tenantIdOf.optional() }).parse(await c.req.json());
@@ -560,6 +604,12 @@ export function mountPlatformSurface(app, deps) {
560
604
  const { scopeId, ...input } = lifecycleFlowInput.extend({ scopeId: scopeIdOf }).parse(await c.req.json());
561
605
  return c.json(await deps.hostFor(c.env).lifecycleFlowLocal(scopeId, input));
562
606
  });
607
+ // #1750: business volumes per bucket over a scope THIS vertical holds — Pulse's
608
+ // business rows. POST, like the process map's read, because the pairs travel in the body.
609
+ app.post('/internal/operation-series', async (c) => {
610
+ const { scopeId, ...input } = operationSeriesShape.extend({ scopeId: scopeIdOf }).superRefine(operationSeriesWindow).parse(await c.req.json());
611
+ return c.json(await deps.hostFor(c.env).operationSeriesLocal(scopeId, input));
612
+ });
563
613
  app.post('/internal/query', async (c) => {
564
614
  const body = queryScopeInput.extend({ scopeId: scopeIdOf }).parse(await c.req.json());
565
615
  try {
@@ -706,7 +756,18 @@ export function mountPlatformSurface(app, deps) {
706
756
  if (!host.systemSwitchLocal) {
707
757
  return c.json({ error: 'this deployment cannot switch schedules (#1666) — redeploy it' }, 501);
708
758
  }
709
- return c.json(await host.systemSwitchLocal(body.scopeId, body.moduleId, body.to));
759
+ return c.json(await host.systemSwitchLocal(body.scopeId, body.moduleId, body.to, { tenantHeld: body.tenantHeld, fence: body.fence }));
760
+ });
761
+ // The switch fence's preflight (#2045, Codex r3): asked by the platform BEFORE a switch call
762
+ // records or moves anything on a scope served here, so a deployment that cannot honour the fence
763
+ // is refused up front rather than compensated after its move. A deployment built before this
764
+ // route answers 404, and a host that predates the fence 501: both read as "redeploy". Behind the
765
+ // platform-secret gate above, like every `/internal` verb.
766
+ app.get('/internal/switch-fence', (c) => {
767
+ if (deps.hostFor(c.env).switchFenced !== true) {
768
+ return c.json({ error: 'this deployment cannot fence a kill switch (#2045) — redeploy it' }, 501);
769
+ }
770
+ return c.json({ fenced: true });
710
771
  });
711
772
  // The lifecycle delivery (#1713): the platform's directory holds a scope's lifecycle, and a
712
773
  // deployment serving it has no directory, so the platform pushes it here on every transition
@@ -718,7 +779,7 @@ export function mountPlatformSurface(app, deps) {
718
779
  if (!host.setLifecycleLocal) {
719
780
  return c.json({ error: 'this deployment cannot hold a scope by its lifecycle (#1713) — redeploy it' }, 501);
720
781
  }
721
- return c.json(await host.setLifecycleLocal(body.scopeId, body.lifecycle));
782
+ return c.json(await host.setLifecycleLocal(body.scopeId, body.lifecycle, body.tenantId));
722
783
  });
723
784
  // The status read (#1674): the far end of `HostAdmin.systemGrantsStatus` for a scope
724
785
  // served HERE. Bare positions only — no admin-log join, since this deployment holds no
@@ -769,7 +830,7 @@ export function mountPlatformSurface(app, deps) {
769
830
  if (!host.peerSwitchLocal) {
770
831
  return c.json({ error: 'this deployment cannot switch peers (#1706) — redeploy it' }, 501);
771
832
  }
772
- return c.json(await host.peerSwitchLocal(body.scopeId, body.vertical, body.to));
833
+ return c.json(await host.peerSwitchLocal(body.scopeId, body.vertical, body.to, { tenantHeld: body.tenantHeld, fence: body.fence }));
773
834
  });
774
835
  // The cross-vertical far ends (#1705 PR 2). The shared control plane runs the phase for every
775
836
  // hosted edge, and the two scopes of an edge live in two vertical deployments it can reach
@@ -847,6 +908,10 @@ export function mountPlatformSurface(app, deps) {
847
908
  connectionGrants: body.connectionGrants,
848
909
  connectionKeys: body.connectionKeys,
849
910
  switchedOff: body.switchedOff,
911
+ tenantHeld: body.tenantHeld,
912
+ switchedOffPeers: body.switchedOffPeers,
913
+ tenantHeldPeers: body.tenantHeldPeers,
914
+ switchFences: body.switchFences,
850
915
  });
851
916
  await deps.onProvision?.(c.env, body);
852
917
  // #1902: onto the platform-supplied sweeper's roster, so the scope's schedules run. Last, so
@@ -890,6 +955,10 @@ export function mountPlatformSurface(app, deps) {
890
955
  connectionKeys: body.connectionKeys,
891
956
  // #1742: back off inside the seat's unit — see `provisionScopeLocal`.
892
957
  switchedOff: body.switchedOff,
958
+ tenantHeld: body.tenantHeld,
959
+ switchedOffPeers: body.switchedOffPeers,
960
+ tenantHeldPeers: body.tenantHeldPeers,
961
+ switchFences: body.switchFences,
893
962
  });
894
963
  /**
895
964
  * The VERTICAL's half of a provision runs here too — and it did not, which made this
@@ -960,7 +1029,7 @@ export function mountPlatformSurface(app, deps) {
960
1029
  throw new HTTPException(501, { message: 'this vertical keeps no owner seat' });
961
1030
  }
962
1031
  const body = ownerClaimBody.parse(await c.req.json());
963
- const link = await deps.mintOwnerClaim(c.env, { tenantId: body.tenantId, scopeId: body.scopeId }, { origin: body.origin });
1032
+ const link = await deps.mintOwnerClaim(c.env, { tenantId: body.tenantId, scopeId: body.scopeId }, { origin: body.origin, ...(body.actor ? { actor: body.actor } : {}) });
964
1033
  if (!link) {
965
1034
  throw new HTTPException(409, {
966
1035
  message: `the owner seat of scope ${body.scopeId} is already claimed — nothing to mint a claim link for`,
@@ -1093,8 +1162,10 @@ export function mountPlatformSurface(app, deps) {
1093
1162
  stack: err instanceof Error ? err.stack : undefined,
1094
1163
  });
1095
1164
  }
1096
- const { body } = problemOf(seen, err, c.req.path);
1097
- return c.body(JSON.stringify(body), seen.status, {
1165
+ // The returned status, not `seen`'s: a scope-gate refusal answers the neutral 404 whatever a
1166
+ // mapper decided (#113).
1167
+ const { status, body } = problemOf(seen, err, c.req.path);
1168
+ return c.body(JSON.stringify(body), status, {
1098
1169
  'content-type': PROBLEM_CONTENT_TYPE,
1099
1170
  });
1100
1171
  });
@@ -1113,6 +1184,7 @@ export * from './live.js';
1113
1184
  // platform-call check every deployed vertical mounts.
1114
1185
  export * from './invocation-log.js';
1115
1186
  export * from './routed-node.js';
1187
+ export * from './rate-limit.js';
1116
1188
  export * from './platform-call.js';
1117
1189
  export * from './scope-sweep-host.js';
1118
1190
  export { classifyError, isPlatformFault, messageOf, problemFor, problemOf, problemResponse, } from './errors.js';