@substrat-run/contracts 0.118.0 → 0.119.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/connection-health.d.ts +132 -0
- package/dist/connection-health.d.ts.map +1 -0
- package/dist/connection-health.js +132 -0
- package/dist/connection-health.js.map +1 -0
- package/dist/control-plane.d.ts +20 -1
- package/dist/control-plane.d.ts.map +1 -1
- package/dist/control-plane.js +26 -2
- package/dist/control-plane.js.map +1 -1
- package/dist/denial.d.ts +12 -0
- package/dist/denial.d.ts.map +1 -1
- package/dist/deploy.d.ts +68 -0
- package/dist/deploy.d.ts.map +1 -1
- package/dist/deploy.js +91 -1
- package/dist/deploy.js.map +1 -1
- package/dist/events.d.ts +42 -0
- package/dist/events.d.ts.map +1 -1
- package/dist/events.js +26 -2
- package/dist/events.js.map +1 -1
- package/dist/ids.d.ts +1 -0
- package/dist/ids.d.ts.map +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/manifest.d.ts +58 -0
- package/dist/manifest.d.ts.map +1 -1
- package/dist/manifest.js +109 -3
- package/dist/manifest.js.map +1 -1
- package/dist/operations.d.ts +67 -0
- package/dist/operations.d.ts.map +1 -1
- package/dist/operations.js +111 -0
- package/dist/operations.js.map +1 -1
- package/dist/peer-transport.d.ts +81 -0
- package/dist/peer-transport.d.ts.map +1 -0
- package/dist/peer-transport.js +87 -0
- package/dist/peer-transport.js.map +1 -0
- package/dist/peer.d.ts +183 -0
- package/dist/peer.d.ts.map +1 -0
- package/dist/peer.js +155 -0
- package/dist/peer.js.map +1 -0
- package/dist/permission.d.ts +42 -1
- package/dist/permission.d.ts.map +1 -1
- package/dist/permission.js +36 -2
- package/dist/permission.js.map +1 -1
- package/dist/platform-request.d.ts +50 -0
- package/dist/platform-request.d.ts.map +1 -1
- package/dist/platform-request.js +53 -1
- package/dist/platform-request.js.map +1 -1
- package/dist/preview-client.d.ts +154 -0
- package/dist/preview-client.d.ts.map +1 -0
- package/dist/preview-client.js +157 -0
- package/dist/preview-client.js.map +1 -0
- package/dist/registry.d.ts +1 -0
- package/dist/registry.d.ts.map +1 -1
- package/dist/registry.js +7 -0
- package/dist/registry.js.map +1 -1
- package/dist/routing.d.ts +1 -0
- package/dist/routing.d.ts.map +1 -1
- package/dist/routing.js +9 -0
- package/dist/routing.js.map +1 -1
- package/dist/vertical-events.d.ts +265 -0
- package/dist/vertical-events.d.ts.map +1 -0
- package/dist/vertical-events.js +167 -0
- package/dist/vertical-events.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { scopeId, tenantId } from './ids.js';
|
|
3
|
+
/**
|
|
4
|
+
* A preview's OWN sign-in client at the team auth-server its parent signs in with (#1704).
|
|
5
|
+
*
|
|
6
|
+
* A preview forks a prod scope into a new scope, bound to the PR's version. That version is
|
|
7
|
+
* its own dispatch script, and a Durable Object namespace belongs to its script, so the
|
|
8
|
+
* fork's config store starts empty and nothing of the parent's delivered config reaches it
|
|
9
|
+
* — not at create, and not after any later push, which binds yet another script. The
|
|
10
|
+
* parent's `substrat:auth` holds a client secret, and the platform neither keeps a copy of
|
|
11
|
+
* delivered config nor reads one back. So a preview is not handed the parent's client: it
|
|
12
|
+
* gets a client of its own, minted at the same issuer, and delivered through the ordinary
|
|
13
|
+
* `/internal/configure`. Prod's client is never touched and never learns a preview's
|
|
14
|
+
* callback. Reaping the preview deletes its client.
|
|
15
|
+
*
|
|
16
|
+
* This module is the vocabulary between the two ends of that protocol: the control plane,
|
|
17
|
+
* which decides when, and the team auth-server (`demos/auth-server`), which mints and
|
|
18
|
+
* deletes. Three platform-gated routes on the issuer, each addressed by the issuer's OWN
|
|
19
|
+
* scope and refused unless that scope is the named tenant's instance:
|
|
20
|
+
*
|
|
21
|
+
* - `POST /internal/preview-client/check` — does the parent sign in HERE? Read-only.
|
|
22
|
+
* - `POST /internal/preview-client` — mint the preview's client (re-checks first).
|
|
23
|
+
* - `DELETE /internal/preview-client` — delete the preview's clients, and only those.
|
|
24
|
+
*
|
|
25
|
+
* ## "The parent signs in here" is a platform fact, not a URI match
|
|
26
|
+
*
|
|
27
|
+
* Dynamic client registration is open at a team auth-server, and a callback URL is public.
|
|
28
|
+
* So "some client redirects to the parent's callback" proves nothing by itself: anybody can
|
|
29
|
+
* register one. The issuer claims a parent only when it holds a binding for the parent
|
|
30
|
+
* scope that ONLY the platform writes — a `place_app` row (#1670) or an `oauth_resource`
|
|
31
|
+
* row marked for that scope (#1619), both delivered by the dashboard through the
|
|
32
|
+
* platform-gated `/internal/configure` — AND an enabled client whose redirect URIs contain
|
|
33
|
+
* one of the parent's callbacks. The control plane asks every auth-server of the tenant and
|
|
34
|
+
* mints only where exactly one claims.
|
|
35
|
+
*
|
|
36
|
+
* ## Deletion is by tag, and by generation
|
|
37
|
+
*
|
|
38
|
+
* Every client minted here is recorded in the issuer's own `preview_client` table with the
|
|
39
|
+
* preview scope it belongs to and a generation the issuer assigns (monotonic per issuer, so
|
|
40
|
+
* the order is the issuer's own). A delete selects from that table and nothing else, so no
|
|
41
|
+
* delete can reach a client the platform did not mint for that preview — prod's included.
|
|
42
|
+
* A delete that keeps one client removes only the tagged clients OLDER than it, and says
|
|
43
|
+
* whether a newer one exists (`superseded`) or the kept one is gone (`kept: false`).
|
|
44
|
+
*/
|
|
45
|
+
/** Where a vertical's OIDC relying party receives the issuer's redirect. */
|
|
46
|
+
export const OIDC_CALLBACK_PATH = '/api/auth/callback';
|
|
47
|
+
/** The callback a relying party at `hostname` registers — exact-match, as issuers compare it. */
|
|
48
|
+
export function oidcCallbackUrl(hostname) {
|
|
49
|
+
return `https://${hostname}${OIDC_CALLBACK_PATH}`;
|
|
50
|
+
}
|
|
51
|
+
/** The issuer-side path of all three verbs (the check hangs off it as `/check`). */
|
|
52
|
+
export const PREVIEW_CLIENT_PATH = '/internal/preview-client';
|
|
53
|
+
/**
|
|
54
|
+
* An absolute `https:` URL with no fragment and no credentials — and nothing else. No
|
|
55
|
+
* loopback exception: both ends of this protocol are hosted apps, a preview always has an
|
|
56
|
+
* https `--<tag>` hostname and so does the app it forks, and previews do not exist in local
|
|
57
|
+
* dev at all. A loopback redirect registered at a hosted issuer would be a client whose
|
|
58
|
+
* code any process on the signing-in machine could receive, so it is refused outright
|
|
59
|
+
* rather than allowed "for local issuers".
|
|
60
|
+
*/
|
|
61
|
+
const redirectUri = z
|
|
62
|
+
.string()
|
|
63
|
+
.max(2048)
|
|
64
|
+
.refine((raw) => {
|
|
65
|
+
try {
|
|
66
|
+
const u = new URL(raw);
|
|
67
|
+
return u.protocol === 'https:' && !u.hash && !u.username && !u.password;
|
|
68
|
+
}
|
|
69
|
+
catch {
|
|
70
|
+
return false;
|
|
71
|
+
}
|
|
72
|
+
}, 'an absolute https URL with no fragment or credentials');
|
|
73
|
+
/** Every hostname the parent answers on, as the callback each would have registered. */
|
|
74
|
+
const parentRedirectUris = z.array(redirectUri).min(1).max(32);
|
|
75
|
+
/** The issuer the call addresses: its own scope, and the tenant that scope must belong to. */
|
|
76
|
+
const issuerAddress = {
|
|
77
|
+
tenantId,
|
|
78
|
+
scopeId,
|
|
79
|
+
};
|
|
80
|
+
/** `POST /internal/preview-client/check` — read-only: does the parent sign in here? */
|
|
81
|
+
export const previewClientCheck = z.object({
|
|
82
|
+
...issuerAddress,
|
|
83
|
+
parentScopeId: scopeId,
|
|
84
|
+
parentRedirectUris,
|
|
85
|
+
});
|
|
86
|
+
/** The check's answer. */
|
|
87
|
+
export const previewClientClaim = z.object({ claimed: z.boolean() });
|
|
88
|
+
/**
|
|
89
|
+
* `POST /internal/preview-client` — mint the preview's client. The issuer re-runs the check
|
|
90
|
+
* first and refuses (409) a parent it does not claim. The client it registers carries
|
|
91
|
+
* EXACTLY `redirectUri` and `postLogoutRedirectUri`; either one equal to a parent callback
|
|
92
|
+
* is refused, so a preview client can never stand in for prod's.
|
|
93
|
+
*/
|
|
94
|
+
export const previewClientMint = previewClientCheck.extend({
|
|
95
|
+
previewScopeId: scopeId,
|
|
96
|
+
redirectUri,
|
|
97
|
+
postLogoutRedirectUri: redirectUri,
|
|
98
|
+
clientName: z.string().trim().min(1).max(200),
|
|
99
|
+
});
|
|
100
|
+
/** What a mint answers — ONCE. The issuer stores the secret hashed, and nobody stores it here. */
|
|
101
|
+
export const mintedPreviewClient = z.object({
|
|
102
|
+
clientId: z.string().min(1),
|
|
103
|
+
clientSecret: z.string().min(1),
|
|
104
|
+
generation: z.number().int().positive(),
|
|
105
|
+
});
|
|
106
|
+
/**
|
|
107
|
+
* `DELETE /internal/preview-client` — delete a preview's clients. With neither option, every
|
|
108
|
+
* client minted for the preview (the reap). With `keep`, the ones minted BEFORE it (a push
|
|
109
|
+
* that has just delivered its own). With `only`, that one client if it is the preview's (a
|
|
110
|
+
* mint whose delivery failed cleaning up after itself).
|
|
111
|
+
*/
|
|
112
|
+
export const previewClientRetire = z
|
|
113
|
+
.object({
|
|
114
|
+
...issuerAddress,
|
|
115
|
+
previewScopeId: scopeId,
|
|
116
|
+
keep: z.string().min(1).optional(),
|
|
117
|
+
only: z.string().min(1).optional(),
|
|
118
|
+
})
|
|
119
|
+
.refine((b) => !(b.keep && b.only), 'pass keep or only, not both');
|
|
120
|
+
/**
|
|
121
|
+
* What a delete did. `kept` is null without `keep`; otherwise whether the kept client still
|
|
122
|
+
* exists. `superseded` is true when a client NEWER than the kept one exists for the preview:
|
|
123
|
+
* another push minted after this one, and it — not this one — owns what happens next.
|
|
124
|
+
*/
|
|
125
|
+
export const retiredPreviewClients = z.object({
|
|
126
|
+
deleted: z.array(z.string()),
|
|
127
|
+
kept: z.boolean().nullable(),
|
|
128
|
+
superseded: z.boolean(),
|
|
129
|
+
});
|
|
130
|
+
/**
|
|
131
|
+
* What `preview create` reports about the preview's login — the `auth` field of its answer.
|
|
132
|
+
* Never a secret: the client id and issuer, and the callback, are all the output carries.
|
|
133
|
+
*
|
|
134
|
+
* - `wired` — a team auth-server claimed the parent; the preview has its own client there.
|
|
135
|
+
* - `unregistered` — no team auth-server claimed the parent: an external issuer, a builtin
|
|
136
|
+
* login, or a team install whose binding the dashboard has not delivered yet.
|
|
137
|
+
* - `ambiguous` — more than one claimed, so the platform chose none.
|
|
138
|
+
* - `unknown` — some auth-server could not be asked (it predates this, or did not answer),
|
|
139
|
+
* and none that could claimed the parent.
|
|
140
|
+
* - `superseded` — a newer push owns the preview; this push delivered nothing to it.
|
|
141
|
+
* - `not-applicable` — a clean-room preview has no parent to sign in like.
|
|
142
|
+
*/
|
|
143
|
+
export const previewAuthStatus = z.enum(['wired', 'unregistered', 'ambiguous', 'unknown', 'superseded', 'not-applicable']);
|
|
144
|
+
export const previewAuth = z.object({
|
|
145
|
+
status: previewAuthStatus,
|
|
146
|
+
/** The preview's callback — what an external issuer would need registered. */
|
|
147
|
+
callbackUrl: z.string().nullable(),
|
|
148
|
+
/** `wired` only. */
|
|
149
|
+
issuer: z.string().optional(),
|
|
150
|
+
issuerScopeId: scopeId.optional(),
|
|
151
|
+
clientId: z.string().optional(),
|
|
152
|
+
/** `ambiguous` / `unknown`: the auth-servers involved, and for `unknown` what went wrong. */
|
|
153
|
+
issuers: z.array(z.object({ issuerScopeId: scopeId, problem: z.string().optional() })).optional(),
|
|
154
|
+
/** One or more lines, written for the person reading `preview create`'s output. */
|
|
155
|
+
note: z.string(),
|
|
156
|
+
});
|
|
157
|
+
//# sourceMappingURL=preview-client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preview-client.js","sourceRoot":"","sources":["../src/preview-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAE7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAEH,4EAA4E;AAC5E,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AE;IAC5B,UAAU,EAAE,CAAC,CAAC,OAAO,EAAE;CACxB,CAAC,CAAC;AAGH;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,SAAS,EAAE,YAAY,EAAE,gBAAgB,CAAC,CAAC,CAAC;AAG3H,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAClC,MAAM,EAAE,iBAAiB;IACzB,8EAA8E;IAC9E,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,oBAAoB;IACpB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,aAAa,EAAE,OAAO,CAAC,QAAQ,EAAE;IACjC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC/B,6FAA6F;IAC7F,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,aAAa,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE;IACjG,mFAAmF;IACnF,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;CACjB,CAAC,CAAC"}
|
package/dist/registry.d.ts
CHANGED
|
@@ -188,6 +188,7 @@ export declare const verticalVersion: z.ZodObject<{
|
|
|
188
188
|
}>>;
|
|
189
189
|
}, z.core.$strip>>>;
|
|
190
190
|
outbound: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
191
|
+
calls: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
191
192
|
createdAt: z.core.$ZodBranded<z.ZodString, "Instant", "out">;
|
|
192
193
|
}, z.core.$strip>;
|
|
193
194
|
export type VerticalVersion = z.infer<typeof verticalVersion>;
|
package/dist/registry.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB;;;;;;;;;;GAUG;AAEH,yFAAyF;AACzF,eAAO,MAAM,cAAc;;;;EAAoC,CAAC;AAChE,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAE5D,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAuHnB,CAAC;AACH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAC;AAEhD;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB;;;;;iBAK/B,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAExE,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAKhC,CAAC;AAGH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAE1E;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe;;;;EAA8C,CAAC;AAC3E,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAE9D;;;;;;;;;GASG;AACH,eAAO,MAAM,mBAAmB,oCAAoC,CAAC;AAErE;;;;;;;GAOG;AACH;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;iBAmBxB,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAE1D,eAAO,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"registry.d.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AC,CAAC;AAE9D,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;iBAoB5B,CAAC;AACL,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEtE;;;;;;;;;GASG;AACH,eAAO,MAAM,WAAW;;EAAmB,CAAC;AAC5C,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAEtD,eAAO,MAAM,eAAe;;;;;;;;iBAe1B,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAE9D;;;;;;;;;;GAUG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;iBAS9B,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEtE;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,wBAAwB;;;iBAGnC,CAAC;AACH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
|
package/dist/registry.js
CHANGED
|
@@ -232,6 +232,13 @@ export const verticalVersion = z.object({
|
|
|
232
232
|
* worker meters but does not enforce it.
|
|
233
233
|
*/
|
|
234
234
|
outbound: z.array(z.string()).nullish(),
|
|
235
|
+
/**
|
|
236
|
+
* The version's DECLARED outgoing PEER calls (#1706) — `substrat.calls`, lifted from its
|
|
237
|
+
* stored manifest exactly as `outbound` is, and null on the same terms (a version pushed
|
|
238
|
+
* before the declaration existed, which the platform reads as unenforced). The drain reads
|
|
239
|
+
* it to judge an asynchronous peer call, so the same rule holds on both legs.
|
|
240
|
+
*/
|
|
241
|
+
calls: z.array(z.string()).nullish(),
|
|
235
242
|
createdAt: instant,
|
|
236
243
|
});
|
|
237
244
|
export const publishVersionInput = verticalVersion
|
package/dist/registry.js.map
CHANGED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,CAAC,QAAQ,EAAE;IAC3C,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACxB,EAAE,EAAE,OAAO;CACZ,CAAC,CAAC;AAGH;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,gBAAgB,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IACxC,eAAe,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CACxC,CAAC,CAAC"}
|
package/dist/routing.d.ts
CHANGED
|
@@ -179,6 +179,7 @@ export declare const routeTarget: z.ZodObject<{
|
|
|
179
179
|
eu: "eu";
|
|
180
180
|
}>>;
|
|
181
181
|
outboundHosts: z.ZodDefault<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
182
|
+
calls: z.ZodDefault<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
182
183
|
}, z.core.$strip>;
|
|
183
184
|
export type RouteTarget = z.infer<typeof routeTarget>;
|
|
184
185
|
//# sourceMappingURL=routing.d.ts.map
|
package/dist/routing.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routing.d.ts","sourceRoot":"","sources":["../src/routing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;;;;GAMG;AAEH;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,WAAW,aAA4B,CAAC;AAErD;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,eAAe;;;iBAG1B,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAE9D;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,cAAc;;GAA4B,CAAC;AACxD,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAA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;;GAYG;AACH,eAAO,MAAM,cAAc;;;;;EAAuD,CAAC;AACnF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAE5D;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,SAAS;;;;;;;;iBAQpB,CAAC;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAC;AAElD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,QAAQ,aAA2C,CAAC;AAEjE,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAiC1B,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAE9D,eAAO,MAAM,iBAAiB;;;;;;;;;iBAO5B,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAElE;;;GAGG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;iBAgCtB,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC"}
|
package/dist/routing.js
CHANGED
|
@@ -183,5 +183,14 @@ export const routeTarget = z.object({
|
|
|
183
183
|
* Defaulted so a resolver that predates this field still parses.
|
|
184
184
|
*/
|
|
185
185
|
outboundHosts: z.array(z.string()).nullable().default(null),
|
|
186
|
+
/**
|
|
187
|
+
* The declared outgoing PEER calls of the code this dispatch will run (#1706) — the
|
|
188
|
+
* `calls` list from the same manifest `outboundHosts` comes from, joined in the same
|
|
189
|
+
* directory read. The router hands it to the egress worker as a dispatch parameter and
|
|
190
|
+
* judges a peer call against it. `null` = a version pushed before the declaration existed,
|
|
191
|
+
* which is unenforced (as a pre-#303 `outbound` is). Defaulted, so a resolver that predates
|
|
192
|
+
* this field still parses.
|
|
193
|
+
*/
|
|
194
|
+
calls: z.array(verticalSlug).nullable().default(null),
|
|
186
195
|
});
|
|
187
196
|
//# sourceMappingURL=routing.js.map
|
package/dist/routing.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routing.js","sourceRoot":"","sources":["../src/routing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAEpE;;;;;;GAMG;AAEH;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AAErD;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,IAAI,EAAE,WAAW;IACjB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC;CACjC,CAAC,CAAC;AAGH;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC;AAGxD;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC;AAGnF;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,CAAC,MAAM,CAAC;IAChC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;IACjC,4FAA4F;IAC5F,IAAI,EAAE,CAAC,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,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;IACrD;;;;OAIG;IACH,iBAAiB,EAAE,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;CAClD,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,iBAAiB,GAAG,eAAe,CAAC,IAAI,CAAC;IACpD,QAAQ,EAAE,IAAI;IACd,QAAQ,EAAE,IAAI;IACd,OAAO,EAAE,IAAI;IACb,OAAO,EAAE,IAAI;IACb,MAAM,EAAE,IAAI;IACZ,SAAS,EAAE,IAAI;CAChB,CAAC,CAAC;AAGH;;;GAGG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAClC,QAAQ;IACR,OAAO;IACP,YAAY,EAAE,YAAY,CAAC,QAAQ,EAAE;IACrC;;;;;;OAMG;IACH,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IAC3C,OAAO,EAAE,WAAW;IACpB,MAAM,EAAE,cAAc;IACtB;;;;;;;OAOG;IACH,aAAa,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;IAC3D;;;;;;;OAOG;IACH,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;CACtD,CAAC,CAAC"}
|
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { scopeId } from './ids.js';
|
|
3
|
+
/**
|
|
4
|
+
* One exported event as it crosses (#1705): the domain fact, and not the producer's
|
|
5
|
+
* record of who was allowed to cause it.
|
|
6
|
+
*
|
|
7
|
+
* Deliberately NOT the envelope (`domainEvent`). `actor`, `authorization` and
|
|
8
|
+
* `impersonation` describe authority inside the producer's scope: a principal id that
|
|
9
|
+
* means nothing to another vertical and identifies a person to anyone who can join it
|
|
10
|
+
* back, the K-34 chain, and a staff session. None of that is the consumer's to hold. So is
|
|
11
|
+
* `piiClass`: only `none` crosses, so the field would carry one value. `subjectId` crosses
|
|
12
|
+
* neither, because a `none` event has none.
|
|
13
|
+
*
|
|
14
|
+
* `hops` is how many vertical boundaries this event's cause chain has crossed, counting
|
|
15
|
+
* this one. It is what breaks a P ↔ C loop. The in-scope cascade cap only defers a round
|
|
16
|
+
* to the next call, so it would let two verticals feed each other forever at sweep pace.
|
|
17
|
+
*/
|
|
18
|
+
export declare const exportedEvent: z.ZodObject<{
|
|
19
|
+
id: z.core.$ZodBranded<z.ZodString, "EventId", "out">;
|
|
20
|
+
type: z.ZodString;
|
|
21
|
+
schemaVersion: z.ZodNumber;
|
|
22
|
+
occurredAt: z.core.$ZodBranded<z.ZodString, "Instant", "out">;
|
|
23
|
+
entity: z.ZodObject<{
|
|
24
|
+
entityType: z.ZodString;
|
|
25
|
+
entityId: z.ZodString;
|
|
26
|
+
}, z.core.$strip>;
|
|
27
|
+
payload: z.ZodUnknown;
|
|
28
|
+
hops: z.ZodNumber;
|
|
29
|
+
}, z.core.$strip>;
|
|
30
|
+
export type ExportedEvent = z.infer<typeof exportedEvent>;
|
|
31
|
+
/**
|
|
32
|
+
* Why an event of a type the consumer asked for was not released to it (#1705).
|
|
33
|
+
*
|
|
34
|
+
* Each is PERMANENT for that event, which is what licenses stepping the watermark
|
|
35
|
+
* past it: the classification, the version and the cause chain are all fixed once
|
|
36
|
+
* the row is written, so asking again cannot change the answer. Authority is
|
|
37
|
+
* deliberately NOT a reason here. It can change, so a missing key pauses the whole
|
|
38
|
+
* edge (`paused`) instead of dropping what arrived while it was missing.
|
|
39
|
+
*
|
|
40
|
+
* - `pii`: the row is classified other than `none`. Only textless events cross.
|
|
41
|
+
* - `version`: the row's schemaVersion is not the one the consumer declares (K-39:
|
|
42
|
+
* a strict parse on the other side would reject it, so it is never handed over).
|
|
43
|
+
* - `cascade`: the cause chain has already crossed the maximum number of vertical
|
|
44
|
+
* boundaries.
|
|
45
|
+
* - `undecodable`: the stored row does not decode (#1636). The decode is pure, of text
|
|
46
|
+
* already written, so a retry cannot succeed. The in-scope consumers dead-letter the same
|
|
47
|
+
* row for the same reason.
|
|
48
|
+
*/
|
|
49
|
+
export declare const withheldReason: z.ZodEnum<{
|
|
50
|
+
cascade: "cascade";
|
|
51
|
+
pii: "pii";
|
|
52
|
+
undecodable: "undecodable";
|
|
53
|
+
version: "version";
|
|
54
|
+
}>;
|
|
55
|
+
export type WithheldReason = z.infer<typeof withheldReason>;
|
|
56
|
+
/**
|
|
57
|
+
* A withheld row, named but not carried: no payload crosses. The fields are the stored
|
|
58
|
+
* columns, read leniently, because an `undecodable` row is the one whose columns may be
|
|
59
|
+
* exactly what failed. The consumer journals this as a dead letter, so its operator sees
|
|
60
|
+
* that something was sent and not delivered.
|
|
61
|
+
*/
|
|
62
|
+
export declare const withheldEvent: z.ZodObject<{
|
|
63
|
+
id: z.core.$ZodBranded<z.ZodString, "EventId", "out">;
|
|
64
|
+
type: z.ZodString;
|
|
65
|
+
schemaVersion: z.ZodNumber;
|
|
66
|
+
occurredAt: z.ZodString;
|
|
67
|
+
entity: z.ZodObject<{
|
|
68
|
+
entityType: z.ZodString;
|
|
69
|
+
entityId: z.ZodString;
|
|
70
|
+
}, z.core.$strip>;
|
|
71
|
+
reason: z.ZodEnum<{
|
|
72
|
+
cascade: "cascade";
|
|
73
|
+
pii: "pii";
|
|
74
|
+
undecodable: "undecodable";
|
|
75
|
+
version: "version";
|
|
76
|
+
}>;
|
|
77
|
+
}, z.core.$strip>;
|
|
78
|
+
export type WithheldEvent = z.infer<typeof withheldEvent>;
|
|
79
|
+
/** One (type, version) a consumer declares it receives from a given producer. */
|
|
80
|
+
export declare const wantedEvent: z.ZodObject<{
|
|
81
|
+
type: z.ZodString;
|
|
82
|
+
schemaVersion: z.ZodNumber;
|
|
83
|
+
}, z.core.$strip>;
|
|
84
|
+
export type WantedEvent = z.infer<typeof wantedEvent>;
|
|
85
|
+
/**
|
|
86
|
+
* The producer-side read (#1705): what the platform asks a producer scope for.
|
|
87
|
+
*
|
|
88
|
+
* `consumer` is the receiving vertical's slug, asserted by the platform from its directory
|
|
89
|
+
* and never taken from either vertical. `wants` is what the consumer declares, and it is a
|
|
90
|
+
* request, not an authority: the producer answers from its own running `exports`, so a type
|
|
91
|
+
* it does not export is never released however it is asked for.
|
|
92
|
+
*/
|
|
93
|
+
export declare const exportReadInput: z.ZodObject<{
|
|
94
|
+
consumer: z.ZodString;
|
|
95
|
+
after: z.ZodNullable<z.core.$ZodBranded<z.ZodString, "EventId", "out">>;
|
|
96
|
+
wants: z.ZodArray<z.ZodObject<{
|
|
97
|
+
type: z.ZodString;
|
|
98
|
+
schemaVersion: z.ZodNumber;
|
|
99
|
+
}, z.core.$strip>>;
|
|
100
|
+
limit: z.ZodNumber;
|
|
101
|
+
}, z.core.$strip>;
|
|
102
|
+
export type ExportReadInput = z.infer<typeof exportReadInput>;
|
|
103
|
+
/**
|
|
104
|
+
* The producer's answer (#1705).
|
|
105
|
+
*
|
|
106
|
+
* `next` is the watermark the consumer should hold once it has taken this batch: the id of
|
|
107
|
+
* the last row the read WALKED, released or withheld. A withheld row is stepped over
|
|
108
|
+
* because its reason is permanent. A paused edge answers with `next === after` and no
|
|
109
|
+
* events: the read walked nothing, so the producer's outbox keeps the backlog.
|
|
110
|
+
*
|
|
111
|
+
* `paused` lists the keys the consumer's principal does not hold here. `unexported`
|
|
112
|
+
* lists what the consumer wants and this producer does not export at all. That is
|
|
113
|
+
* reported rather than paused, because a consumer may declare an import its producer has
|
|
114
|
+
* not shipped yet.
|
|
115
|
+
*/
|
|
116
|
+
export declare const exportedBatch: z.ZodObject<{
|
|
117
|
+
events: z.ZodArray<z.ZodObject<{
|
|
118
|
+
id: z.core.$ZodBranded<z.ZodString, "EventId", "out">;
|
|
119
|
+
type: z.ZodString;
|
|
120
|
+
schemaVersion: z.ZodNumber;
|
|
121
|
+
occurredAt: z.core.$ZodBranded<z.ZodString, "Instant", "out">;
|
|
122
|
+
entity: z.ZodObject<{
|
|
123
|
+
entityType: z.ZodString;
|
|
124
|
+
entityId: z.ZodString;
|
|
125
|
+
}, z.core.$strip>;
|
|
126
|
+
payload: z.ZodUnknown;
|
|
127
|
+
hops: z.ZodNumber;
|
|
128
|
+
}, z.core.$strip>>;
|
|
129
|
+
withheld: z.ZodArray<z.ZodObject<{
|
|
130
|
+
id: z.core.$ZodBranded<z.ZodString, "EventId", "out">;
|
|
131
|
+
type: z.ZodString;
|
|
132
|
+
schemaVersion: z.ZodNumber;
|
|
133
|
+
occurredAt: z.ZodString;
|
|
134
|
+
entity: z.ZodObject<{
|
|
135
|
+
entityType: z.ZodString;
|
|
136
|
+
entityId: z.ZodString;
|
|
137
|
+
}, z.core.$strip>;
|
|
138
|
+
reason: z.ZodEnum<{
|
|
139
|
+
cascade: "cascade";
|
|
140
|
+
pii: "pii";
|
|
141
|
+
undecodable: "undecodable";
|
|
142
|
+
version: "version";
|
|
143
|
+
}>;
|
|
144
|
+
}, z.core.$strip>>;
|
|
145
|
+
unexported: z.ZodArray<z.ZodObject<{
|
|
146
|
+
type: z.ZodString;
|
|
147
|
+
schemaVersion: z.ZodNumber;
|
|
148
|
+
}, z.core.$strip>>;
|
|
149
|
+
paused: z.ZodNullable<z.ZodObject<{
|
|
150
|
+
missing: z.ZodArray<z.core.$ZodBranded<z.ZodString, "PermissionKey", "out">>;
|
|
151
|
+
}, z.core.$strip>>;
|
|
152
|
+
next: z.ZodNullable<z.core.$ZodBranded<z.ZodString, "EventId", "out">>;
|
|
153
|
+
more: z.ZodBoolean;
|
|
154
|
+
}, z.core.$strip>;
|
|
155
|
+
export type ExportedBatch = z.infer<typeof exportedBatch>;
|
|
156
|
+
/** One producer a consumer scope has taken events from, and how far (#1705). */
|
|
157
|
+
export declare const importCursor: z.ZodObject<{
|
|
158
|
+
source: z.core.$ZodBranded<z.ZodString, "ScopeId", "out">;
|
|
159
|
+
vertical: z.ZodString;
|
|
160
|
+
cursor: z.ZodNullable<z.core.$ZodBranded<z.ZodString, "EventId", "out">>;
|
|
161
|
+
updatedAt: z.ZodNullable<z.core.$ZodBranded<z.ZodString, "Instant", "out">>;
|
|
162
|
+
}, z.core.$strip>;
|
|
163
|
+
export type ImportCursor = z.infer<typeof importCursor>;
|
|
164
|
+
/**
|
|
165
|
+
* What a consumer scope says about itself before a pass (#1705): what its RUNNING code
|
|
166
|
+
* imports, and its watermark per producer. Both come from the consumer, not the registry,
|
|
167
|
+
* because the version serving the scope is the one whose handlers will run.
|
|
168
|
+
*/
|
|
169
|
+
export declare const importState: z.ZodObject<{
|
|
170
|
+
consumes: z.ZodArray<z.ZodObject<{
|
|
171
|
+
from: z.ZodString;
|
|
172
|
+
type: z.ZodString;
|
|
173
|
+
schemaVersion: z.ZodNumber;
|
|
174
|
+
}, z.core.$strip>>;
|
|
175
|
+
cursors: z.ZodArray<z.ZodObject<{
|
|
176
|
+
source: z.core.$ZodBranded<z.ZodString, "ScopeId", "out">;
|
|
177
|
+
vertical: z.ZodString;
|
|
178
|
+
cursor: z.ZodNullable<z.core.$ZodBranded<z.ZodString, "EventId", "out">>;
|
|
179
|
+
updatedAt: z.ZodNullable<z.core.$ZodBranded<z.ZodString, "Instant", "out">>;
|
|
180
|
+
}, z.core.$strip>>;
|
|
181
|
+
}, z.core.$strip>;
|
|
182
|
+
export type ImportState = z.infer<typeof importState>;
|
|
183
|
+
/**
|
|
184
|
+
* The batch handed to the consumer (#1705).
|
|
185
|
+
*
|
|
186
|
+
* `after` is a compare-and-set: the consumer applies the batch only if its watermark for
|
|
187
|
+
* this source is still `after`. Two overlapping passes (a sweep that outruns its interval)
|
|
188
|
+
* would otherwise each apply what they read, and the one that read less would move the
|
|
189
|
+
* watermark BACKWARDS. The redelivery that caused would be absorbed by the delivery
|
|
190
|
+
* journal, but it is still work nobody asked for.
|
|
191
|
+
*/
|
|
192
|
+
export declare const importBatch: z.ZodObject<{
|
|
193
|
+
source: z.ZodObject<{
|
|
194
|
+
vertical: z.ZodString;
|
|
195
|
+
scopeId: z.core.$ZodBranded<z.ZodString, "ScopeId", "out">;
|
|
196
|
+
}, z.core.$strip>;
|
|
197
|
+
after: z.ZodNullable<z.core.$ZodBranded<z.ZodString, "EventId", "out">>;
|
|
198
|
+
next: z.core.$ZodBranded<z.ZodString, "EventId", "out">;
|
|
199
|
+
events: z.ZodArray<z.ZodObject<{
|
|
200
|
+
id: z.core.$ZodBranded<z.ZodString, "EventId", "out">;
|
|
201
|
+
type: z.ZodString;
|
|
202
|
+
schemaVersion: z.ZodNumber;
|
|
203
|
+
occurredAt: z.core.$ZodBranded<z.ZodString, "Instant", "out">;
|
|
204
|
+
entity: z.ZodObject<{
|
|
205
|
+
entityType: z.ZodString;
|
|
206
|
+
entityId: z.ZodString;
|
|
207
|
+
}, z.core.$strip>;
|
|
208
|
+
payload: z.ZodUnknown;
|
|
209
|
+
hops: z.ZodNumber;
|
|
210
|
+
}, z.core.$strip>>;
|
|
211
|
+
withheld: z.ZodArray<z.ZodObject<{
|
|
212
|
+
id: z.core.$ZodBranded<z.ZodString, "EventId", "out">;
|
|
213
|
+
type: z.ZodString;
|
|
214
|
+
schemaVersion: z.ZodNumber;
|
|
215
|
+
occurredAt: z.ZodString;
|
|
216
|
+
entity: z.ZodObject<{
|
|
217
|
+
entityType: z.ZodString;
|
|
218
|
+
entityId: z.ZodString;
|
|
219
|
+
}, z.core.$strip>;
|
|
220
|
+
reason: z.ZodEnum<{
|
|
221
|
+
cascade: "cascade";
|
|
222
|
+
pii: "pii";
|
|
223
|
+
undecodable: "undecodable";
|
|
224
|
+
version: "version";
|
|
225
|
+
}>;
|
|
226
|
+
}, z.core.$strip>>;
|
|
227
|
+
}, z.core.$strip>;
|
|
228
|
+
export type ImportBatch = z.infer<typeof importBatch>;
|
|
229
|
+
/**
|
|
230
|
+
* What applying one batch did (#1705).
|
|
231
|
+
*
|
|
232
|
+
* `stale`: the compare-and-set refused the batch, and nothing ran. `paused`: this scope
|
|
233
|
+
* refused the producer at its door. The producer is not a declared peer here, or its kill
|
|
234
|
+
* switch is off, so nothing ran, the watermark did not move, and the producer's outbox keeps
|
|
235
|
+
* the backlog until the peer is admitted again. It is the consumer side's twin of
|
|
236
|
+
* `ExportedBatch.paused`.
|
|
237
|
+
*/
|
|
238
|
+
export declare const importResult: z.ZodObject<{
|
|
239
|
+
delivered: z.ZodNumber;
|
|
240
|
+
deadLettered: z.ZodNumber;
|
|
241
|
+
duplicates: z.ZodNumber;
|
|
242
|
+
withheld: z.ZodNumber;
|
|
243
|
+
cursor: z.ZodNullable<z.core.$ZodBranded<z.ZodString, "EventId", "out">>;
|
|
244
|
+
stale: z.ZodBoolean;
|
|
245
|
+
paused: z.ZodNullable<z.ZodObject<{
|
|
246
|
+
reason: z.ZodString;
|
|
247
|
+
}, z.core.$strip>>;
|
|
248
|
+
}, z.core.$strip>;
|
|
249
|
+
export type ImportResult = z.infer<typeof importResult>;
|
|
250
|
+
/**
|
|
251
|
+
* The event an import handler is handed (#1705): the crossed fact plus where it came from.
|
|
252
|
+
*
|
|
253
|
+
* `source` is platform-asserted, from the directory: the producer's vertical and the scope
|
|
254
|
+
* that emitted it. It is DATA, never authority. What the handler may do in its own scope is
|
|
255
|
+
* decided by its own checks, against the grants its scope gave the producer's principal.
|
|
256
|
+
*/
|
|
257
|
+
export type ImportedEvent = Omit<ExportedEvent, 'hops'> & {
|
|
258
|
+
source: {
|
|
259
|
+
vertical: string;
|
|
260
|
+
scopeId: z.infer<typeof scopeId>;
|
|
261
|
+
};
|
|
262
|
+
};
|
|
263
|
+
/** How many vertical boundaries a cause chain may cross before its next export is withheld. */
|
|
264
|
+
export declare const EXPORT_HOP_CAP = 8;
|
|
265
|
+
//# sourceMappingURL=vertical-events.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vertical-events.d.ts","sourceRoot":"","s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