@substrat-run/vertical-host 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,86 @@
1
+ /**
2
+ * Vertical-defined connectors (docs/architecture/vertical-connectors.md §5, §6): the value a
3
+ * vertical defines its connectors with, and the platform's call into them.
4
+ *
5
+ * `defineConnectors` is read twice. `substrat push` imports it for the static half
6
+ * (`declarations()`, plain data, because the CLI cannot import this package), and the worker
7
+ * mounts it on `mountPlatformSurface`, whose `/internal/connector-call` route hands each call to
8
+ * {@link runConnectorCall}. That call is one connection's worth of the platform: the opened
9
+ * credential, the connector's state carried in the request, and a door back into the scope that
10
+ * invokes as the connection principal and nothing else. State writes leave in the response and
11
+ * the platform applies them only when the call succeeded.
12
+ */
13
+ import { connectionProbe, type ConnectorCallRequest, type ConnectorCallResponse, type DomainEvent, type VerticalConnectorDeclaration, type VerticalConnectorField, type z } from '@substrat-run/contracts';
14
+ import { type ConnectionContext, type ConnectorOptions, type FetchLike, type ScopeHost, type ScopedConnectionContext } from '@substrat-run/kernel';
15
+ import type { VerticalScopeHost } from './index.js';
16
+ type ProbeNullables = 'accountRef' | 'accountLabel' | 'error';
17
+ /** What a probe answers: `{ ok: true }` alone is enough; the three nullables default to null. */
18
+ export type ConnectionProbeInput = Omit<z.input<typeof connectionProbe>, ProbeNullables> & Partial<Pick<z.input<typeof connectionProbe>, ProbeNullables>>;
19
+ export type ConnectorCallRole = ConnectorCallRequest['role'];
20
+ /** One connector a vertical defines (§5.1): its declaration and its code, in one value. */
21
+ export interface ConnectorDefinition {
22
+ label: string;
23
+ description: string;
24
+ monogram?: string;
25
+ fields: VerticalConnectorField[];
26
+ /** The connection's standing grants. */
27
+ grants?: string[];
28
+ /** The event types routed to `dispatch()`. */
29
+ events?: string[];
30
+ /** Before the credential is stored: does it work, and for whom? */
31
+ probeCandidate(secret: Readonly<Record<string, string>>, io: {
32
+ fetch: FetchLike;
33
+ }): Promise<ConnectionProbeInput>;
34
+ /** The live connection. */
35
+ probe(ctx: ConnectionContext): Promise<ConnectionProbeInput>;
36
+ /** Validate and normalise a binding's options before the platform stores them. */
37
+ bind?(ctx: ScopedConnectionContext, options: Record<string, unknown>): Promise<Record<string, unknown>>;
38
+ /** The poll floor, once per bound scope. */
39
+ sweep?(ctx: ScopedConnectionContext): Promise<{
40
+ landed?: number;
41
+ more?: boolean;
42
+ } | void>;
43
+ /** One routed event. */
44
+ dispatch?(ctx: ScopedConnectionContext, event: DomainEvent): Promise<void>;
45
+ }
46
+ /** `Symbol.for`, so a second copy of this package in one bundle still recognises the value. */
47
+ declare const BRAND: unique symbol;
48
+ export interface VerticalConnectors {
49
+ readonly [BRAND]: true;
50
+ readonly providers: readonly string[];
51
+ /** The static half the push manifest carries, validated. Plain data. */
52
+ declarations(): VerticalConnectorDeclaration[];
53
+ definition(provider: string): ConnectorDefinition | undefined;
54
+ }
55
+ export declare function isVerticalConnectors(value: unknown): value is VerticalConnectors;
56
+ export declare function defineConnectors(defs: Record<string, ConnectorDefinition>): VerticalConnectors;
57
+ /**
58
+ * Register every routed event of every connector on `host`, for ROUTING ONLY — the CP-less
59
+ * host never runs the handler. The registration is what tells the drain an event is a
60
+ * connector delivery: it becomes a `connector:<provider>` platform intent, and the platform,
61
+ * which holds the credential, dispatches it back through `/internal/connector-call`. The
62
+ * same pattern as `declareScriveConnector` (`connectors/scrive`).
63
+ */
64
+ export declare function declareConnectorEvents(host: Pick<ScopeHost, 'registerConnector'>, connectors: VerticalConnectors, options?: {
65
+ retry?: ConnectorOptions;
66
+ }): void;
67
+ export interface ConnectorCallDeps {
68
+ connectors: VerticalConnectors;
69
+ host: Pick<VerticalScopeHost, 'connectorInvokeLocal' | 'connectorAttachmentUploadLocal' | 'connectorAttachmentOpenLocal'>;
70
+ /** The runtime's fetch (`globalFetch`), which the context bounds and records. */
71
+ fetch: FetchLike;
72
+ /** Per outbound request. Default 30 s, a connector call's usual bound. */
73
+ timeoutMs?: number;
74
+ /** The roles this route serves, and the path named when another is refused. Default: all. */
75
+ allowed?: {
76
+ roles: readonly ConnectorCallRole[];
77
+ path: string;
78
+ };
79
+ }
80
+ /**
81
+ * Serve one platform call into a vertical-defined connector (§6.3). Never throws: every failure
82
+ * is an `ok: false` answer, and only a success carries state writes.
83
+ */
84
+ export declare function runConnectorCall(request: unknown, deps: ConnectorCallDeps): Promise<ConnectorCallResponse>;
85
+ export {};
86
+ //# sourceMappingURL=connectors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connectors.d.ts","sourceRoot":"","sources":["../src/connectors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAEL,eAAe,EASf,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,WAAW,EAChB,KAAK,4BAA4B,EACjC,KAAK,sBAAsB,EAC3B,KAAK,CAAC,EACP,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAKL,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,SAAS,EAEd,KAAK,SAAS,EACd,KAAK,uBAAuB,EAC7B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAGpD,KAAK,cAAc,GAAG,YAAY,GAAG,cAAc,GAAG,OAAO,CAAC;AAC9D,iGAAiG;AACjG,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,EAAE,cAAc,CAAC,GACtF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,EAAE,cAAc,CAAC,CAAC,CAAC;AAKjE,MAAM,MAAM,iBAAiB,GAAG,oBAAoB,CAAC,MAAM,CAAC,CAAC;AAE7D,2FAA2F;AAC3F,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAA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AQ,EAAE,MAAM,GAAG,mBAAmB,GAAG,SAAS,CAAC;CAC/D;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,kBAAkB,CAEhF;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,GAAG,kBAAkB,CAsC9F;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,IAAI,CAAC,SAAS,EAAE,mBAAmB,CAAC,EAC1C,UAAU,EAAE,kBAAkB,EAC9B,OAAO,GAAE;IAAE,KAAK,CAAC,EAAE,gBAAgB,CAAA;CAAO,GACzC,IAAI,CAaN;AAED,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,kBAAkB,CAAC;IAC/B,IAAI,EAAE,IAAI,CAAC,iBAAiB,EAAE,sBAAsB,GAAG,gCAAgC,GAAG,8BAA8B,CAAC,CAAC;IAC1H,iFAAiF;IACjF,KAAK,EAAE,SAAS,CAAC;IACjB,0EAA0E;IAC1E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6FAA6F;IAC7F,OAAO,CAAC,EAAE;QAAE,KAAK,EAAE,SAAS,iBAAiB,EAAE,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;CACjE;AASD;;;GAGG;AACH,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CA+ChH"}
@@ -0,0 +1,202 @@
1
+ /**
2
+ * Vertical-defined connectors (docs/architecture/vertical-connectors.md §5, §6): the value a
3
+ * vertical defines its connectors with, and the platform's call into them.
4
+ *
5
+ * `defineConnectors` is read twice. `substrat push` imports it for the static half
6
+ * (`declarations()`, plain data, because the CLI cannot import this package), and the worker
7
+ * mounts it on `mountPlatformSurface`, whose `/internal/connector-call` route hands each call to
8
+ * {@link runConnectorCall}. That call is one connection's worth of the platform: the opened
9
+ * credential, the connector's state carried in the request, and a door back into the scope that
10
+ * invokes as the connection principal and nothing else. State writes leave in the response and
11
+ * the platform applies them only when the call succeeded.
12
+ */
13
+ import { attachmentRecord, connectionProbe, connectorBindResult, connectorCallRequest, connectorCallResponse, connectorSweepResult, verticalConnectorDeclarations, verticalConnectorProvider, CONNECTOR_CALL_MAX_USES, } from '@substrat-run/contracts';
14
+ import { ConnectorRefusal, deadlineFetch, isConnectorRefusal, settleConnectionUse, } from '@substrat-run/kernel';
15
+ import { externalInput } from './wire.js';
16
+ const probeAnswer = (result) => connectionProbe.parse({ accountRef: null, accountLabel: null, error: null, ...result });
17
+ /** `Symbol.for`, so a second copy of this package in one bundle still recognises the value. */
18
+ const BRAND = Symbol.for('@substrat-run/vertical-host/connectors');
19
+ export function isVerticalConnectors(value) {
20
+ return typeof value === 'object' && value !== null && value[BRAND] === true;
21
+ }
22
+ export function defineConnectors(defs) {
23
+ for (const [provider, def] of Object.entries(defs)) {
24
+ if (!verticalConnectorProvider.safeParse(provider).success) {
25
+ throw new Error(`defineConnectors: '${provider}' is not a vertical-defined provider — name it <namespace>.<name>, e.g. 'acme.docbox'`);
26
+ }
27
+ if (typeof def.probeCandidate !== 'function' || typeof def.probe !== 'function') {
28
+ throw new Error(`defineConnectors: ${provider} must define probeCandidate and probe — a connection a tenant cannot test is a door that 501s`);
29
+ }
30
+ const routed = (def.events ?? []).length > 0;
31
+ if (routed && !def.dispatch) {
32
+ throw new Error(`defineConnectors: ${provider} routes events (${def.events.join(', ')}) but defines no dispatch`);
33
+ }
34
+ if (!routed && def.dispatch) {
35
+ throw new Error(`defineConnectors: ${provider} defines dispatch but routes no events to it`);
36
+ }
37
+ }
38
+ const table = new Map(Object.entries(defs));
39
+ return {
40
+ [BRAND]: true,
41
+ providers: Object.freeze([...table.keys()]),
42
+ declarations() {
43
+ return verticalConnectorDeclarations.parse([...table].map(([provider, d]) => ({
44
+ provider,
45
+ label: d.label,
46
+ description: d.description,
47
+ ...(d.monogram !== undefined ? { monogram: d.monogram } : {}),
48
+ fields: d.fields,
49
+ grants: d.grants ?? [],
50
+ events: d.events ?? [],
51
+ sweeps: typeof d.sweep === 'function',
52
+ binds: typeof d.bind === 'function',
53
+ dispatches: typeof d.dispatch === 'function',
54
+ })));
55
+ },
56
+ definition: (provider) => table.get(provider),
57
+ };
58
+ }
59
+ /**
60
+ * Register every routed event of every connector on `host`, for ROUTING ONLY — the CP-less
61
+ * host never runs the handler. The registration is what tells the drain an event is a
62
+ * connector delivery: it becomes a `connector:<provider>` platform intent, and the platform,
63
+ * which holds the credential, dispatches it back through `/internal/connector-call`. The
64
+ * same pattern as `declareScriveConnector` (`connectors/scrive`).
65
+ */
66
+ export function declareConnectorEvents(host, connectors, options = {}) {
67
+ for (const provider of connectors.providers) {
68
+ for (const eventType of connectors.definition(provider)?.events ?? []) {
69
+ host.registerConnector(`${provider}:${eventType}`, eventType, async () => {
70
+ throw new Error(`${provider}: this host registered the connector for routing only — the platform dispatches it`);
71
+ }, { ...options.retry, provider });
72
+ }
73
+ }
74
+ }
75
+ const ERROR_MAX = 600;
76
+ function errorText(e) {
77
+ const raw = e instanceof Error ? e.message : typeof e?.message === 'string' ? e.message : String(e);
78
+ return raw.slice(0, ERROR_MAX) || 'the connector call failed';
79
+ }
80
+ /**
81
+ * Serve one platform call into a vertical-defined connector (§6.3). Never throws: every failure
82
+ * is an `ok: false` answer, and only a success carries state writes.
83
+ */
84
+ export async function runConnectorCall(request, deps) {
85
+ const parsed = connectorCallRequest.safeParse(request);
86
+ if (!parsed.success) {
87
+ const issue = parsed.error.issues[0];
88
+ return { ok: false, refused: true, error: errorText(`not a connector call: ${issue?.path.join('.') ?? ''} ${issue?.message ?? ''}`.trim()), uses: [] };
89
+ }
90
+ const req = parsed.data;
91
+ if (deps.allowed && !deps.allowed.roles.includes(req.role)) {
92
+ return { ok: false, refused: true, error: `${req.role} is not served on ${deps.allowed.path}`, uses: [] };
93
+ }
94
+ const def = deps.connectors.definition(req.provider);
95
+ if (!def)
96
+ return { ok: false, refused: true, error: `this version declares no connector ${req.provider}`, uses: [] };
97
+ const uses = [];
98
+ const record = (u) => {
99
+ uses.push(u.ok ? u : { ...u, error: u.error.slice(0, ERROR_MAX) });
100
+ if (uses.length > CONNECTOR_CALL_MAX_USES)
101
+ uses.shift();
102
+ };
103
+ const bounded = deadlineFetch(deps.fetch, deps.timeoutMs ?? 30_000);
104
+ const fetch = async (input, init) => {
105
+ const started = Date.now();
106
+ try {
107
+ const response = await bounded(input, init);
108
+ record(settleConnectionUse(req.provider, Math.max(0, Date.now() - started), { response }));
109
+ return response;
110
+ }
111
+ catch (error) {
112
+ record(settleConnectionUse(req.provider, Math.max(0, Date.now() - started), { error }));
113
+ throw error;
114
+ }
115
+ };
116
+ const store = new Map('state' in req ? req.state.map((e) => [e.key, e.value]) : []);
117
+ const writes = new Map();
118
+ try {
119
+ const result = await runRole(req, def, deps, fetch, store, writes);
120
+ const answer = connectorCallResponse.safeParse({
121
+ ok: true,
122
+ result,
123
+ state: [...writes].map(([key, value]) => ({ key, value })),
124
+ uses,
125
+ });
126
+ if (answer.success)
127
+ return answer.data;
128
+ return { ok: false, refused: false, error: errorText(`connector state writes exceed the call's limits: ${answer.error.issues[0]?.message ?? ''}`), uses };
129
+ }
130
+ catch (e) {
131
+ return { ok: false, refused: isConnectorRefusal(e), error: errorText(e), uses };
132
+ }
133
+ }
134
+ async function runRole(req, def, deps, fetch, store, writes) {
135
+ if (req.role === 'probe-candidate')
136
+ return probeAnswer(await def.probeCandidate(req.secret, { fetch }));
137
+ const { secret, ...connection } = req.connection;
138
+ const base = {
139
+ connection,
140
+ secret,
141
+ fetch,
142
+ state: {
143
+ get: async (key) => store.get(key),
144
+ put: async (key, value) => {
145
+ if (value === null || value === undefined) {
146
+ store.delete(key);
147
+ writes.set(key, null);
148
+ }
149
+ else {
150
+ store.set(key, value);
151
+ writes.set(key, value);
152
+ }
153
+ },
154
+ list: async (prefix = '') => [...store].filter(([k]) => k.startsWith(prefix)).map(([key, value]) => ({ key, value })),
155
+ },
156
+ };
157
+ if (req.role === 'probe')
158
+ return probeAnswer(await def.probe(base));
159
+ const scopeId = req.role === 'sweep' ? req.binding.scopeId : req.scopeId;
160
+ const binding = req.role === 'bind' ? null : req.binding;
161
+ const eventId = req.role === 'dispatch' ? req.event.id : undefined;
162
+ const { id, tenantId } = connection;
163
+ const invoke = async (operation, input) => (await deps.host.connectorInvokeLocal(id, tenantId, scopeId, operation, externalInput(input)));
164
+ const operation = binding?.operation ?? null;
165
+ const ctx = {
166
+ ...base,
167
+ scope: { tenantId, scopeId, operation, options: binding?.options ?? (req.role === 'bind' ? req.options : {}) },
168
+ land: async (input) => {
169
+ if (operation === null)
170
+ throw new ConnectorRefusal(`${req.provider}: scope ${scopeId} has no binding, so there is no landing operation`);
171
+ return invoke(operation, input);
172
+ },
173
+ invoke,
174
+ attachments: {
175
+ upload: async (input) => attachmentRecord.parse(await deps.host.connectorAttachmentUploadLocal(id, tenantId, scopeId, input)),
176
+ open: async (attachmentId) => {
177
+ const opened = await deps.host.connectorAttachmentOpenLocal(id, tenantId, scopeId, attachmentId, eventId);
178
+ return opened && { ...opened, record: attachmentRecord.parse(opened.record) };
179
+ },
180
+ },
181
+ };
182
+ switch (req.role) {
183
+ case 'bind':
184
+ if (def.bind)
185
+ return connectorBindResult.parse({ options: await def.bind(ctx, req.options) });
186
+ if (Object.keys(req.options).length > 0)
187
+ throw new ConnectorRefusal(`${req.provider}: this connector takes no binding options`);
188
+ return { options: {} };
189
+ case 'sweep': {
190
+ if (!def.sweep)
191
+ throw new ConnectorRefusal(`${req.provider}: this connector defines no sweep`);
192
+ const r = await def.sweep(ctx);
193
+ return connectorSweepResult.parse({ landed: r?.landed ?? 0, more: r?.more ?? false });
194
+ }
195
+ case 'dispatch':
196
+ if (!def.dispatch)
197
+ throw new ConnectorRefusal(`${req.provider}: this connector defines no dispatch`);
198
+ await def.dispatch(ctx, req.event);
199
+ return null;
200
+ }
201
+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;YAC/F,MAAM,CAAC,GAAG,MAAM,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YAC/B,OAAO,oBAAoB,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,IAAI,KAAK,EAAE,CAAC,CAAC;QACxF,CAAC;QACD,KAAK,UAAU;YACb,IAAI,CAAC,GAAG,CAAC,QAAQ;gBAAE,MAAM,IAAI,gBAAgB,CAAC,GAAG,GAAG,CAAC,QAAQ,sCAAsC,CAAC,CAAC;YACrG,MAAM,GAAG,CAAC,QAAQ,CAAC,GAAG,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC;YACnC,OAAO,IAAI,CAAC;IAChB,CAAC;AACH,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"docs-renderer.generated.d.ts","sourceRoot":"","sources":["../src/docs-renderer.generated.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,EAAE,MAA68+3I,CAAC"}
1
+ {"version":3,"file":"docs-renderer.generated.d.ts","sourceRoot":"","sources":["../src/docs-renderer.generated.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,EAAE,MAAy6jnJ,CAAC"}