@substrat-run/contracts 0.162.0 → 0.164.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.
@@ -0,0 +1,314 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Vertical-defined connectors (docs/architecture/vertical-connectors.md): the vocabulary a
4
+ * vertical's connector declaration, the platform's call into the vertical's worker, and the
5
+ * vertical's answer share.
6
+ *
7
+ * The platform keeps every piece of state and authority it holds for a first-party connector —
8
+ * the sealed credential, the bindings, the connector state — and hands the vertical's code one
9
+ * connection's worth of it per call (§6). Everything that crosses that call is parsed by these
10
+ * schemas on both ends.
11
+ */
12
+ /** A dot marks a vertical-defined provider (§4); first-party slugs never contain one. */
13
+ export declare function isVerticalConnectorProvider(provider: string): boolean;
14
+ export declare const verticalConnectorProvider: z.ZodString;
15
+ /**
16
+ * One field of the credential form the dashboard renders for a vertical-defined provider — the
17
+ * dashboard's own `ProviderField`, minus `toggle`. Every field is stored sealed regardless of
18
+ * `secret`, which only decides whether the UI echoes it back.
19
+ */
20
+ export declare const verticalConnectorField: z.ZodObject<{
21
+ key: z.ZodString;
22
+ label: z.ZodString;
23
+ secret: z.ZodBoolean;
24
+ placeholder: z.ZodOptional<z.ZodString>;
25
+ optional: z.ZodOptional<z.ZodLiteral<true>>;
26
+ }, z.core.$strict>;
27
+ export type VerticalConnectorField = z.infer<typeof verticalConnectorField>;
28
+ /**
29
+ * The static half of one `defineConnectors` entry (§5.1), as the push manifest carries it.
30
+ *
31
+ * `sweeps`, `binds` and `dispatches` say which optional hooks the code supplies. The probes are
32
+ * mandatory, so they carry no flag. `dispatches` is true exactly when `events` routes something:
33
+ * a routed event with no handler would fail every delivery, and a handler nothing routes to is
34
+ * dead code the declaration should not advertise.
35
+ */
36
+ export declare const verticalConnectorDeclaration: z.ZodObject<{
37
+ provider: z.ZodString;
38
+ label: z.ZodString;
39
+ description: z.ZodString;
40
+ monogram: z.ZodOptional<z.ZodString>;
41
+ fields: z.ZodArray<z.ZodObject<{
42
+ key: z.ZodString;
43
+ label: z.ZodString;
44
+ secret: z.ZodBoolean;
45
+ placeholder: z.ZodOptional<z.ZodString>;
46
+ optional: z.ZodOptional<z.ZodLiteral<true>>;
47
+ }, z.core.$strict>>;
48
+ grants: z.ZodArray<z.core.$ZodBranded<z.ZodString, "PermissionKey", "out">>;
49
+ events: z.ZodArray<z.ZodString>;
50
+ sweeps: z.ZodBoolean;
51
+ binds: z.ZodBoolean;
52
+ dispatches: z.ZodBoolean;
53
+ }, z.core.$strict>;
54
+ export type VerticalConnectorDeclaration = z.infer<typeof verticalConnectorDeclaration>;
55
+ export declare const verticalConnectorDeclarations: z.ZodArray<z.ZodObject<{
56
+ provider: z.ZodString;
57
+ label: z.ZodString;
58
+ description: z.ZodString;
59
+ monogram: z.ZodOptional<z.ZodString>;
60
+ fields: z.ZodArray<z.ZodObject<{
61
+ key: z.ZodString;
62
+ label: z.ZodString;
63
+ secret: z.ZodBoolean;
64
+ placeholder: z.ZodOptional<z.ZodString>;
65
+ optional: z.ZodOptional<z.ZodLiteral<true>>;
66
+ }, z.core.$strict>>;
67
+ grants: z.ZodArray<z.core.$ZodBranded<z.ZodString, "PermissionKey", "out">>;
68
+ events: z.ZodArray<z.ZodString>;
69
+ sweeps: z.ZodBoolean;
70
+ binds: z.ZodBoolean;
71
+ dispatches: z.ZodBoolean;
72
+ }, z.core.$strict>>;
73
+ /** The platform-surface route the platform calls a vertical's connector through (§6.3). */
74
+ export declare const CONNECTOR_CALL_PATH = "/internal/connector-call";
75
+ /** The route the connection-level roles (`probe`, `probe-candidate`) take: no scope, no nonce (§6.3). */
76
+ export declare const CONNECTOR_PROBE_PATH = "/internal/connector-probe";
77
+ /** State per call, serialised, in and out (§6.2). */
78
+ export declare const CONNECTOR_CALL_STATE_MAX_BYTES: number;
79
+ /** State keys per call, in and out (§6.2). */
80
+ export declare const CONNECTOR_CALL_STATE_MAX_KEYS = 2000;
81
+ /** Recorded uses one call may report. */
82
+ export declare const CONNECTOR_CALL_MAX_USES = 100;
83
+ /** The connector-state key the platform keeps a scope's binding under (§6.1). */
84
+ export declare const VERTICAL_CONNECTOR_BINDING_PREFIX = "vc:binding:";
85
+ /** The connector-state prefix the vertical's own state lives under (§6.2). */
86
+ export declare const VERTICAL_CONNECTOR_STATE_PREFIX = "vc:state:";
87
+ export declare function verticalConnectorBindingKey(scopeId: string): string;
88
+ /** `vc:state:-:` for connection-level state, `vc:state:<scopeId>:` for one scope's. */
89
+ export declare function verticalConnectorStatePrefix(scopeId: string | null): string;
90
+ export declare function verticalConnectorStateKey(scopeId: string | null, key: string): string;
91
+ /** The connector's state as a call carries it in: the keys, without their storage prefix. */
92
+ export declare const connectorCallState: z.ZodArray<z.ZodObject<{
93
+ key: z.ZodString;
94
+ value: z.ZodUnknown;
95
+ }, z.core.$strict>>;
96
+ export type ConnectorCallState = z.infer<typeof connectorCallState>;
97
+ /** The connector's state writes as a call carries them out. A `null` value deletes the key. */
98
+ export declare const connectorCallStateWrites: z.ZodArray<z.ZodObject<{
99
+ key: z.ZodString;
100
+ value: z.ZodUnknown;
101
+ }, z.core.$strict>>;
102
+ export type ConnectorCallStateWrites = z.infer<typeof connectorCallStateWrites>;
103
+ /** One recorded use of the connection — the kernel's `ConnectionUseOutcome`, on the wire. */
104
+ export declare const connectionUseOutcome: z.ZodDiscriminatedUnion<[z.ZodObject<{
105
+ durationMs: z.ZodOptional<z.ZodNumber>;
106
+ status: z.ZodOptional<z.ZodNumber>;
107
+ timedOut: z.ZodOptional<z.ZodBoolean>;
108
+ ok: z.ZodLiteral<true>;
109
+ }, z.core.$strict>, z.ZodObject<{
110
+ durationMs: z.ZodOptional<z.ZodNumber>;
111
+ status: z.ZodOptional<z.ZodNumber>;
112
+ timedOut: z.ZodOptional<z.ZodBoolean>;
113
+ ok: z.ZodLiteral<false>;
114
+ error: z.ZodString;
115
+ }, z.core.$strict>], "ok">;
116
+ export type ConnectionUseOutcomeWire = z.infer<typeof connectionUseOutcome>;
117
+ /** A binding the platform holds for a vertical-defined connection (§6.1), at `vc:binding:<scopeId>`. */
118
+ export declare const verticalConnectorBinding: z.ZodObject<{
119
+ scopeId: z.core.$ZodBranded<z.ZodString, "ScopeId", "out">;
120
+ operation: z.ZodString;
121
+ permission: z.core.$ZodBranded<z.ZodString, "PermissionKey", "out">;
122
+ options: z.ZodRecord<z.ZodString, z.ZodUnknown>;
123
+ declared: z.ZodRecord<z.ZodString, z.ZodUnknown>;
124
+ boundAt: z.core.$ZodBranded<z.ZodString, "Instant", "out">;
125
+ }, z.core.$strict>;
126
+ export type VerticalConnectorBinding = z.infer<typeof verticalConnectorBinding>;
127
+ /** The connection a call is made for, with its opened credential. Never anything else's. */
128
+ export declare const connectorCallConnection: z.ZodObject<{
129
+ id: z.core.$ZodBranded<z.ZodString, "ConnectionId", "out">;
130
+ tenantId: z.core.$ZodBranded<z.ZodString, "TenantId", "out">;
131
+ vertical: z.ZodString;
132
+ provider: z.ZodString;
133
+ externalAccountRef: z.ZodNullable<z.ZodString>;
134
+ expiresAt: z.ZodNullable<z.core.$ZodBranded<z.ZodString, "Instant", "out">>;
135
+ secret: z.ZodRecord<z.ZodString, z.ZodString>;
136
+ }, z.core.$strict>;
137
+ export type ConnectorCallConnection = z.infer<typeof connectorCallConnection>;
138
+ /** The platform's call into a vertical's worker (§6.3), one per role. */
139
+ export declare const connectorCallRequest: z.ZodDiscriminatedUnion<[z.ZodObject<{
140
+ role: z.ZodLiteral<"probe-candidate">;
141
+ provider: z.ZodString;
142
+ secret: z.ZodRecord<z.ZodString, z.ZodString>;
143
+ }, z.core.$strict>, z.ZodObject<{
144
+ role: z.ZodLiteral<"probe">;
145
+ provider: z.ZodString;
146
+ connection: z.ZodObject<{
147
+ id: z.core.$ZodBranded<z.ZodString, "ConnectionId", "out">;
148
+ tenantId: z.core.$ZodBranded<z.ZodString, "TenantId", "out">;
149
+ vertical: z.ZodString;
150
+ provider: z.ZodString;
151
+ externalAccountRef: z.ZodNullable<z.ZodString>;
152
+ expiresAt: z.ZodNullable<z.core.$ZodBranded<z.ZodString, "Instant", "out">>;
153
+ secret: z.ZodRecord<z.ZodString, z.ZodString>;
154
+ }, z.core.$strict>;
155
+ state: z.ZodArray<z.ZodObject<{
156
+ key: z.ZodString;
157
+ value: z.ZodUnknown;
158
+ }, z.core.$strict>>;
159
+ }, z.core.$strict>, z.ZodObject<{
160
+ role: z.ZodLiteral<"bind">;
161
+ provider: z.ZodString;
162
+ connection: z.ZodObject<{
163
+ id: z.core.$ZodBranded<z.ZodString, "ConnectionId", "out">;
164
+ tenantId: z.core.$ZodBranded<z.ZodString, "TenantId", "out">;
165
+ vertical: z.ZodString;
166
+ provider: z.ZodString;
167
+ externalAccountRef: z.ZodNullable<z.ZodString>;
168
+ expiresAt: z.ZodNullable<z.core.$ZodBranded<z.ZodString, "Instant", "out">>;
169
+ secret: z.ZodRecord<z.ZodString, z.ZodString>;
170
+ }, z.core.$strict>;
171
+ scopeId: z.core.$ZodBranded<z.ZodString, "ScopeId", "out">;
172
+ options: z.ZodRecord<z.ZodString, z.ZodUnknown>;
173
+ }, z.core.$strict>, z.ZodObject<{
174
+ role: z.ZodLiteral<"sweep">;
175
+ provider: z.ZodString;
176
+ connection: z.ZodObject<{
177
+ id: z.core.$ZodBranded<z.ZodString, "ConnectionId", "out">;
178
+ tenantId: z.core.$ZodBranded<z.ZodString, "TenantId", "out">;
179
+ vertical: z.ZodString;
180
+ provider: z.ZodString;
181
+ externalAccountRef: z.ZodNullable<z.ZodString>;
182
+ expiresAt: z.ZodNullable<z.core.$ZodBranded<z.ZodString, "Instant", "out">>;
183
+ secret: z.ZodRecord<z.ZodString, z.ZodString>;
184
+ }, z.core.$strict>;
185
+ binding: z.ZodObject<{
186
+ scopeId: z.core.$ZodBranded<z.ZodString, "ScopeId", "out">;
187
+ operation: z.ZodString;
188
+ permission: z.core.$ZodBranded<z.ZodString, "PermissionKey", "out">;
189
+ options: z.ZodRecord<z.ZodString, z.ZodUnknown>;
190
+ declared: z.ZodRecord<z.ZodString, z.ZodUnknown>;
191
+ boundAt: z.core.$ZodBranded<z.ZodString, "Instant", "out">;
192
+ }, z.core.$strict>;
193
+ state: z.ZodArray<z.ZodObject<{
194
+ key: z.ZodString;
195
+ value: z.ZodUnknown;
196
+ }, z.core.$strict>>;
197
+ }, z.core.$strict>, z.ZodObject<{
198
+ role: z.ZodLiteral<"dispatch">;
199
+ provider: z.ZodString;
200
+ connection: z.ZodObject<{
201
+ id: z.core.$ZodBranded<z.ZodString, "ConnectionId", "out">;
202
+ tenantId: z.core.$ZodBranded<z.ZodString, "TenantId", "out">;
203
+ vertical: z.ZodString;
204
+ provider: z.ZodString;
205
+ externalAccountRef: z.ZodNullable<z.ZodString>;
206
+ expiresAt: z.ZodNullable<z.core.$ZodBranded<z.ZodString, "Instant", "out">>;
207
+ secret: z.ZodRecord<z.ZodString, z.ZodString>;
208
+ }, z.core.$strict>;
209
+ scopeId: z.core.$ZodBranded<z.ZodString, "ScopeId", "out">;
210
+ binding: z.ZodNullable<z.ZodObject<{
211
+ scopeId: z.core.$ZodBranded<z.ZodString, "ScopeId", "out">;
212
+ operation: z.ZodString;
213
+ permission: z.core.$ZodBranded<z.ZodString, "PermissionKey", "out">;
214
+ options: z.ZodRecord<z.ZodString, z.ZodUnknown>;
215
+ declared: z.ZodRecord<z.ZodString, z.ZodUnknown>;
216
+ boundAt: z.core.$ZodBranded<z.ZodString, "Instant", "out">;
217
+ }, z.core.$strict>>;
218
+ event: z.ZodObject<{
219
+ id: z.core.$ZodBranded<z.ZodString, "EventId", "out">;
220
+ type: z.ZodString;
221
+ schemaVersion: z.ZodNumber;
222
+ occurredAt: z.core.$ZodBranded<z.ZodString, "Instant", "out">;
223
+ tenantId: z.core.$ZodBranded<z.ZodString, "TenantId", "out">;
224
+ scopeId: z.core.$ZodBranded<z.ZodString, "ScopeId", "out">;
225
+ actor: z.ZodUnion<readonly [z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">, z.ZodObject<{
226
+ system: z.core.$ZodBranded<z.ZodString, "ModuleId", "out">;
227
+ }, z.core.$strip>, z.ZodObject<{
228
+ connection: z.ZodString;
229
+ }, z.core.$strip>, z.ZodObject<{
230
+ capability: z.core.$ZodBranded<z.ZodString, "CapabilityId", "out">;
231
+ }, z.core.$strip>, z.ZodObject<{
232
+ vertical: z.ZodString;
233
+ scope: z.core.$ZodBranded<z.ZodString, "ScopeId", "out">;
234
+ }, z.core.$strip>]>;
235
+ entity: z.ZodObject<{
236
+ entityType: z.ZodString;
237
+ entityId: z.ZodString;
238
+ }, z.core.$strip>;
239
+ piiClass: z.ZodEnum<{
240
+ direct: "direct";
241
+ none: "none";
242
+ pseudonymous: "pseudonymous";
243
+ }>;
244
+ subjectId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "DataSubjectId", "out">>;
245
+ authorization: z.ZodOptional<z.ZodArray<z.ZodObject<{
246
+ permission: z.core.$ZodBranded<z.ZodString, "PermissionKey", "out">;
247
+ grant: z.ZodOptional<z.ZodString>;
248
+ }, z.core.$strip>>>;
249
+ impersonation: z.ZodOptional<z.ZodObject<{
250
+ session: z.core.$ZodBranded<z.ZodString, "ImpersonationSessionId", "out">;
251
+ by: z.core.$ZodBranded<z.ZodString, "PlatformActorId", "out">;
252
+ }, z.core.$strip>>;
253
+ operation: z.ZodOptional<z.ZodString>;
254
+ payload: z.ZodUnknown;
255
+ }, z.core.$strip>;
256
+ state: z.ZodArray<z.ZodObject<{
257
+ key: z.ZodString;
258
+ value: z.ZodUnknown;
259
+ }, z.core.$strict>>;
260
+ }, z.core.$strict>], "role">;
261
+ export type ConnectorCallRequest = z.infer<typeof connectorCallRequest>;
262
+ /**
263
+ * The vertical's answer. On `ok: false` no state write is applied; `refused` says the connector
264
+ * threw `ConnectorRefusal` (terminal) rather than failing in a way worth retrying.
265
+ */
266
+ export declare const connectorCallResponse: z.ZodDiscriminatedUnion<[z.ZodObject<{
267
+ ok: z.ZodLiteral<true>;
268
+ result: z.ZodUnknown;
269
+ state: z.ZodArray<z.ZodObject<{
270
+ key: z.ZodString;
271
+ value: z.ZodUnknown;
272
+ }, z.core.$strict>>;
273
+ uses: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
274
+ durationMs: z.ZodOptional<z.ZodNumber>;
275
+ status: z.ZodOptional<z.ZodNumber>;
276
+ timedOut: z.ZodOptional<z.ZodBoolean>;
277
+ ok: z.ZodLiteral<true>;
278
+ }, z.core.$strict>, z.ZodObject<{
279
+ durationMs: z.ZodOptional<z.ZodNumber>;
280
+ status: z.ZodOptional<z.ZodNumber>;
281
+ timedOut: z.ZodOptional<z.ZodBoolean>;
282
+ ok: z.ZodLiteral<false>;
283
+ error: z.ZodString;
284
+ }, z.core.$strict>], "ok">>;
285
+ }, z.core.$strict>, z.ZodObject<{
286
+ ok: z.ZodLiteral<false>;
287
+ refused: z.ZodBoolean;
288
+ error: z.ZodString;
289
+ uses: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
290
+ durationMs: z.ZodOptional<z.ZodNumber>;
291
+ status: z.ZodOptional<z.ZodNumber>;
292
+ timedOut: z.ZodOptional<z.ZodBoolean>;
293
+ ok: z.ZodLiteral<true>;
294
+ }, z.core.$strict>, z.ZodObject<{
295
+ durationMs: z.ZodOptional<z.ZodNumber>;
296
+ status: z.ZodOptional<z.ZodNumber>;
297
+ timedOut: z.ZodOptional<z.ZodBoolean>;
298
+ ok: z.ZodLiteral<false>;
299
+ error: z.ZodString;
300
+ }, z.core.$strict>], "ok">>;
301
+ }, z.core.$strict>], "ok">;
302
+ export type ConnectorCallResponse = z.infer<typeof connectorCallResponse>;
303
+ /** `result` of a `sweep` call. A `probe` or `probe-candidate` call answers `connectionProbe`. */
304
+ export declare const connectorSweepResult: z.ZodObject<{
305
+ landed: z.ZodNumber;
306
+ more: z.ZodBoolean;
307
+ }, z.core.$strip>;
308
+ export type ConnectorSweepResult = z.infer<typeof connectorSweepResult>;
309
+ /** `result` of a `bind` call: the options normalised, which the platform stores on the binding. */
310
+ export declare const connectorBindResult: z.ZodObject<{
311
+ options: z.ZodRecord<z.ZodString, z.ZodUnknown>;
312
+ }, z.core.$strip>;
313
+ export type ConnectorBindResult = z.infer<typeof connectorBindResult>;
314
+ //# sourceMappingURL=vertical-connector.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vertical-connector.d.ts","sourceRoot":"","sources":["../src/vertical-connector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB;;;;;;;;;GASG;AAEH,yFAAyF;AACzF,wBAAgB,2BAA2B,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAErE;AAED,eAAO,MAAM,yBAAyB,aAGrC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,sBAAsB;;;;;;kBAQxB,CAAC;AACZ,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAE5E;;;;;;;GAOG;AACH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;kBA+BrC,CAAC;AACL,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAExF,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;mBAStC,CAAC;AAEL,2FAA2F;AAC3F,eAAO,MAAM,mBAAmB,6BAA6B,CAAC;AAC9D,yGAAyG;AACzG,eAAO,MAAM,oBAAoB,8BAA8B,CAAC;AAChE,qDAAqD;AACrD,eAAO,MAAM,8BAA8B,QAAa,CAAC;AACzD,8CAA8C;AAC9C,eAAO,MAAM,6BAA6B,OAAO,CAAC;AAClD,yCAAyC;AACzC,eAAO,MAAM,uBAAuB,MAAM,CAAC;AAE3C,iFAAiF;AACjF,eAAO,MAAM,iCAAiC,gBAAgB,CAAC;AAC/D,8EAA8E;AAC9E,eAAO,MAAM,+BAA+B,cAAc,CAAC;AAE3D,wBAAgB,2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,OAAO,oBAAoB,CAAC,CAAC;AAIxE;;;GAGG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0BAGhC,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAE1E,iGAAiG;AACjG,eAAO,MAAM,oBAAoB;;;iBAA0E,CAAC;AAC5G,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAExE,mGAAmG;AACnG,eAAO,MAAM,mBAAmB;;iBAA2D,CAAC;AAC5F,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
@@ -0,0 +1,221 @@
1
+ import { z } from 'zod';
2
+ import { instant, permissionKey, scopeId, tenantId } from './ids.js';
3
+ import { connectionId, connectionProvider } from './connections.js';
4
+ import { connectionLandingOptions } from './connection-landing.js';
5
+ import { domainEvent, eventType } from './events.js';
6
+ /**
7
+ * Vertical-defined connectors (docs/architecture/vertical-connectors.md): the vocabulary a
8
+ * vertical's connector declaration, the platform's call into the vertical's worker, and the
9
+ * vertical's answer share.
10
+ *
11
+ * The platform keeps every piece of state and authority it holds for a first-party connector —
12
+ * the sealed credential, the bindings, the connector state — and hands the vertical's code one
13
+ * connection's worth of it per call (§6). Everything that crosses that call is parsed by these
14
+ * schemas on both ends.
15
+ */
16
+ /** A dot marks a vertical-defined provider (§4); first-party slugs never contain one. */
17
+ export function isVerticalConnectorProvider(provider) {
18
+ return provider.includes('.');
19
+ }
20
+ export const verticalConnectorProvider = connectionProvider.refine(isVerticalConnectorProvider, 'a vertical-defined provider is <namespace>.<name>');
21
+ /**
22
+ * One field of the credential form the dashboard renders for a vertical-defined provider — the
23
+ * dashboard's own `ProviderField`, minus `toggle`. Every field is stored sealed regardless of
24
+ * `secret`, which only decides whether the UI echoes it back.
25
+ */
26
+ export const verticalConnectorField = z
27
+ .object({
28
+ key: z.string().max(64).regex(/^[a-zA-Z][a-zA-Z0-9_]*$/, 'a field key is an identifier'),
29
+ label: z.string().min(1).max(80),
30
+ secret: z.boolean(),
31
+ placeholder: z.string().max(120).optional(),
32
+ optional: z.literal(true).optional(),
33
+ })
34
+ .strict();
35
+ /**
36
+ * The static half of one `defineConnectors` entry (§5.1), as the push manifest carries it.
37
+ *
38
+ * `sweeps`, `binds` and `dispatches` say which optional hooks the code supplies. The probes are
39
+ * mandatory, so they carry no flag. `dispatches` is true exactly when `events` routes something:
40
+ * a routed event with no handler would fail every delivery, and a handler nothing routes to is
41
+ * dead code the declaration should not advertise.
42
+ */
43
+ export const verticalConnectorDeclaration = z
44
+ .object({
45
+ provider: verticalConnectorProvider,
46
+ label: z.string().min(1).max(80),
47
+ description: z.string().max(400),
48
+ monogram: z.string().min(1).max(3).optional(),
49
+ fields: z
50
+ .array(verticalConnectorField)
51
+ .min(1)
52
+ .max(12)
53
+ .refine((fs) => new Set(fs.map((f) => f.key)).size === fs.length, { message: 'field keys must be unique' }),
54
+ /** The connection's standing grants. Required, so a declaration states "none" as `[]`. */
55
+ grants: z.array(permissionKey).max(16),
56
+ /** The event types routed to `dispatch()`. Required for the same reason. */
57
+ events: z
58
+ .array(eventType)
59
+ .max(8)
60
+ .refine((es) => new Set(es).size === es.length, { message: 'routed event types must be unique' }),
61
+ sweeps: z.boolean(),
62
+ binds: z.boolean(),
63
+ dispatches: z.boolean(),
64
+ })
65
+ .strict()
66
+ .superRefine((d, ctx) => {
67
+ if (d.dispatches !== d.events.length > 0) {
68
+ ctx.addIssue({
69
+ code: 'custom',
70
+ path: ['dispatches'],
71
+ message: d.dispatches ? 'dispatches is true but no event is routed to it' : 'events are routed but dispatches is false',
72
+ });
73
+ }
74
+ });
75
+ export const verticalConnectorDeclarations = z
76
+ .array(verticalConnectorDeclaration)
77
+ .max(8)
78
+ .superRefine((ds, ctx) => {
79
+ const seen = new Set();
80
+ for (const [i, d] of ds.entries()) {
81
+ if (seen.has(d.provider))
82
+ ctx.addIssue({ code: 'custom', path: [i, 'provider'], message: `provider ${d.provider} is declared more than once` });
83
+ seen.add(d.provider);
84
+ }
85
+ });
86
+ /** The platform-surface route the platform calls a vertical's connector through (§6.3). */
87
+ export const CONNECTOR_CALL_PATH = '/internal/connector-call';
88
+ /** The route the connection-level roles (`probe`, `probe-candidate`) take: no scope, no nonce (§6.3). */
89
+ export const CONNECTOR_PROBE_PATH = '/internal/connector-probe';
90
+ /** State per call, serialised, in and out (§6.2). */
91
+ export const CONNECTOR_CALL_STATE_MAX_BYTES = 512 * 1024;
92
+ /** State keys per call, in and out (§6.2). */
93
+ export const CONNECTOR_CALL_STATE_MAX_KEYS = 2000;
94
+ /** Recorded uses one call may report. */
95
+ export const CONNECTOR_CALL_MAX_USES = 100;
96
+ /** The connector-state key the platform keeps a scope's binding under (§6.1). */
97
+ export const VERTICAL_CONNECTOR_BINDING_PREFIX = 'vc:binding:';
98
+ /** The connector-state prefix the vertical's own state lives under (§6.2). */
99
+ export const VERTICAL_CONNECTOR_STATE_PREFIX = 'vc:state:';
100
+ export function verticalConnectorBindingKey(scopeId) {
101
+ return `${VERTICAL_CONNECTOR_BINDING_PREFIX}${scopeId}`;
102
+ }
103
+ /** `vc:state:-:` for connection-level state, `vc:state:<scopeId>:` for one scope's. */
104
+ export function verticalConnectorStatePrefix(scopeId) {
105
+ return `${VERTICAL_CONNECTOR_STATE_PREFIX}${scopeId ?? '-'}:`;
106
+ }
107
+ export function verticalConnectorStateKey(scopeId, key) {
108
+ return `${verticalConnectorStatePrefix(scopeId)}${key}`;
109
+ }
110
+ const stateEntries = (what) => z
111
+ .array(z.object({ key: z.string().min(1).max(200), value: z.unknown() }).strict())
112
+ .max(CONNECTOR_CALL_STATE_MAX_KEYS, { message: `${what} carries at most ${CONNECTOR_CALL_STATE_MAX_KEYS} keys` })
113
+ .superRefine((entries, ctx) => {
114
+ if (new Set(entries.map((e) => e.key)).size !== entries.length)
115
+ ctx.addIssue({ code: 'custom', message: `${what} names a key twice` });
116
+ const bytes = new TextEncoder().encode(JSON.stringify(entries)).byteLength;
117
+ if (bytes > CONNECTOR_CALL_STATE_MAX_BYTES) {
118
+ ctx.addIssue({ code: 'custom', message: `${what} is ${bytes} bytes serialised; at most ${CONNECTOR_CALL_STATE_MAX_BYTES}` });
119
+ }
120
+ });
121
+ /** The connector's state as a call carries it in: the keys, without their storage prefix. */
122
+ export const connectorCallState = stateEntries('connector state');
123
+ /** The connector's state writes as a call carries them out. A `null` value deletes the key. */
124
+ export const connectorCallStateWrites = stateEntries('connector state writes');
125
+ const useTiming = {
126
+ durationMs: z.number().nonnegative().optional(),
127
+ status: z.number().int().optional(),
128
+ timedOut: z.boolean().optional(),
129
+ };
130
+ /** One recorded use of the connection — the kernel's `ConnectionUseOutcome`, on the wire. */
131
+ export const connectionUseOutcome = z.discriminatedUnion('ok', [
132
+ z.object({ ok: z.literal(true), ...useTiming }).strict(),
133
+ z.object({ ok: z.literal(false), error: z.string().max(600), ...useTiming }).strict(),
134
+ ]);
135
+ /** A binding the platform holds for a vertical-defined connection (§6.1), at `vc:binding:<scopeId>`. */
136
+ export const verticalConnectorBinding = z
137
+ .object({
138
+ scopeId,
139
+ operation: z.string().regex(/^[a-zA-Z0-9_-]+\/[a-zA-Z0-9_-]+$/, 'operation is `module/operation`'),
140
+ permission: permissionKey,
141
+ /** The options the connector sees: what its `bind` hook normalised them to. */
142
+ options: connectionLandingOptions,
143
+ /**
144
+ * The options as the landing or the binding door supplied them, before `bind` normalised
145
+ * them. What a declaration is compared with, so a hook that rewrites an option (a folder path
146
+ * to its id) does not read as a changed declaration and re-bind on every pass.
147
+ */
148
+ declared: connectionLandingOptions,
149
+ boundAt: instant,
150
+ })
151
+ .strict();
152
+ /** The connection a call is made for, with its opened credential. Never anything else's. */
153
+ export const connectorCallConnection = z
154
+ .object({
155
+ id: connectionId,
156
+ tenantId,
157
+ vertical: z.string().min(1),
158
+ provider: verticalConnectorProvider,
159
+ externalAccountRef: z.string().nullable(),
160
+ expiresAt: instant.nullable(),
161
+ secret: z.record(z.string(), z.string()),
162
+ })
163
+ .strict();
164
+ /** The platform's call into a vertical's worker (§6.3), one per role. */
165
+ export const connectorCallRequest = z
166
+ .discriminatedUnion('role', [
167
+ z
168
+ .object({ role: z.literal('probe-candidate'), provider: verticalConnectorProvider, secret: z.record(z.string(), z.string()) })
169
+ .strict(),
170
+ z
171
+ .object({ role: z.literal('probe'), provider: verticalConnectorProvider, connection: connectorCallConnection, state: connectorCallState })
172
+ .strict(),
173
+ z
174
+ .object({
175
+ role: z.literal('bind'),
176
+ provider: verticalConnectorProvider,
177
+ connection: connectorCallConnection,
178
+ scopeId,
179
+ options: z.record(z.string(), z.unknown()),
180
+ })
181
+ .strict(),
182
+ z
183
+ .object({
184
+ role: z.literal('sweep'),
185
+ provider: verticalConnectorProvider,
186
+ connection: connectorCallConnection,
187
+ binding: verticalConnectorBinding,
188
+ state: connectorCallState,
189
+ })
190
+ .strict(),
191
+ z
192
+ .object({
193
+ role: z.literal('dispatch'),
194
+ provider: verticalConnectorProvider,
195
+ connection: connectorCallConnection,
196
+ scopeId,
197
+ binding: verticalConnectorBinding.nullable(),
198
+ event: domainEvent,
199
+ state: connectorCallState,
200
+ })
201
+ .strict(),
202
+ ])
203
+ .superRefine((req, ctx) => {
204
+ if ('connection' in req && req.connection.provider !== req.provider) {
205
+ ctx.addIssue({ code: 'custom', path: ['connection', 'provider'], message: `the connection is for ${req.connection.provider}, not ${req.provider}` });
206
+ }
207
+ });
208
+ const uses = z.array(connectionUseOutcome).max(CONNECTOR_CALL_MAX_USES);
209
+ /**
210
+ * The vertical's answer. On `ok: false` no state write is applied; `refused` says the connector
211
+ * threw `ConnectorRefusal` (terminal) rather than failing in a way worth retrying.
212
+ */
213
+ export const connectorCallResponse = z.discriminatedUnion('ok', [
214
+ z.object({ ok: z.literal(true), result: z.unknown(), state: connectorCallStateWrites, uses }).strict(),
215
+ z.object({ ok: z.literal(false), refused: z.boolean(), error: z.string().min(1).max(600), uses }).strict(),
216
+ ]);
217
+ /** `result` of a `sweep` call. A `probe` or `probe-candidate` call answers `connectionProbe`. */
218
+ export const connectorSweepResult = z.object({ landed: z.number().int().nonnegative(), more: z.boolean() });
219
+ /** `result` of a `bind` call: the options normalised, which the platform stores on the binding. */
220
+ export const connectorBindResult = z.object({ options: z.record(z.string(), z.unknown()) });
221
+ //# sourceMappingURL=vertical-connector.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vertical-connector.js","sourceRoot":"","sources":["../src/vertical-connector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAErD;;;;;;;;;GASG;AAEH,yFAAyF;AACzF,MAAM,UAAU,2BAA2B,CAAC,QAAgB;IAC1D,OAAO,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;AAChC,CAAC;AAED,MAAM,CAAC,MAAM,yBAAyB,GAAG,kBAAkB,CAAC,MAAM,CAChE,2BAA2B,EAC3B,mDAAmD,CACpD,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC;KACpC,MAAM,CAAC;IACN,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,yBAAyB,EAAE,8BAA8B,CAAC;IACxF,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EA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AG,EAAE,CAAC,WAAW,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;AAG5G,mGAAmG;AACnG,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC"}
@@ -308,15 +308,15 @@ export interface WireEndpoint {
308
308
  /**
309
309
  * Which envelope a deployment's endpoint accepts (RFC §3.4, check 3), by the request's path. The
310
310
  * internal surface vertical-host's `mountPlatformSurface` gates (`/internal/*`) takes calls from
311
- * the control plane, and its peer invocation (`/internal/vertical-invoke`) from the router too,
312
- * which makes those calls. Every other path is a routed request. A verifier judges by this, and a
311
+ * the control plane, and its peer invocation and connector calls ({@link ROUTER_CALLS}) from the
312
+ * router too, which makes those calls. Every other path is a routed request. A verifier judges by this, and a
313
313
  * signer signs what it says.
314
314
  *
315
315
  * The surface is matched on the path its router decodes (Hono's `getPath`: `decodeURI`, with `%25`
316
316
  * kept escaped), so the path is judged in every form a router could read it: as sent, decoded that
317
317
  * way, decoded fully, each with empty and dot segments collapsed, in any letter case. Any form under
318
- * `/internal` makes it a call: the stricter reading wins. Only the exact path the router sends a peer
319
- * invocation to admits the router.
318
+ * `/internal` makes it a call: the stricter reading wins. Only the exact paths the router sends its
319
+ * own calls to admit the router.
320
320
  */
321
321
  export declare function wireEndpoint(pathname: string): WireEndpoint;
322
322
  /**
@@ -341,10 +341,12 @@ export declare const WIRE_OUTCOMES: readonly ['signed-accepted', 'legacy-accepte
341
341
  export type WireOutcome = (typeof WIRE_OUTCOMES)[number];
342
342
  /**
343
343
  * Which of the deployment's own faults a `fault` was: its key lists could not be loaded, it has
344
- * no nonce store for a call that needs one, its nonce store threw or did not answer in time, or
345
- * the verifier threw for any other reason.
344
+ * no nonce store for a call that needs one, its nonce store threw or did not answer in time (or
345
+ * was at its cap), the verifier threw for any other reason, or a call that keeps nonces named no
346
+ * scope to spend one in (`unscoped`, RFC §4: no store can hold its nonce, whatever the version).
347
+ * Append only: a reader that meets a kind it does not know counts it as a fault all the same.
346
348
  */
347
- export declare const WIRE_FAULTS: readonly ['keys', 'no-nonce-store', 'nonce-store', 'verifier'];
349
+ export declare const WIRE_FAULTS: readonly ['keys', 'no-nonce-store', 'nonce-store', 'verifier', 'unscoped'];
348
350
  export type WireFault = (typeof WIRE_FAULTS)[number];
349
351
  /** The legacy credential beside the envelope: present and valid, present and not, or not sent. */
350
352
  export type WireLegacyCredential = 'valid' | 'invalid' | 'absent';
@@ -1 +1 @@
1
- {"version":3,"file":"wire-signing.d.ts","sourceRoot":"","sources":["../src/wire-signing.ts"],"names":[],"mappings":"AAiDA,OAAO,EAQL,KAAK,oBAAoB,EAC1B,MAAM,2BAA2B,CAAC;AAEnC,eAAO,MAAM,qBAAqB,IAAI,CAAC;AACvC,2EAA2E;AAC3E,eAAO,MAAM,iBAAiB,mBAAoD,CAAC;AACnF,oEAAoE;AACpE,eAAO,MAAM,oBAAoB,6BAA6B,CAAC;AAC/D,2DAA2D;AAC3D,eAAO,MAAM,qBAAqB,8BAA8B,CAAC;AACjE,6EAA6E;AAC7E,eAAO,MAAM,8BAA8B,KAAK,CAAC;AACjD,sEAAsE;AACtE,eAAO,MAAM,kCAAkC,MAAM,CAAC;AACtD,2FAA2F;AAC3F,eAAO,MAAM,uBAAuB,KAAK,CAAC;AAE1C,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,UAAU,CAAC;AAC/C,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;AAExC,8FAA8F;AAC9F,MAAM,MAAM,iBAAiB,GAAG,UAAU,GAAG,UAAU,GAAG,QAAQ,CAAC;AAEnE,MAAM,WAAW,iBAAiB;IAChC,iEAAiE;IACjE,QAAQ,CAAC,KAAK,EAAE,iBAAiB,CAAC;IAClC,QAAQ,CAAC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