@powerduck/openapi-request 0.2.2
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 +711 -0
- package/dist/credentials-Cl0G4KpE.d.cts +783 -0
- package/dist/credentials-rqEKODvf.d.ts +783 -0
- package/dist/index-1jRrFc3d.d.cts +215 -0
- package/dist/index-CsRXyS7O.d.ts +215 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.cts +350 -0
- package/dist/index.d.ts +350 -0
- package/dist/index.js +1 -0
- package/dist/protocol-D7sEx8IP.d.ts +62 -0
- package/dist/protocol-Dh-wN2nY.d.cts +62 -0
- package/dist/protocols/graphql/index.cjs +1 -0
- package/dist/protocols/graphql/index.d.cts +95 -0
- package/dist/protocols/graphql/index.d.ts +95 -0
- package/dist/protocols/graphql/index.js +1 -0
- package/dist/protocols/grpc/index.cjs +1 -0
- package/dist/protocols/grpc/index.d.cts +61 -0
- package/dist/protocols/grpc/index.d.ts +61 -0
- package/dist/protocols/grpc/index.js +1 -0
- package/dist/protocols/http/index.cjs +1 -0
- package/dist/protocols/http/index.d.cts +161 -0
- package/dist/protocols/http/index.d.ts +161 -0
- package/dist/protocols/http/index.js +1 -0
- package/dist/protocols/mcp/index.cjs +1 -0
- package/dist/protocols/mcp/index.d.cts +3 -0
- package/dist/protocols/mcp/index.d.ts +3 -0
- package/dist/protocols/mcp/index.js +1 -0
- package/dist/protocols/ws/index.cjs +1 -0
- package/dist/protocols/ws/index.d.cts +35 -0
- package/dist/protocols/ws/index.d.ts +35 -0
- package/dist/protocols/ws/index.js +1 -0
- package/dist/types-C9ifzKqk.d.cts +1226 -0
- package/dist/types-C9ifzKqk.d.ts +1226 -0
- package/package.json +93 -0
|
@@ -0,0 +1,1226 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cloneable: a JSON-safe projection of arbitrary runtime values.
|
|
3
|
+
*
|
|
4
|
+
* Events and session payloads cross process / renderer boundaries (Electron
|
|
5
|
+
* preload, worker threads), so they must be deep-copied into a shape that
|
|
6
|
+
* serializes cleanly. `toCloneable` handles the awkward cases — Date, URL,
|
|
7
|
+
* Error (with cause), Buffer, Uint8Array, functions, symbols and cycles — so
|
|
8
|
+
* the UI never receives live references into the library's internal state.
|
|
9
|
+
*/
|
|
10
|
+
type Cloneable = null | boolean | number | string | Cloneable[] | {
|
|
11
|
+
[key: string]: Cloneable;
|
|
12
|
+
};
|
|
13
|
+
interface CloneableError {
|
|
14
|
+
name: string;
|
|
15
|
+
message: string;
|
|
16
|
+
stack?: string;
|
|
17
|
+
cause?: Cloneable;
|
|
18
|
+
}
|
|
19
|
+
declare function toCloneable(value: unknown, seen?: WeakMap<object, Cloneable>): Cloneable;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* UnifiedSession: the single session contract shared by every connect-first
|
|
23
|
+
* protocol (WebSocket / MCP / gRPC).
|
|
24
|
+
*
|
|
25
|
+
* One state machine, one event DTO, one subscription API. Protocol sessions
|
|
26
|
+
* subclass this and keep their richer methods (callTool, listTools, kind, ...)
|
|
27
|
+
* on top, but the UI only ever has to render one event shape and drive one
|
|
28
|
+
* lifecycle. Event payloads are cloned with toCloneable so a listener can
|
|
29
|
+
* never mutate library state by poking at the object it received.
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
type SessionState = "idle" | "connecting" | "open" | "closing" | "closed" | "error";
|
|
33
|
+
/**
|
|
34
|
+
* Protocol-agnostic session event. `kind` is a short discriminator such as
|
|
35
|
+
* "open" | "message" | "error" | "close"; protocol detail lives in
|
|
36
|
+
* `data` / `meta` / `error`, already cloneable.
|
|
37
|
+
*/
|
|
38
|
+
interface SessionEventDTO {
|
|
39
|
+
protocol: string;
|
|
40
|
+
/** Transport label: "websocket" | "http" | "stdio" | "grpc". */
|
|
41
|
+
transport?: string;
|
|
42
|
+
sessionId: string;
|
|
43
|
+
direction: "in" | "out" | "meta";
|
|
44
|
+
kind: string;
|
|
45
|
+
at: number;
|
|
46
|
+
state?: SessionState;
|
|
47
|
+
data?: Cloneable;
|
|
48
|
+
error?: Cloneable;
|
|
49
|
+
meta?: Cloneable;
|
|
50
|
+
}
|
|
51
|
+
interface SessionSubscription {
|
|
52
|
+
unsubscribe(): void;
|
|
53
|
+
}
|
|
54
|
+
declare abstract class UnifiedSession {
|
|
55
|
+
readonly protocol: string;
|
|
56
|
+
readonly transport: string | undefined;
|
|
57
|
+
readonly sessionId: string;
|
|
58
|
+
readonly maxEvents: number;
|
|
59
|
+
state: SessionState;
|
|
60
|
+
readonly events: SessionEventDTO[];
|
|
61
|
+
protected readonly listeners: Set<(event: SessionEventDTO) => void>;
|
|
62
|
+
constructor(protocol: string, transport: string | undefined, sessionId: string, maxEvents?: number);
|
|
63
|
+
setState(next: SessionState): void;
|
|
64
|
+
/**
|
|
65
|
+
* Record one event. `data` / `error` / `meta` are accepted loosely (any
|
|
66
|
+
* runtime value) and cloned into Cloneable on the way in, so callers never
|
|
67
|
+
* worry about what is serializable.
|
|
68
|
+
*/
|
|
69
|
+
emit(event: {
|
|
70
|
+
direction: SessionEventDTO["direction"];
|
|
71
|
+
kind: string;
|
|
72
|
+
at?: number;
|
|
73
|
+
state?: SessionState;
|
|
74
|
+
data?: unknown;
|
|
75
|
+
error?: unknown;
|
|
76
|
+
meta?: unknown;
|
|
77
|
+
}): void;
|
|
78
|
+
onEvent(listener: (event: SessionEventDTO) => void): SessionSubscription;
|
|
79
|
+
abstract open(): Promise<void>;
|
|
80
|
+
abstract close(options?: Record<string, unknown>): Promise<void>;
|
|
81
|
+
abstract waitForClose(): Promise<void>;
|
|
82
|
+
abstract send(data: unknown, options?: Record<string, unknown>): Promise<unknown>;
|
|
83
|
+
request?(data: unknown, options?: Record<string, unknown>): Promise<unknown>;
|
|
84
|
+
}
|
|
85
|
+
declare function createEventHub(protocol: string, transport: string | undefined, sessionId: string, maxEvents?: number): UnifiedSession;
|
|
86
|
+
|
|
87
|
+
type Json = null | boolean | number | string | Json[] | {
|
|
88
|
+
[key: string]: Json;
|
|
89
|
+
};
|
|
90
|
+
type ProtocolName = "http" | "sse" | "websocket" | "grpc" | "graphql" | "mcp";
|
|
91
|
+
/**
|
|
92
|
+
* An OpenAPI 3.2 document. Kept loose on purpose: the toolkit tolerates
|
|
93
|
+
* partial and vendor-extended documents rather than validating them upfront.
|
|
94
|
+
*/
|
|
95
|
+
type OpenApiDocument = Record<string, any>;
|
|
96
|
+
/** Identifies a single operation inside an OpenAPI document. */
|
|
97
|
+
interface OperationTarget {
|
|
98
|
+
/** Templated path, e.g. '/users/{id}'. Requires `method`. */
|
|
99
|
+
path?: string;
|
|
100
|
+
/** HTTP method, case-insensitive. Requires `path`. */
|
|
101
|
+
method?: string;
|
|
102
|
+
/** Alternative lookup key; takes precedence over path + method. */
|
|
103
|
+
operationId?: string;
|
|
104
|
+
}
|
|
105
|
+
/** User-supplied values injected into the generated request. */
|
|
106
|
+
interface RequestValues {
|
|
107
|
+
path?: Record<string, unknown>;
|
|
108
|
+
query?: Record<string, unknown>;
|
|
109
|
+
header?: Record<string, unknown>;
|
|
110
|
+
cookie?: Record<string, unknown>;
|
|
111
|
+
/** OpenAPI 3.2 `querystring` parameter location: a raw, pre-encoded query string. */
|
|
112
|
+
querystring?: string;
|
|
113
|
+
body?: unknown;
|
|
114
|
+
/** Force a specific request media type when the operation declares several. */
|
|
115
|
+
contentType?: string;
|
|
116
|
+
}
|
|
117
|
+
interface AuthConfig {
|
|
118
|
+
type: "bearer" | "basic" | "apikey" | "none";
|
|
119
|
+
token?: string;
|
|
120
|
+
username?: string;
|
|
121
|
+
password?: string;
|
|
122
|
+
key?: string;
|
|
123
|
+
value?: string;
|
|
124
|
+
in?: "header" | "query";
|
|
125
|
+
}
|
|
126
|
+
interface ScriptSource {
|
|
127
|
+
/** Script body, either a single string or an array of lines. */
|
|
128
|
+
exec: string | string[];
|
|
129
|
+
/** Optional identifier surfaced in script results. */
|
|
130
|
+
id?: string;
|
|
131
|
+
}
|
|
132
|
+
interface ScriptConfig {
|
|
133
|
+
collectionPreRequest?: ScriptSource | ScriptSource[];
|
|
134
|
+
collectionTest?: ScriptSource | ScriptSource[];
|
|
135
|
+
preRequest?: ScriptSource | ScriptSource[];
|
|
136
|
+
test?: ScriptSource | ScriptSource[];
|
|
137
|
+
/**
|
|
138
|
+
* Read `x-postman-scripts` from the spec.
|
|
139
|
+
*
|
|
140
|
+
* @default true
|
|
141
|
+
*
|
|
142
|
+
* JavaScript embedded in a third-party document executes in the sandbox when
|
|
143
|
+
* this is enabled, which the caller may not expect. Loading such a document
|
|
144
|
+
* pushes a warning onto `BuiltCollection.warnings`. The default becomes
|
|
145
|
+
* `false` in 0.2.0; set it explicitly to pin current behaviour.
|
|
146
|
+
*/
|
|
147
|
+
fromSpecExtensions?: boolean;
|
|
148
|
+
/** Append the built-in helper exposing the last response to later requests. */
|
|
149
|
+
captureLastResponse?: boolean;
|
|
150
|
+
}
|
|
151
|
+
interface AssertionResult {
|
|
152
|
+
name: string;
|
|
153
|
+
passed: boolean;
|
|
154
|
+
skipped: boolean;
|
|
155
|
+
index: number;
|
|
156
|
+
error?: {
|
|
157
|
+
name?: string;
|
|
158
|
+
message: string;
|
|
159
|
+
stack?: string;
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
interface ConsoleLog {
|
|
163
|
+
level: "log" | "info" | "warn" | "error" | "debug";
|
|
164
|
+
messages: unknown[];
|
|
165
|
+
at: number;
|
|
166
|
+
}
|
|
167
|
+
interface ScriptOutcome {
|
|
168
|
+
target: "prerequest" | "test";
|
|
169
|
+
scriptId?: string;
|
|
170
|
+
error?: {
|
|
171
|
+
name?: string;
|
|
172
|
+
message: string;
|
|
173
|
+
};
|
|
174
|
+
/** Full variable scope snapshot after the script ran (not a diff). */
|
|
175
|
+
environment?: Record<string, string>;
|
|
176
|
+
globals?: Record<string, string>;
|
|
177
|
+
/**
|
|
178
|
+
* Values produced by pm.execution.setNextRequest / skipRequest, etc.
|
|
179
|
+
* Widened to `unknown`: the runtime also returns bare strings here.
|
|
180
|
+
*/
|
|
181
|
+
return?: unknown;
|
|
182
|
+
}
|
|
183
|
+
interface ScriptReport {
|
|
184
|
+
prerequest: ScriptOutcome[];
|
|
185
|
+
test: ScriptOutcome[];
|
|
186
|
+
assertions: AssertionResult[];
|
|
187
|
+
console: ConsoleLog[];
|
|
188
|
+
/** False when at least one non-skipped assertion failed. */
|
|
189
|
+
passed: boolean;
|
|
190
|
+
/** True when the item was skipped via pm.execution.skipRequest(). */
|
|
191
|
+
skipped: boolean;
|
|
192
|
+
}
|
|
193
|
+
interface StreamEvent {
|
|
194
|
+
/** SSE `id` field, or a synthetic sequence number for WebSocket frames. */
|
|
195
|
+
id?: string;
|
|
196
|
+
/** SSE `event` field, or the WebSocket frame kind ('text' | 'binary' | 'ping'). */
|
|
197
|
+
event?: string;
|
|
198
|
+
data: string;
|
|
199
|
+
/** Populated when `data` parses as JSON. */
|
|
200
|
+
parsed?: Json;
|
|
201
|
+
retry?: number;
|
|
202
|
+
receivedAt: number;
|
|
203
|
+
/** Message direction. WebSocket only; SSE events are always inbound. */
|
|
204
|
+
direction?: "in" | "out";
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Why sampling ended before the peer closed the connection.
|
|
208
|
+
* Absent when the stream or response completed on its own.
|
|
209
|
+
*/
|
|
210
|
+
type StopReason = "maxEvents" | "maxStreamMs" | "maxResponseSize" | "maxSessionMs" | "idleTimeout" | "aborted" | "hardTimeout";
|
|
211
|
+
interface ReplayRecord {
|
|
212
|
+
url: string;
|
|
213
|
+
method: string;
|
|
214
|
+
status: number;
|
|
215
|
+
/** Origin reported by the runtime, e.g. 'authorizer' or 'redirect'. */
|
|
216
|
+
reason?: string;
|
|
217
|
+
}
|
|
218
|
+
interface ExecResult {
|
|
219
|
+
protocol: ProtocolName;
|
|
220
|
+
request: {
|
|
221
|
+
method: string;
|
|
222
|
+
url: string;
|
|
223
|
+
/** Header names keep the casing reported by the runtime. */
|
|
224
|
+
headers: Record<string, string>;
|
|
225
|
+
body?: unknown;
|
|
226
|
+
};
|
|
227
|
+
response: {
|
|
228
|
+
status: number;
|
|
229
|
+
statusText: string;
|
|
230
|
+
/**
|
|
231
|
+
* Header names keep the casing reported by the server. HTTP header names
|
|
232
|
+
* are case-insensitive, so lower-case before comparing.
|
|
233
|
+
*/
|
|
234
|
+
headers: Record<string, string>;
|
|
235
|
+
contentType?: string;
|
|
236
|
+
/** Parsed body for non-streaming responses. */
|
|
237
|
+
body?: unknown;
|
|
238
|
+
text?: string;
|
|
239
|
+
/** Collected events for streaming protocols. Never longer than `maxEvents`. */
|
|
240
|
+
events?: StreamEvent[];
|
|
241
|
+
timings: {
|
|
242
|
+
startedAt: number;
|
|
243
|
+
endedAt: number;
|
|
244
|
+
/** Total wall-clock time: `endedAt - startedAt`. */
|
|
245
|
+
durationMs: number;
|
|
246
|
+
/** Time to first byte, relative to `startedAt`. */
|
|
247
|
+
firstByteMs?: number;
|
|
248
|
+
/**
|
|
249
|
+
* Network exchange time as reported by postman-runtime, excluding script
|
|
250
|
+
* execution and sampling overhead. Far below `durationMs` on a sampled
|
|
251
|
+
* stream, which is why it is a separate field rather than `durationMs`.
|
|
252
|
+
*/
|
|
253
|
+
networkDurationMs?: number;
|
|
254
|
+
};
|
|
255
|
+
/** Body bytes received. Header bytes are not counted. */
|
|
256
|
+
sizeBytes: number;
|
|
257
|
+
/**
|
|
258
|
+
* True when sampling stopped before the stream ended naturally.
|
|
259
|
+
* Absent (undefined) when the stream completed on its own.
|
|
260
|
+
*/
|
|
261
|
+
truncated?: boolean;
|
|
262
|
+
/** Set alongside `truncated` to identify which limit was reached. */
|
|
263
|
+
stopReason?: StopReason;
|
|
264
|
+
/**
|
|
265
|
+
* Events discarded by the parser's own size caps, as opposed to those
|
|
266
|
+
* withheld by `maxEvents`. A non-zero value means payload data was lost.
|
|
267
|
+
*/
|
|
268
|
+
droppedEvents?: number;
|
|
269
|
+
};
|
|
270
|
+
scripts?: ScriptReport;
|
|
271
|
+
cookies?: Array<{
|
|
272
|
+
name: string;
|
|
273
|
+
value: string;
|
|
274
|
+
domain?: string;
|
|
275
|
+
path?: string;
|
|
276
|
+
}>;
|
|
277
|
+
replays?: ReplayRecord[];
|
|
278
|
+
error?: {
|
|
279
|
+
message: string;
|
|
280
|
+
code?: string;
|
|
281
|
+
name?: string;
|
|
282
|
+
stack?: string;
|
|
283
|
+
};
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
* Raw postman-runtime options. Every documented field is passed straight
|
|
287
|
+
* through to `runner.run()`. Anything set here wins over the library defaults.
|
|
288
|
+
*/
|
|
289
|
+
interface RuntimeRunOptions {
|
|
290
|
+
data?: Array<Record<string, unknown>>;
|
|
291
|
+
timeout?: {
|
|
292
|
+
request?: number;
|
|
293
|
+
script?: number;
|
|
294
|
+
global?: number;
|
|
295
|
+
};
|
|
296
|
+
iterationCount?: number;
|
|
297
|
+
stopOnError?: boolean;
|
|
298
|
+
abortOnError?: boolean;
|
|
299
|
+
stopOnFailure?: boolean;
|
|
300
|
+
abortOnFailure?: boolean;
|
|
301
|
+
environment?: any;
|
|
302
|
+
globals?: any;
|
|
303
|
+
localVariables?: any;
|
|
304
|
+
secretResolver?: (ctx: {
|
|
305
|
+
secrets: Array<{
|
|
306
|
+
key: string;
|
|
307
|
+
value?: string;
|
|
308
|
+
}>;
|
|
309
|
+
url: string;
|
|
310
|
+
}, callback: (error: Error | null, result?: Array<{
|
|
311
|
+
resolvedValue?: string;
|
|
312
|
+
error?: unknown;
|
|
313
|
+
allowedInScript?: boolean;
|
|
314
|
+
}>) => void) => void;
|
|
315
|
+
entrypoint?: {
|
|
316
|
+
execute?: string;
|
|
317
|
+
lookupStrategy?: "idOrName" | "path";
|
|
318
|
+
path?: string[];
|
|
319
|
+
};
|
|
320
|
+
delay?: {
|
|
321
|
+
item?: number;
|
|
322
|
+
iteration?: number;
|
|
323
|
+
};
|
|
324
|
+
fileResolver?: unknown;
|
|
325
|
+
requester?: RequesterOptions;
|
|
326
|
+
script?: {
|
|
327
|
+
serializeLogs?: boolean;
|
|
328
|
+
requestResolver?: (requestId: string, callback: (error: Error | null, collection?: any) => void) => void;
|
|
329
|
+
packageResolver?: (ctx: {
|
|
330
|
+
packages: any;
|
|
331
|
+
}, callback: (error: Error | null, packages?: Record<string, {
|
|
332
|
+
data?: string;
|
|
333
|
+
error?: string;
|
|
334
|
+
}>) => void) => void;
|
|
335
|
+
};
|
|
336
|
+
proxies?: any;
|
|
337
|
+
systemProxy?: (url: string, callback: (error: Error | null, config?: any) => void) => void;
|
|
338
|
+
ignoreProxyEnvironmentVariables?: boolean;
|
|
339
|
+
certificates?: any;
|
|
340
|
+
systemCertificate?: () => void;
|
|
341
|
+
[key: string]: unknown;
|
|
342
|
+
}
|
|
343
|
+
interface RequesterOptions {
|
|
344
|
+
cookieJar?: any;
|
|
345
|
+
disableCookies?: boolean;
|
|
346
|
+
followRedirects?: boolean;
|
|
347
|
+
followOriginalHttpMethod?: boolean;
|
|
348
|
+
maxRedirects?: number;
|
|
349
|
+
/**
|
|
350
|
+
* Byte ceiling for the response body. This is a hard cut, not a hint:
|
|
351
|
+
* a streaming call with a tiny value yields an empty event list. A value of
|
|
352
|
+
* `0` is rejected with BAD_RUN_OPTIONS rather than treated as "no bytes".
|
|
353
|
+
* Leave undefined for streaming operations.
|
|
354
|
+
*/
|
|
355
|
+
maxResponseSize?: number;
|
|
356
|
+
maxHeaderSize?: number;
|
|
357
|
+
protocolVersion?: "http1" | "http2" | "auto";
|
|
358
|
+
useWhatWGUrlParser?: boolean;
|
|
359
|
+
removeRefererHeaderOnRedirect?: boolean;
|
|
360
|
+
strictSSL?: boolean;
|
|
361
|
+
insecureHTTPParser?: boolean;
|
|
362
|
+
timings?: boolean;
|
|
363
|
+
verbose?: boolean;
|
|
364
|
+
implicitCacheControl?: boolean;
|
|
365
|
+
implicitTraceHeader?: boolean;
|
|
366
|
+
systemHeaders?: Record<string, string>;
|
|
367
|
+
extendedRootCA?: string;
|
|
368
|
+
network?: {
|
|
369
|
+
hostLookup?: {
|
|
370
|
+
type: string;
|
|
371
|
+
hostIpMap?: Record<string, string>;
|
|
372
|
+
};
|
|
373
|
+
restrictedAddresses?: Record<string, boolean>;
|
|
374
|
+
};
|
|
375
|
+
/**
|
|
376
|
+
* Supplying agents disables the library's socket tracking, because tracking
|
|
377
|
+
* requires owning `createConnection`. Stream cancellation then falls back to
|
|
378
|
+
* `run.abort()` alone, which cannot interrupt an in-flight response body.
|
|
379
|
+
*/
|
|
380
|
+
agents?: {
|
|
381
|
+
http?: {
|
|
382
|
+
agentClass?: unknown;
|
|
383
|
+
agentOptions?: Record<string, unknown>;
|
|
384
|
+
} | unknown;
|
|
385
|
+
https?: {
|
|
386
|
+
agentClass?: unknown;
|
|
387
|
+
agentOptions?: Record<string, unknown>;
|
|
388
|
+
} | unknown;
|
|
389
|
+
};
|
|
390
|
+
authorizer?: {
|
|
391
|
+
refreshOAuth2Token?: (id: string, callback: (error: Error | null, token?: string) => void) => void;
|
|
392
|
+
};
|
|
393
|
+
maxInvokableNestedRequests?: number;
|
|
394
|
+
sslKeyLogFile?: string;
|
|
395
|
+
[key: string]: unknown;
|
|
396
|
+
}
|
|
397
|
+
/** WebSocket-specific execution options. */
|
|
398
|
+
interface WebSocketOptions {
|
|
399
|
+
/** Absolute ws:// or wss:// URL. Overrides anything derived from the spec. */
|
|
400
|
+
url?: string;
|
|
401
|
+
subprotocols?: string[];
|
|
402
|
+
headers?: Record<string, string>;
|
|
403
|
+
/** Messages sent immediately after the connection opens. */
|
|
404
|
+
send?: Array<string | Record<string, unknown> | Uint8Array>;
|
|
405
|
+
/** Milliseconds to wait between consecutive outbound messages. */
|
|
406
|
+
sendDelayMs?: number;
|
|
407
|
+
/** Stop after this many inbound messages. */
|
|
408
|
+
maxMessages?: number;
|
|
409
|
+
/** Hard cap on total session duration. */
|
|
410
|
+
maxSessionMs?: number;
|
|
411
|
+
/** Close once no message arrives within this window. */
|
|
412
|
+
idleTimeoutMs?: number;
|
|
413
|
+
/** Application-level ping payload sent on an interval. */
|
|
414
|
+
keepAlive?: {
|
|
415
|
+
intervalMs: number;
|
|
416
|
+
payload?: string;
|
|
417
|
+
};
|
|
418
|
+
/** Close code sent when the client terminates the session. */
|
|
419
|
+
closeCode?: number;
|
|
420
|
+
closeReason?: string;
|
|
421
|
+
/**
|
|
422
|
+
* Milliseconds to wait for the peer's close frame after sending ours before
|
|
423
|
+
* destroying the socket. A peer that never completes the closing handshake
|
|
424
|
+
* would otherwise keep the session open indefinitely.
|
|
425
|
+
*/
|
|
426
|
+
closeTimeoutMs?: number;
|
|
427
|
+
/** Extra options forwarded verbatim to the `ws` client constructor. */
|
|
428
|
+
clientOptions?: Record<string, unknown>;
|
|
429
|
+
/** Reject self-signed certificates. Defaults to true. */
|
|
430
|
+
rejectUnauthorized?: boolean;
|
|
431
|
+
/** Cap on retained payload size per frame, in bytes. */
|
|
432
|
+
maxPayloadBytes?: number;
|
|
433
|
+
handshakeTimeoutMs?: number;
|
|
434
|
+
}
|
|
435
|
+
/** GraphQL-specific execution options. */
|
|
436
|
+
interface GraphQLOptions {
|
|
437
|
+
/** Absolute HTTP(S) URL of the GraphQL endpoint. Overrides the resolved server URL. */
|
|
438
|
+
endpoint?: string;
|
|
439
|
+
/** Query or mutation document. Overrides whatever `x-graphql.query` declares. */
|
|
440
|
+
query?: string;
|
|
441
|
+
/** Name of the operation to run, required when `query` declares more than one. */
|
|
442
|
+
operationName?: string;
|
|
443
|
+
/** GraphQL variables. Merged over any sampled from `x-graphql.variablesSchema`. */
|
|
444
|
+
variables?: Record<string, unknown>;
|
|
445
|
+
/** Extra headers, merged over `values.header` and auth. */
|
|
446
|
+
headers?: Record<string, string>;
|
|
447
|
+
/**
|
|
448
|
+
* Use HTTP GET with querystring-encoded `query`/`variables` instead of a
|
|
449
|
+
* POST body. Some CDN-fronted endpoints require this for cached reads.
|
|
450
|
+
*/
|
|
451
|
+
useGet?: boolean;
|
|
452
|
+
}
|
|
453
|
+
/** MCP-specific execution options, covering both supported transports. */
|
|
454
|
+
interface McpOptions {
|
|
455
|
+
/** Which transport to use. Defaults to "streamable-http". */
|
|
456
|
+
transport?: "streamable-http" | "stdio";
|
|
457
|
+
endpoint?: string;
|
|
458
|
+
headers?: Record<string, string>;
|
|
459
|
+
command?: string;
|
|
460
|
+
args?: string[];
|
|
461
|
+
cwd?: string;
|
|
462
|
+
env?: Record<string, string | undefined>;
|
|
463
|
+
timeoutMs?: number;
|
|
464
|
+
maxBufferBytes?: number;
|
|
465
|
+
maxStderrBytes?: number;
|
|
466
|
+
method?: string;
|
|
467
|
+
name?: string;
|
|
468
|
+
arguments?: Record<string, unknown>;
|
|
469
|
+
sessionId?: string;
|
|
470
|
+
protocolVersion?: string;
|
|
471
|
+
clientInfo?: {
|
|
472
|
+
name: string;
|
|
473
|
+
version: string;
|
|
474
|
+
};
|
|
475
|
+
}
|
|
476
|
+
/** Bounds applied to the incremental SSE parser itself. */
|
|
477
|
+
interface StreamParserOptions {
|
|
478
|
+
/**
|
|
479
|
+
* Maximum characters buffered while waiting for an event boundary. A peer
|
|
480
|
+
* that never terminates an event would otherwise grow the buffer without
|
|
481
|
+
* bound, independently of `maxResponseSize`. Defaults to 4 Mi.
|
|
482
|
+
*/
|
|
483
|
+
maxBufferChars?: number;
|
|
484
|
+
/** Maximum characters retained in a single event's `data`. Defaults to 1 Mi. */
|
|
485
|
+
maxEventChars?: number;
|
|
486
|
+
/**
|
|
487
|
+
* Attach the last seen `id` to events that omit one. Defaults to true.
|
|
488
|
+
*
|
|
489
|
+
* The specification reserves the last event id for the `Last-Event-ID`
|
|
490
|
+
* header on reconnect rather than treating it as a property of later events.
|
|
491
|
+
* Inheriting it aids debugging but makes `id` look universally present to
|
|
492
|
+
* schema inference. Set to false for a spec-faithful stream.
|
|
493
|
+
*/
|
|
494
|
+
inheritEventId?: boolean;
|
|
495
|
+
}
|
|
496
|
+
interface JsonRpcOutcome {
|
|
497
|
+
/** The JSON-RPC response object, when the server sent one back. */
|
|
498
|
+
message: any | undefined;
|
|
499
|
+
status: number;
|
|
500
|
+
statusText: string;
|
|
501
|
+
headers: Record<string, string>;
|
|
502
|
+
contentType?: string;
|
|
503
|
+
sessionId?: string;
|
|
504
|
+
/** Raw text body, kept for non-JSON-RPC diagnostics. */
|
|
505
|
+
rawText?: string;
|
|
506
|
+
sizeBytes: number;
|
|
507
|
+
firstByteMs: number;
|
|
508
|
+
}
|
|
509
|
+
interface McpTool {
|
|
510
|
+
kind: "tool";
|
|
511
|
+
name: string;
|
|
512
|
+
/** Human-facing label, distinct from the machine `name`. */
|
|
513
|
+
title?: string;
|
|
514
|
+
description?: string;
|
|
515
|
+
inputSchema: any;
|
|
516
|
+
/** Server-declared execution constraints, e.g. `{ taskSupport: "forbidden" }`. */
|
|
517
|
+
execution?: Record<string, unknown>;
|
|
518
|
+
}
|
|
519
|
+
interface McpResource {
|
|
520
|
+
kind: "resource";
|
|
521
|
+
/** Resource templates use `uriTemplate`; concrete resources use `uri`. */
|
|
522
|
+
uri?: string;
|
|
523
|
+
uriTemplate?: string;
|
|
524
|
+
name: string;
|
|
525
|
+
title?: string;
|
|
526
|
+
description?: string;
|
|
527
|
+
mimeType?: string;
|
|
528
|
+
}
|
|
529
|
+
interface McpPrompt {
|
|
530
|
+
kind: "prompt";
|
|
531
|
+
name: string;
|
|
532
|
+
title?: string;
|
|
533
|
+
description?: string;
|
|
534
|
+
arguments?: Array<{
|
|
535
|
+
name: string;
|
|
536
|
+
description?: string;
|
|
537
|
+
required?: boolean;
|
|
538
|
+
}>;
|
|
539
|
+
}
|
|
540
|
+
type McpCapability = McpTool | McpResource | McpPrompt;
|
|
541
|
+
interface McpDiscoveryResult {
|
|
542
|
+
serverInfo?: {
|
|
543
|
+
name: string;
|
|
544
|
+
version: string;
|
|
545
|
+
};
|
|
546
|
+
protocolVersion?: string;
|
|
547
|
+
sessionId?: string;
|
|
548
|
+
capabilities: McpCapability[];
|
|
549
|
+
warnings: string[];
|
|
550
|
+
}
|
|
551
|
+
interface InitializeSessionInit {
|
|
552
|
+
headers?: Record<string, string>;
|
|
553
|
+
signal?: AbortSignal;
|
|
554
|
+
clientInfo?: {
|
|
555
|
+
name: string;
|
|
556
|
+
version: string;
|
|
557
|
+
};
|
|
558
|
+
/** Client capabilities advertised at initialize. Default: {}. */
|
|
559
|
+
capabilities?: Record<string, unknown>;
|
|
560
|
+
}
|
|
561
|
+
interface ManualMessage {
|
|
562
|
+
data: unknown;
|
|
563
|
+
delayMs?: number;
|
|
564
|
+
}
|
|
565
|
+
type ManualSessionKind = "websocket" | "mcp" | "grpc";
|
|
566
|
+
/**
|
|
567
|
+
* The minimal contract shared by every manual session. Each protocol exposes
|
|
568
|
+
* a richer, protocol-specific interface (WsManualSession / McpManualSession /
|
|
569
|
+
* GrpcManualSession); `ManualSession` is what `createManualSession()` returns.
|
|
570
|
+
*/
|
|
571
|
+
interface ManualSession {
|
|
572
|
+
readonly protocol: ManualSessionKind;
|
|
573
|
+
readonly state: SessionState;
|
|
574
|
+
readonly events: readonly SessionEventDTO[];
|
|
575
|
+
onEvent(listener: (event: SessionEventDTO) => void): SessionSubscription;
|
|
576
|
+
open(): Promise<void>;
|
|
577
|
+
send(message: unknown, options?: unknown): Promise<void>;
|
|
578
|
+
close(options?: unknown): Promise<void>;
|
|
579
|
+
waitForClose(): Promise<void>;
|
|
580
|
+
}
|
|
581
|
+
/** WebSocket manual session. State mirrors the shared SessionState. */
|
|
582
|
+
type WebSocketSessionState = SessionState;
|
|
583
|
+
interface WebSocketSessionEvent {
|
|
584
|
+
direction: "in" | "out" | "meta";
|
|
585
|
+
receivedAt: number;
|
|
586
|
+
event: "open" | "text" | "binary" | "error" | "close" | "upgrade" | "unexpected-response";
|
|
587
|
+
data?: string;
|
|
588
|
+
parsed?: unknown;
|
|
589
|
+
code?: number;
|
|
590
|
+
reason?: string;
|
|
591
|
+
protocol?: string;
|
|
592
|
+
extensions?: string;
|
|
593
|
+
wasClean?: boolean;
|
|
594
|
+
statusCode?: number;
|
|
595
|
+
statusMessage?: string;
|
|
596
|
+
headers?: Record<string, string | string[] | undefined>;
|
|
597
|
+
error?: string;
|
|
598
|
+
}
|
|
599
|
+
interface CreateWsManualSessionOptions {
|
|
600
|
+
url: string;
|
|
601
|
+
headers?: Record<string, string>;
|
|
602
|
+
subprotocols?: string[];
|
|
603
|
+
rejectUnauthorized?: boolean;
|
|
604
|
+
/** Abort opening / pending operations from the outside. */
|
|
605
|
+
signal?: AbortSignal;
|
|
606
|
+
/** Handshake timeout in ms. Default 15_000. */
|
|
607
|
+
openTimeoutMs?: number;
|
|
608
|
+
/** Ring-buffer cap for events. 0 = unbounded. Default 1000. */
|
|
609
|
+
maxEvents?: number;
|
|
610
|
+
}
|
|
611
|
+
interface WsSendOptions {
|
|
612
|
+
delayMs?: number;
|
|
613
|
+
binary?: boolean;
|
|
614
|
+
}
|
|
615
|
+
interface WsManualSession {
|
|
616
|
+
readonly protocol: "websocket";
|
|
617
|
+
readonly state: WebSocketSessionState;
|
|
618
|
+
readonly events: readonly SessionEventDTO[];
|
|
619
|
+
onEvent(listener: (event: SessionEventDTO) => void): SessionSubscription;
|
|
620
|
+
open(): Promise<void>;
|
|
621
|
+
send(data: unknown, options?: WsSendOptions): Promise<void>;
|
|
622
|
+
close(options?: {
|
|
623
|
+
code?: number;
|
|
624
|
+
reason?: string;
|
|
625
|
+
}): Promise<void>;
|
|
626
|
+
waitForClose(): Promise<void>;
|
|
627
|
+
}
|
|
628
|
+
/** MCP manual session. State mirrors the shared SessionState. */
|
|
629
|
+
type McpSessionState = SessionState;
|
|
630
|
+
interface McpSessionEvent {
|
|
631
|
+
direction: "in" | "out" | "meta";
|
|
632
|
+
at: number;
|
|
633
|
+
event: "session" | "jsonrpc" | "notification" | "error" | "lifecycle";
|
|
634
|
+
/** JSON text of `parsed`, or undefined when there was no body (202/204). */
|
|
635
|
+
data?: string;
|
|
636
|
+
parsed?: unknown;
|
|
637
|
+
}
|
|
638
|
+
/**
|
|
639
|
+
* Options for a manual MCP session. `transport` picks the wire: HTTP
|
|
640
|
+
* (Streamable HTTP, the default) or stdio (spawns `command`).
|
|
641
|
+
*/
|
|
642
|
+
interface McpManualSessionOptions {
|
|
643
|
+
/** "streamable-http" (default) or "stdio". */
|
|
644
|
+
transport?: "streamable-http" | "stdio";
|
|
645
|
+
endpoint?: string;
|
|
646
|
+
headers?: Record<string, string>;
|
|
647
|
+
command?: string;
|
|
648
|
+
args?: string[];
|
|
649
|
+
cwd?: string;
|
|
650
|
+
env?: Record<string, string | undefined>;
|
|
651
|
+
maxBufferBytes?: number;
|
|
652
|
+
maxStderrBytes?: number;
|
|
653
|
+
clientInfo?: {
|
|
654
|
+
name: string;
|
|
655
|
+
version: string;
|
|
656
|
+
};
|
|
657
|
+
/** Client capabilities advertised at initialize. Default: {}. */
|
|
658
|
+
capabilities?: Record<string, unknown>;
|
|
659
|
+
/** Per-request timeout in ms. 0/undefined disables. Default 30_000. */
|
|
660
|
+
timeoutMs?: number;
|
|
661
|
+
/** Aborts the whole session (open, in-flight sends, close). */
|
|
662
|
+
signal?: AbortSignal;
|
|
663
|
+
/** Ring-buffer cap for `events`. Default 1000. 0 = unbounded. */
|
|
664
|
+
maxEvents?: number;
|
|
665
|
+
/** Redact secret-looking values in recorded events. Default true. */
|
|
666
|
+
redactSecrets?: boolean;
|
|
667
|
+
/**
|
|
668
|
+
* Issue list calls one at a time. Needed only for servers that cannot
|
|
669
|
+
* handle concurrent requests on one session. Default false.
|
|
670
|
+
*/
|
|
671
|
+
serialize?: boolean;
|
|
672
|
+
}
|
|
673
|
+
/** Backward-compatible alias: stdio uses the same option shape. */
|
|
674
|
+
type McpStdioSessionOptions = Omit<McpManualSessionOptions, "transport" | "endpoint" | "headers"> & {
|
|
675
|
+
command: string;
|
|
676
|
+
args?: string[];
|
|
677
|
+
cwd?: string;
|
|
678
|
+
env?: Record<string, string | undefined>;
|
|
679
|
+
};
|
|
680
|
+
interface McpRequestOptions {
|
|
681
|
+
delayMs?: number;
|
|
682
|
+
timeoutMs?: number;
|
|
683
|
+
signal?: AbortSignal;
|
|
684
|
+
/** Return the raw outcome instead of throwing on JSON-RPC errors. */
|
|
685
|
+
raw?: boolean;
|
|
686
|
+
}
|
|
687
|
+
interface McpListing<T> {
|
|
688
|
+
items: T[];
|
|
689
|
+
pages: number;
|
|
690
|
+
}
|
|
691
|
+
/** How a session-termination DELETE was answered. */
|
|
692
|
+
type McpTerminateOutcome = "released" | "unsupported" | "already-gone" | "failed";
|
|
693
|
+
interface McpManualSession {
|
|
694
|
+
readonly protocol: "mcp";
|
|
695
|
+
readonly state: McpSessionState;
|
|
696
|
+
readonly sessionId: string | undefined;
|
|
697
|
+
readonly protocolVersion: string | undefined;
|
|
698
|
+
readonly serverInfo: {
|
|
699
|
+
name: string;
|
|
700
|
+
version: string;
|
|
701
|
+
} | undefined;
|
|
702
|
+
readonly events: readonly SessionEventDTO[];
|
|
703
|
+
onEvent(listener: (event: SessionEventDTO) => void): SessionSubscription;
|
|
704
|
+
open(): Promise<void>;
|
|
705
|
+
request<T = any>(method: string, params?: unknown, options?: McpRequestOptions): Promise<T>;
|
|
706
|
+
send(message: unknown, options?: McpRequestOptions): Promise<JsonRpcOutcome>;
|
|
707
|
+
notify(method: string, params?: unknown, options?: McpRequestOptions): Promise<void>;
|
|
708
|
+
ping(options?: McpRequestOptions): Promise<void>;
|
|
709
|
+
listTools(options?: McpRequestOptions): Promise<McpListing<any>>;
|
|
710
|
+
listPrompts(options?: McpRequestOptions): Promise<McpListing<any>>;
|
|
711
|
+
listResources(options?: McpRequestOptions): Promise<McpListing<any>>;
|
|
712
|
+
listResourceTemplates(options?: McpRequestOptions): Promise<McpListing<any>>;
|
|
713
|
+
/** Concrete resources + templates, merged. */
|
|
714
|
+
listSources(options?: McpRequestOptions): Promise<McpListing<any>>;
|
|
715
|
+
callTool(name: string, args?: Record<string, unknown>, options?: McpRequestOptions): Promise<any>;
|
|
716
|
+
getPrompt(name: string, args?: Record<string, unknown>, options?: McpRequestOptions): Promise<any>;
|
|
717
|
+
readResource(uri: string, options?: McpRequestOptions): Promise<any>;
|
|
718
|
+
close(): Promise<void>;
|
|
719
|
+
waitForClose(): Promise<void>;
|
|
720
|
+
[Symbol.asyncDispose]?: () => Promise<void>;
|
|
721
|
+
}
|
|
722
|
+
/** gRPC manual session. */
|
|
723
|
+
type GrpcMethodKind = "unary" | "server_streaming" | "client_streaming" | "bidi_streaming";
|
|
724
|
+
type GrpcManualSessionState = SessionState;
|
|
725
|
+
type GrpcDescriptorSourceKind = "proto" | "reflection";
|
|
726
|
+
interface GrpcManualSessionEvent {
|
|
727
|
+
direction: "outbound" | "inbound" | "status" | "meta";
|
|
728
|
+
event?: "open" | "metadata" | "data" | "status" | "error" | "end" | "close";
|
|
729
|
+
payload?: unknown;
|
|
730
|
+
metadata?: unknown;
|
|
731
|
+
code?: number;
|
|
732
|
+
details?: string;
|
|
733
|
+
statusName?: string;
|
|
734
|
+
error?: string;
|
|
735
|
+
at: number;
|
|
736
|
+
}
|
|
737
|
+
interface GrpcManualSessionTarget {
|
|
738
|
+
address: string;
|
|
739
|
+
reflection?: boolean;
|
|
740
|
+
protoPaths?: string[];
|
|
741
|
+
/** Extra include directories for proto-loader (defaults to the dirs of protoPaths). */
|
|
742
|
+
includeDirs?: string[];
|
|
743
|
+
service: string;
|
|
744
|
+
method: string;
|
|
745
|
+
metadata?: Record<string, string>;
|
|
746
|
+
deadlineMs?: number;
|
|
747
|
+
loaderOptions?: Record<string, unknown>;
|
|
748
|
+
channelOptions?: Record<string, unknown>;
|
|
749
|
+
tls?: unknown;
|
|
750
|
+
reflectionTimeoutMs?: number;
|
|
751
|
+
reflectionVersion?: "v1" | "v1alpha";
|
|
752
|
+
reflectionHost?: string;
|
|
753
|
+
}
|
|
754
|
+
interface GrpcManualSession {
|
|
755
|
+
readonly protocol: "grpc";
|
|
756
|
+
readonly state: GrpcManualSessionState;
|
|
757
|
+
/** Resolved lazily inside open(); undefined until then. */
|
|
758
|
+
readonly kind: GrpcMethodKind | undefined;
|
|
759
|
+
/** Resolved lazily inside open(); undefined until then. */
|
|
760
|
+
readonly source: GrpcDescriptorSourceKind | undefined;
|
|
761
|
+
readonly events: readonly SessionEventDTO[];
|
|
762
|
+
onEvent(listener: (event: SessionEventDTO) => void): SessionSubscription;
|
|
763
|
+
readonly warnings: readonly unknown[];
|
|
764
|
+
open(): Promise<void>;
|
|
765
|
+
send(message: unknown): Promise<void>;
|
|
766
|
+
close(): Promise<void>;
|
|
767
|
+
waitForClose(): Promise<void>;
|
|
768
|
+
}
|
|
769
|
+
interface GrpcTlsOptions {
|
|
770
|
+
/**
|
|
771
|
+
* CA bundle contents, not a path. Pass `await readFile(p)`; a string is
|
|
772
|
+
* rejected, because grpc-js would otherwise treat the path text itself as
|
|
773
|
+
* PEM data and fail with an opaque handshake error.
|
|
774
|
+
*/
|
|
775
|
+
rootCerts?: Buffer;
|
|
776
|
+
/** Client key for mTLS. Must be given together with certChain. */
|
|
777
|
+
privateKey?: Buffer;
|
|
778
|
+
/** Client certificate chain for mTLS. Must be given together with privateKey. */
|
|
779
|
+
certChain?: Buffer;
|
|
780
|
+
/**
|
|
781
|
+
* Skips hostname verification only. The certificate chain is STILL verified.
|
|
782
|
+
* For self-signed certs issued to a different name. Always produces a warning.
|
|
783
|
+
*/
|
|
784
|
+
skipHostnameVerification?: boolean;
|
|
785
|
+
}
|
|
786
|
+
interface GrpcCredentialsOptions {
|
|
787
|
+
/** false/undefined = insecure; true = TLS with system roots; object = custom. */
|
|
788
|
+
tls?: boolean | GrpcTlsOptions;
|
|
789
|
+
}
|
|
790
|
+
/**
|
|
791
|
+
* A discriminated union rather than a flat bag of optional fields: the two
|
|
792
|
+
* sources share no options at all, and a type that permits both filled in at
|
|
793
|
+
* once forces a runtime rule ("reflection wins") that users have to learn from
|
|
794
|
+
* a warning instead of from the compiler.
|
|
795
|
+
*/
|
|
796
|
+
interface GrpcProtoFileSource {
|
|
797
|
+
reflection?: false;
|
|
798
|
+
/** .proto files or directories. Directories are walked recursively and merged. */
|
|
799
|
+
protoPaths: string[];
|
|
800
|
+
/**
|
|
801
|
+
* Import roots. When omitted they are derived from protoPaths plus, for files
|
|
802
|
+
* outside them, each file's own directory — which resolves imports more
|
|
803
|
+
* loosely than protoc and is reported as a note. Set this for exact parity
|
|
804
|
+
* with your build.
|
|
805
|
+
*/
|
|
806
|
+
includeDirs?: string[];
|
|
807
|
+
/** Directory names skipped while walking. Default: node_modules,.git,dist,build,out,.venv */
|
|
808
|
+
ignoreDirs?: string[];
|
|
809
|
+
/** Follow symlinks while walking. Default false; cycles are detected either way. */
|
|
810
|
+
followSymlinks?: boolean;
|
|
811
|
+
/** Cap on files collected in one scan. Default 5000. */
|
|
812
|
+
maxProtoFiles?: number;
|
|
813
|
+
}
|
|
814
|
+
interface GrpcReflectionSource {
|
|
815
|
+
/** Use server reflection as the descriptor source. */
|
|
816
|
+
reflection: true;
|
|
817
|
+
/** Budget for the whole reflection session, not per round trip. Default 5000. */
|
|
818
|
+
reflectionTimeoutMs?: number;
|
|
819
|
+
/** Pin a version. Default: try v1, fall back to v1alpha when unimplemented. */
|
|
820
|
+
reflectionVersion?: "v1" | "v1alpha";
|
|
821
|
+
/** `host` field on reflection requests. Only for virtual-hosted servers. */
|
|
822
|
+
reflectionHost?: string;
|
|
823
|
+
/** Caps on the descriptor closure. Defaults: 2000 files, 32 MiB. */
|
|
824
|
+
maxReflectionFiles?: number;
|
|
825
|
+
maxReflectionBytes?: number;
|
|
826
|
+
}
|
|
827
|
+
/**
|
|
828
|
+
* Exactly one descriptor source. `.proto` is already the authoritative IDL for
|
|
829
|
+
* gRPC, and a running server can describe itself — there is no third option and
|
|
830
|
+
* no lossy intermediate document worth introducing.
|
|
831
|
+
*/
|
|
832
|
+
type GrpcDescriptorSource = GrpcProtoFileSource | GrpcReflectionSource;
|
|
833
|
+
/**
|
|
834
|
+
* Metadata as written by a caller. Single values are allowed because writing
|
|
835
|
+
* `{ "x-trace": "abc" }` is what people mean.
|
|
836
|
+
*/
|
|
837
|
+
type GrpcMetadataInput = Record<string, string | string[]>;
|
|
838
|
+
/**
|
|
839
|
+
* Metadata as observed on the wire. Always arrays: HTTP/2 headers may repeat,
|
|
840
|
+
* and collapsing repeats would silently discard data. Binary (`-bin`) values
|
|
841
|
+
* are base64-encoded so the result stays JSON-serialisable.
|
|
842
|
+
*/
|
|
843
|
+
type GrpcMetadataOutput = Record<string, string[]>;
|
|
844
|
+
interface GrpcConnection extends GrpcCredentialsOptions {
|
|
845
|
+
/** host:port, no scheme. */
|
|
846
|
+
address: string;
|
|
847
|
+
/** Sent on every call made through this endpoint, including reflection. */
|
|
848
|
+
metadata?: GrpcMetadataInput;
|
|
849
|
+
channelOptions?: Record<string, unknown>;
|
|
850
|
+
}
|
|
851
|
+
/** Everything needed to reach a server and read its schema, without a method. */
|
|
852
|
+
type GrpcEndpoint = GrpcConnection & GrpcDescriptorSource;
|
|
853
|
+
/** An endpoint plus the one method to invoke. */
|
|
854
|
+
type GrpcTarget = GrpcEndpoint & {
|
|
855
|
+
/** Fully-qualified service name, e.g. "demo.echo.Echo". */
|
|
856
|
+
service: string;
|
|
857
|
+
/** Method name as declared in proto, e.g. "Say". Matched case-insensitively as a fallback. */
|
|
858
|
+
method: string;
|
|
859
|
+
/**
|
|
860
|
+
* Per-call gRPC deadline. Enforced by the server, so exceeding it yields
|
|
861
|
+
* DEADLINE_EXCEEDED with statusOrigin "server" and truncated=false — the call
|
|
862
|
+
* was not cut short by this library.
|
|
863
|
+
*/
|
|
864
|
+
deadlineMs?: number;
|
|
865
|
+
};
|
|
866
|
+
interface GrpcSendOptions {
|
|
867
|
+
/**
|
|
868
|
+
* Request payloads, in proto3 JSON shape as produced by buildMessageTemplate.
|
|
869
|
+
*
|
|
870
|
+
* unary / server_streaming: only messages[0] is sent; extras produce a
|
|
871
|
+
* warning. When omitted an empty message is sent, which a method with
|
|
872
|
+
* required semantics will reject — a warning says so.
|
|
873
|
+
* client_streaming / bidi_streaming: all are sent in order, then the write
|
|
874
|
+
* side is half-closed unless keepWriteOpen is set.
|
|
875
|
+
*/
|
|
876
|
+
messages?: unknown[];
|
|
877
|
+
/**
|
|
878
|
+
* Stop after N inbound messages. 0 means "send, then stop before reading".
|
|
879
|
+
* Sets truncated=true with reason "max_messages".
|
|
880
|
+
*/
|
|
881
|
+
maxMessages?: number;
|
|
882
|
+
/** No inbound message for this long -> stop. Reason "idle_timeout". */
|
|
883
|
+
idleTimeoutMs?: number;
|
|
884
|
+
/** Hard wall-clock cap on the whole call. Reason "max_session". */
|
|
885
|
+
maxSessionMs?: number;
|
|
886
|
+
/**
|
|
887
|
+
* All limits are armed simultaneously and the first to fire wins; only that
|
|
888
|
+
* one appears in truncatedReason. They are independent of target.deadlineMs,
|
|
889
|
+
* which is enforced by the server rather than here.
|
|
890
|
+
*/
|
|
891
|
+
/** Pause between outbound messages. client/bidi streaming only. */
|
|
892
|
+
sendIntervalMs?: number;
|
|
893
|
+
/**
|
|
894
|
+
* bidi only. Keeps the write side open after the last message, so the call
|
|
895
|
+
* can only end via the server, a limit, an abort, or the deadline. Setting it
|
|
896
|
+
* with none of those available produces a warning.
|
|
897
|
+
*/
|
|
898
|
+
keepWriteOpen?: boolean;
|
|
899
|
+
signal?: AbortSignal;
|
|
900
|
+
/**
|
|
901
|
+
* Called for every event, in order. A throwing callback is swallowed: an
|
|
902
|
+
* observer must not be able to terminate the call it is observing.
|
|
903
|
+
*/
|
|
904
|
+
onEvent?: (event: GrpcEvent) => void;
|
|
905
|
+
}
|
|
906
|
+
/**
|
|
907
|
+
* "status" is its own direction rather than a flavour of "meta".
|
|
908
|
+
*
|
|
909
|
+
* Response headers and the terminal status are different observations — one is
|
|
910
|
+
* mid-call, the other ends it — and giving them the same discriminant means a
|
|
911
|
+
* `switch (event.direction)` cannot tell them apart. The terminal status is the
|
|
912
|
+
* single most important event in the log, so it is the last one that should be
|
|
913
|
+
* indistinguishable from anything else.
|
|
914
|
+
*/
|
|
915
|
+
type GrpcEventDirection = "outbound" | "inbound" | "meta" | "status";
|
|
916
|
+
interface GrpcEventBase {
|
|
917
|
+
seq: number;
|
|
918
|
+
/** epoch ms */
|
|
919
|
+
at: number;
|
|
920
|
+
}
|
|
921
|
+
interface GrpcMessageEvent extends GrpcEventBase {
|
|
922
|
+
direction: "outbound" | "inbound";
|
|
923
|
+
payload: unknown;
|
|
924
|
+
}
|
|
925
|
+
/** Initial metadata, i.e. response headers. */
|
|
926
|
+
interface GrpcMetadataEvent extends GrpcEventBase {
|
|
927
|
+
direction: "meta";
|
|
928
|
+
metadata: GrpcMetadataOutput;
|
|
929
|
+
}
|
|
930
|
+
interface GrpcStatusEvent extends GrpcEventBase {
|
|
931
|
+
direction: "status";
|
|
932
|
+
status: GrpcStatus;
|
|
933
|
+
/**
|
|
934
|
+
* Always "server" or "client" here: this event records a status that was
|
|
935
|
+
* actually observed. A synthesized status never produces an event, because
|
|
936
|
+
* nothing happened on the wire to record — it appears only in the result.
|
|
937
|
+
*/
|
|
938
|
+
statusOrigin: Exclude<GrpcStatusOrigin, "synthesized">;
|
|
939
|
+
/** Trailing metadata, when the status arrived with any. */
|
|
940
|
+
metadata?: GrpcMetadataOutput;
|
|
941
|
+
}
|
|
942
|
+
/**
|
|
943
|
+
* Discriminated on `direction`, so narrowing yields exactly the fields that
|
|
944
|
+
* event carries. Consumers that switch on it should end with an exhaustiveness
|
|
945
|
+
* check; a missing branch is otherwise a silently blank row in a timeline.
|
|
946
|
+
*/
|
|
947
|
+
type GrpcEvent = GrpcMessageEvent | GrpcMetadataEvent | GrpcStatusEvent;
|
|
948
|
+
interface GrpcStatus {
|
|
949
|
+
code: number;
|
|
950
|
+
/** e.g. "OK", "DEADLINE_EXCEEDED". Falls back to "CODE_<n>" for unknown codes. */
|
|
951
|
+
codeName: string;
|
|
952
|
+
details?: string;
|
|
953
|
+
}
|
|
954
|
+
/**
|
|
955
|
+
* Who produced a status.
|
|
956
|
+
*
|
|
957
|
+
* - "server" : the peer's trailers, or the unary/client-streaming callback.
|
|
958
|
+
* - "client" : grpc-js decided it locally without the server replying,
|
|
959
|
+
* e.g. UNAVAILABLE on a refused connection.
|
|
960
|
+
* - "synthesized" : this library stopped the call, so no wire status will ever
|
|
961
|
+
* arrive and CANCELLED was written in. Labelled rather than
|
|
962
|
+
* left blank, because an unlabelled synthetic status is
|
|
963
|
+
* indistinguishable from one the peer sent.
|
|
964
|
+
*/
|
|
965
|
+
type GrpcStatusOrigin = "server" | "client" | "synthesized";
|
|
966
|
+
/**
|
|
967
|
+
* Why this library stopped a call that would otherwise have continued.
|
|
968
|
+
*
|
|
969
|
+
* That is the whole definition of `truncated`, and it is what keeps
|
|
970
|
+
* target.deadlineMs off this list: a deadline is enforced by the peer, so its
|
|
971
|
+
* DEADLINE_EXCEEDED is a real outcome rather than an interruption.
|
|
972
|
+
*/
|
|
973
|
+
type GrpcTruncatedReason = "max_messages" | "idle_timeout" | "max_session" | "aborted";
|
|
974
|
+
interface GrpcResult {
|
|
975
|
+
protocol: "grpc";
|
|
976
|
+
/** From the descriptor, so it reflects what the method is, not what was asked for. */
|
|
977
|
+
kind: GrpcMethodKind;
|
|
978
|
+
target: GrpcTarget;
|
|
979
|
+
/** Everything that happened, in order, including messages already in `messages`. */
|
|
980
|
+
events: GrpcEvent[];
|
|
981
|
+
/** Inbound payloads only, for the common case of not needing the timeline. */
|
|
982
|
+
messages: unknown[];
|
|
983
|
+
/**
|
|
984
|
+
* Response headers. Undefined means the call never reached the point of
|
|
985
|
+
* receiving them; an empty object means they arrived and were empty.
|
|
986
|
+
*/
|
|
987
|
+
initialMetadata?: GrpcMetadataOutput;
|
|
988
|
+
/** Response trailers, with the same undefined-versus-empty distinction. */
|
|
989
|
+
trailers?: GrpcMetadataOutput;
|
|
990
|
+
/** Undefined only when the call was cut before any outcome existed. */
|
|
991
|
+
status?: GrpcStatus;
|
|
992
|
+
/** Present exactly when `status` is. */
|
|
993
|
+
statusOrigin?: GrpcStatusOrigin;
|
|
994
|
+
truncated: boolean;
|
|
995
|
+
/** Present exactly when truncated is true. */
|
|
996
|
+
truncatedReason?: GrpcTruncatedReason;
|
|
997
|
+
/** Human-readable failure text. Absent on success and on clean truncation. */
|
|
998
|
+
error?: string;
|
|
999
|
+
warnings: string[];
|
|
1000
|
+
durationMs: number;
|
|
1001
|
+
}
|
|
1002
|
+
interface GraphQLTypeRef {
|
|
1003
|
+
kind: string;
|
|
1004
|
+
name?: string | null;
|
|
1005
|
+
ofType?: GraphQLTypeRef | null;
|
|
1006
|
+
}
|
|
1007
|
+
interface GraphQLArg {
|
|
1008
|
+
name: string;
|
|
1009
|
+
description?: string | null;
|
|
1010
|
+
type: GraphQLTypeRef;
|
|
1011
|
+
defaultValue?: string | null;
|
|
1012
|
+
}
|
|
1013
|
+
interface GraphQLFieldInfo {
|
|
1014
|
+
name: string;
|
|
1015
|
+
description?: string | null;
|
|
1016
|
+
args: GraphQLArg[];
|
|
1017
|
+
type: GraphQLTypeRef;
|
|
1018
|
+
isDeprecated?: boolean;
|
|
1019
|
+
}
|
|
1020
|
+
interface GraphQLNamedType {
|
|
1021
|
+
kind: string;
|
|
1022
|
+
name: string;
|
|
1023
|
+
description?: string | null;
|
|
1024
|
+
fields?: GraphQLFieldInfo[];
|
|
1025
|
+
inputFields?: GraphQLArg[];
|
|
1026
|
+
enumValues?: Array<{
|
|
1027
|
+
name: string;
|
|
1028
|
+
}>;
|
|
1029
|
+
}
|
|
1030
|
+
interface IntrospectedSchema {
|
|
1031
|
+
queryType?: string;
|
|
1032
|
+
mutationType?: string;
|
|
1033
|
+
subscriptionType?: string;
|
|
1034
|
+
/** Every named type, keyed by name, for resolving arg/field types during generation. */
|
|
1035
|
+
types: Map<string, GraphQLNamedType>;
|
|
1036
|
+
}
|
|
1037
|
+
interface IntrospectionResult {
|
|
1038
|
+
schema: IntrospectedSchema;
|
|
1039
|
+
/** Raw `__schema` payload, kept for callers that want more than this module parses. */
|
|
1040
|
+
raw: any;
|
|
1041
|
+
}
|
|
1042
|
+
interface GeneratedOperation {
|
|
1043
|
+
operationType: "query" | "mutation" | "subscription";
|
|
1044
|
+
fieldName: string;
|
|
1045
|
+
operationName: string;
|
|
1046
|
+
/** Complete, ready-to-send document. */
|
|
1047
|
+
query: string;
|
|
1048
|
+
/** JSON Schema describing the `variables` object, for sampling and for documentation. */
|
|
1049
|
+
variablesSchema: {
|
|
1050
|
+
type: "object";
|
|
1051
|
+
properties: Record<string, any>;
|
|
1052
|
+
required: string[];
|
|
1053
|
+
};
|
|
1054
|
+
notes: string[];
|
|
1055
|
+
}
|
|
1056
|
+
interface WriteGraphQLOptions {
|
|
1057
|
+
/** Overwrite an existing path for the same operation. Defaults to true. */
|
|
1058
|
+
overwrite?: boolean;
|
|
1059
|
+
/** Extra headers to send with the introspection request (auth, etc.). */
|
|
1060
|
+
headers?: Record<string, string>;
|
|
1061
|
+
signal?: AbortSignal;
|
|
1062
|
+
}
|
|
1063
|
+
interface DiscoverAndWriteResult {
|
|
1064
|
+
spec: any;
|
|
1065
|
+
operations: GeneratedOperation[];
|
|
1066
|
+
warnings: string[];
|
|
1067
|
+
}
|
|
1068
|
+
type McpTransport = "streamable-http" | "stdio";
|
|
1069
|
+
interface ResolvedMcpConfig {
|
|
1070
|
+
transport: McpTransport;
|
|
1071
|
+
endpoint?: string;
|
|
1072
|
+
command?: string;
|
|
1073
|
+
args?: string[];
|
|
1074
|
+
cwd?: string;
|
|
1075
|
+
env?: Record<string, string | undefined>;
|
|
1076
|
+
timeoutMs?: number;
|
|
1077
|
+
maxBufferBytes?: number;
|
|
1078
|
+
maxStderrBytes?: number;
|
|
1079
|
+
method: string;
|
|
1080
|
+
/** Fully-formed JSON-RPC `params` for `method`. */
|
|
1081
|
+
params: Record<string, unknown>;
|
|
1082
|
+
headers: Record<string, string>;
|
|
1083
|
+
sessionId?: string;
|
|
1084
|
+
/** Only set when the caller actually negotiated it; never guessed. */
|
|
1085
|
+
protocolVersion?: string;
|
|
1086
|
+
clientInfo: {
|
|
1087
|
+
name: string;
|
|
1088
|
+
version: string;
|
|
1089
|
+
};
|
|
1090
|
+
}
|
|
1091
|
+
interface ResolvedGraphQLConfig {
|
|
1092
|
+
endpoint: string;
|
|
1093
|
+
query: string;
|
|
1094
|
+
operationName?: string;
|
|
1095
|
+
variables: Record<string, unknown>;
|
|
1096
|
+
headers: Record<string, string>;
|
|
1097
|
+
useGet: boolean;
|
|
1098
|
+
}
|
|
1099
|
+
interface ResolvedWsConfig {
|
|
1100
|
+
url: string;
|
|
1101
|
+
subprotocols: string[];
|
|
1102
|
+
headers: Record<string, string>;
|
|
1103
|
+
send: Array<string | Uint8Array>;
|
|
1104
|
+
sendDelayMs: number;
|
|
1105
|
+
maxMessages: number;
|
|
1106
|
+
maxSessionMs: number;
|
|
1107
|
+
idleTimeoutMs: number;
|
|
1108
|
+
keepAlive?: {
|
|
1109
|
+
intervalMs: number;
|
|
1110
|
+
payload: string;
|
|
1111
|
+
};
|
|
1112
|
+
closeCode: number;
|
|
1113
|
+
closeReason: string;
|
|
1114
|
+
/** Grace period for the peer's close frame before the socket is destroyed. */
|
|
1115
|
+
closeTimeoutMs: number;
|
|
1116
|
+
rejectUnauthorized: boolean;
|
|
1117
|
+
maxPayloadBytes: number;
|
|
1118
|
+
clientOptions: Record<string, unknown>;
|
|
1119
|
+
}
|
|
1120
|
+
/**
|
|
1121
|
+
* Callback payload delivered as soon as response headers arrive. For HTTP
|
|
1122
|
+
* this is the moment the UI must decide how to render: a `streaming: true`
|
|
1123
|
+
* flag means SSE was detected (by content-type / declared intent) and events
|
|
1124
|
+
* will follow over `onEvent` — switch to the list view immediately instead of
|
|
1125
|
+
* waiting for the call to finish.
|
|
1126
|
+
*/
|
|
1127
|
+
interface ResponseStartInfo {
|
|
1128
|
+
status: number;
|
|
1129
|
+
headers: Record<string, string>;
|
|
1130
|
+
contentType?: string;
|
|
1131
|
+
/** True when the response was classified as SSE as soon as headers arrived. */
|
|
1132
|
+
streaming: boolean;
|
|
1133
|
+
/** "sse" when streaming, otherwise "http". */
|
|
1134
|
+
protocol: "http" | "sse";
|
|
1135
|
+
/** URL that was actually requested. */
|
|
1136
|
+
url: string;
|
|
1137
|
+
}
|
|
1138
|
+
interface SendOptions extends StreamParserOptions {
|
|
1139
|
+
/** The complete OpenAPI 3.2 document. */
|
|
1140
|
+
spec: OpenApiDocument;
|
|
1141
|
+
target: OperationTarget;
|
|
1142
|
+
values?: RequestValues;
|
|
1143
|
+
/** Overrides `spec.servers[0].url`. */
|
|
1144
|
+
serverUrl?: string;
|
|
1145
|
+
serverVariables?: Record<string, string>;
|
|
1146
|
+
/** Environment variables referenced as {{name}}. */
|
|
1147
|
+
variables?: Record<string, string>;
|
|
1148
|
+
globals?: Record<string, string>;
|
|
1149
|
+
localVariables?: Record<string, string>;
|
|
1150
|
+
auth?: AuthConfig;
|
|
1151
|
+
scripts?: ScriptConfig;
|
|
1152
|
+
/** Full postman-runtime option passthrough. Highest precedence. */
|
|
1153
|
+
runner?: RuntimeRunOptions;
|
|
1154
|
+
/** WebSocket options, used by the ws adapter. */
|
|
1155
|
+
websocket?: WebSocketOptions;
|
|
1156
|
+
/** GraphQL options, used by the graphql adapter. */
|
|
1157
|
+
graphql?: GraphQLOptions;
|
|
1158
|
+
/** MCP options, used by the mcp adapter. */
|
|
1159
|
+
mcp?: McpOptions;
|
|
1160
|
+
/** gRPC options, used by the gRPC adapter. */
|
|
1161
|
+
grpc?: any;
|
|
1162
|
+
/** Convenience shortcut, equivalent to runner.timeout.request. */
|
|
1163
|
+
timeout?: number;
|
|
1164
|
+
/** Maximum number of streaming events to retain. */
|
|
1165
|
+
maxEvents?: number;
|
|
1166
|
+
/** Maximum streaming duration before sampling stops. */
|
|
1167
|
+
maxStreamMs?: number;
|
|
1168
|
+
maxResponseSize?: number;
|
|
1169
|
+
/**
|
|
1170
|
+
* Controls the OpenAPI write-back step. Set to false to skip it and leave
|
|
1171
|
+
* `patchedSpec` undefined; `responseFragment` is produced either way.
|
|
1172
|
+
*/
|
|
1173
|
+
writeBack?: boolean;
|
|
1174
|
+
/** Cancels the run. Sampling stops and a partial result is still returned. */
|
|
1175
|
+
signal?: AbortSignal;
|
|
1176
|
+
/** Callbacks are invoked defensively: a throwing handler never aborts the call. */
|
|
1177
|
+
onEvent?: (event: StreamEvent) => void;
|
|
1178
|
+
onConsole?: (log: ConsoleLog) => void;
|
|
1179
|
+
onAssertion?: (assertion: AssertionResult) => void;
|
|
1180
|
+
/**
|
|
1181
|
+
* Fired as soon as the response starts (first bytes). `info.streaming`
|
|
1182
|
+
* is the early SSE classification the UI switches on.
|
|
1183
|
+
*/
|
|
1184
|
+
onResponseStart?: (info: ResponseStartInfo) => void;
|
|
1185
|
+
/** Fired when a WebSocket connection is established. */
|
|
1186
|
+
onOpen?: (info: {
|
|
1187
|
+
url: string;
|
|
1188
|
+
protocol?: string;
|
|
1189
|
+
headers: Record<string, string>;
|
|
1190
|
+
}) => void;
|
|
1191
|
+
}
|
|
1192
|
+
interface SendResult extends ExecResult {
|
|
1193
|
+
/** The generated Postman collection (v2.1). Empty for non-HTTP protocols. */
|
|
1194
|
+
collection?: any;
|
|
1195
|
+
/** The generated Postman environment. */
|
|
1196
|
+
environment?: any;
|
|
1197
|
+
/** OpenAPI 3.2 Response Object derived from the live call. */
|
|
1198
|
+
responseFragment: any;
|
|
1199
|
+
/** Status code the fragment was filed under. */
|
|
1200
|
+
responseStatusCode: string;
|
|
1201
|
+
/** Deep copy of the spec with the response merged in. Undefined when skipped. */
|
|
1202
|
+
patchedSpec?: OpenApiDocument;
|
|
1203
|
+
/** Explains why write-back did not happen. */
|
|
1204
|
+
writeBackSkippedReason?: string;
|
|
1205
|
+
}
|
|
1206
|
+
/**
|
|
1207
|
+
* Discriminated union accepted by `createManualSession()`. The `kind` field
|
|
1208
|
+
* routes to the right protocol factory; every branch is a superset of that
|
|
1209
|
+
* factory's own options.
|
|
1210
|
+
*/
|
|
1211
|
+
type ManualSessionOptions = ({
|
|
1212
|
+
kind: "websocket";
|
|
1213
|
+
} & Omit<CreateWsManualSessionOptions, "url"> & {
|
|
1214
|
+
url: string;
|
|
1215
|
+
}) | ({
|
|
1216
|
+
kind: "grpc";
|
|
1217
|
+
} & GrpcManualSessionTarget) | ({
|
|
1218
|
+
kind: "mcp";
|
|
1219
|
+
} & Omit<McpManualSessionOptions, "transport">) | ({
|
|
1220
|
+
kind: "mcp";
|
|
1221
|
+
transport: "stdio";
|
|
1222
|
+
} & Omit<McpStdioSessionOptions, "transport">);
|
|
1223
|
+
/** The union of every concrete manual session. */
|
|
1224
|
+
type AnyManualSession = WsManualSession | McpManualSession | GrpcManualSession;
|
|
1225
|
+
|
|
1226
|
+
export { type ManualSession as $, type AnyManualSession as A, type GrpcMetadataInput as B, type Cloneable as C, type DiscoverAndWriteResult as D, type ExecResult as E, type GrpcMetadataOutput as F, type GrpcTarget as G, type GrpcMethodKind as H, type GrpcProtoFileSource as I, type Json as J, type GrpcReflectionSource as K, type GrpcResult as L, type ManualSessionOptions as M, type GrpcSendOptions as N, type OperationTarget as O, type ProtocolName as P, type GrpcStatus as Q, type GrpcStatusEvent as R, type SendResult as S, type GrpcStatusOrigin as T, type GrpcTlsOptions as U, type GrpcTruncatedReason as V, type InitializeSessionInit as W, type IntrospectedSchema as X, type IntrospectionResult as Y, type JsonRpcOutcome as Z, type ManualMessage as _, type SendOptions as a, type ManualSessionKind as a0, type McpCapability as a1, type McpDiscoveryResult as a2, type McpListing as a3, type McpManualSession as a4, type McpManualSessionOptions as a5, type McpOptions as a6, type McpPrompt as a7, type McpRequestOptions as a8, type McpResource as a9, type WebSocketSessionState as aA, type WriteGraphQLOptions as aB, type WsManualSession as aC, type WsSendOptions as aD, createEventHub as aE, toCloneable as aF, type McpSessionEvent as aa, type McpSessionState as ab, type McpStdioSessionOptions as ac, type McpTerminateOutcome as ad, type McpTool as ae, type McpTransport as af, type ReplayRecord as ag, type RequestValues as ah, type RequesterOptions as ai, type ResolvedGraphQLConfig as aj, type ResolvedMcpConfig as ak, type ResolvedWsConfig as al, type ResponseStartInfo as am, type RuntimeRunOptions as an, type ScriptConfig as ao, type ScriptOutcome as ap, type ScriptReport as aq, type SessionEventDTO as ar, type SessionState as as, type SessionSubscription as at, type StopReason as au, type StreamEvent as av, type StreamParserOptions as aw, UnifiedSession as ax, type WebSocketOptions as ay, type WebSocketSessionEvent as az, type OpenApiDocument as b, type ScriptSource as c, type GrpcEndpoint as d, type GrpcManualSessionTarget as e, type GrpcManualSession as f, type AssertionResult as g, type AuthConfig as h, type CloneableError as i, type ConsoleLog as j, type CreateWsManualSessionOptions as k, type GeneratedOperation as l, type GraphQLArg as m, type GraphQLFieldInfo as n, type GraphQLNamedType as o, type GraphQLOptions as p, type GraphQLTypeRef as q, type GrpcCredentialsOptions as r, type GrpcDescriptorSource as s, type GrpcDescriptorSourceKind as t, type GrpcEvent as u, type GrpcEventDirection as v, type GrpcManualSessionEvent as w, type GrpcManualSessionState as x, type GrpcMessageEvent as y, type GrpcMetadataEvent as z };
|