@fitzzero/quickdraw-core 5.1.1 → 5.1.3
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 +1308 -219
- package/dist/{admin-DKwkIh5i.d.ts → admin-CS7JB_UH.d.ts} +2 -2
- package/dist/{adminSchemas-2DUA_hZ8.d.ts → adminSchemas-29cGgrg5.d.ts} +6 -4
- package/dist/{auth-BhWqdyb-.d.ts → auth-DtdYjrZ9.d.ts} +51 -21
- package/dist/{caller-CXTFswBO.d.ts → caller-BTwGl7vm.d.ts} +296 -33
- package/dist/chunk-2FDSKLBO.js +82 -0
- package/dist/chunk-2FDSKLBO.js.map +1 -0
- package/dist/{chunk-RT6OILOI.js → chunk-4D2DOGAW.js} +2 -14
- package/dist/chunk-4D2DOGAW.js.map +1 -0
- package/dist/{chunk-OECZPRPW.js → chunk-64I6MYBC.js} +162 -775
- package/dist/chunk-64I6MYBC.js.map +1 -0
- package/dist/chunk-7473HK24.js +17 -0
- package/dist/chunk-7473HK24.js.map +1 -0
- package/dist/chunk-7Y5ROPXL.js +33 -0
- package/dist/chunk-7Y5ROPXL.js.map +1 -0
- package/dist/chunk-A2RBQD66.js +7 -0
- package/dist/chunk-A2RBQD66.js.map +1 -0
- package/dist/chunk-AK23XSWD.js +16 -0
- package/dist/chunk-AK23XSWD.js.map +1 -0
- package/dist/chunk-ASAMUGHG.js +651 -0
- package/dist/chunk-ASAMUGHG.js.map +1 -0
- package/dist/{chunk-B2P7AZ25.js → chunk-CYE4UBOB.js} +6 -4
- package/dist/chunk-CYE4UBOB.js.map +1 -0
- package/dist/chunk-DKE6QO26.js +136 -0
- package/dist/chunk-DKE6QO26.js.map +1 -0
- package/dist/chunk-DNP65TD5.js +832 -0
- package/dist/chunk-DNP65TD5.js.map +1 -0
- package/dist/{chunk-H23KEFBA.js → chunk-DUBU3BB3.js} +30 -1
- package/dist/chunk-DUBU3BB3.js.map +1 -0
- package/dist/chunk-GYLWEJHW.js +19 -0
- package/dist/chunk-GYLWEJHW.js.map +1 -0
- package/dist/{chunk-SHEGLZEP.js → chunk-I3JCFS7H.js} +34 -13
- package/dist/chunk-I3JCFS7H.js.map +1 -0
- package/dist/{chunk-X5CWPX7H.js → chunk-IIQ3WMJK.js} +13 -2
- package/dist/chunk-IIQ3WMJK.js.map +1 -0
- package/dist/{chunk-RZTP4IEW.js → chunk-JVTONQFI.js} +6339 -4226
- package/dist/chunk-JVTONQFI.js.map +1 -0
- package/dist/{chunk-QEKVYG5F.js → chunk-KKQANRLG.js} +2 -2
- package/dist/chunk-KKQANRLG.js.map +1 -0
- package/dist/{chunk-CDKG4TFA.js → chunk-MPQAT55F.js} +38 -205
- package/dist/chunk-MPQAT55F.js.map +1 -0
- package/dist/chunk-NO4M6PO5.js +101 -0
- package/dist/chunk-NO4M6PO5.js.map +1 -0
- package/dist/{chunk-TBMKJ26R.js → chunk-NW6U45HX.js} +3 -1
- package/dist/chunk-NW6U45HX.js.map +1 -0
- package/dist/chunk-NX2V6SIL.js +202 -0
- package/dist/chunk-NX2V6SIL.js.map +1 -0
- package/dist/{chunk-ZIVPHYRG.js → chunk-NZHA4TZD.js} +72 -175
- package/dist/chunk-NZHA4TZD.js.map +1 -0
- package/dist/{chunk-2PWMUVC7.js → chunk-OCZJ4EYV.js} +518 -27
- package/dist/chunk-OCZJ4EYV.js.map +1 -0
- package/dist/{chunk-REX5YPHX.js → chunk-PHCURHC7.js} +76 -21
- package/dist/chunk-PHCURHC7.js.map +1 -0
- package/dist/{chunk-4YO5H5ON.js → chunk-Q4OGQM5I.js} +4 -10
- package/dist/chunk-Q4OGQM5I.js.map +1 -0
- package/dist/chunk-QSU47XEX.js +13 -0
- package/dist/chunk-QSU47XEX.js.map +1 -0
- package/dist/{chunk-DD4SKCNO.js → chunk-RZXJTDH5.js} +13 -2
- package/dist/chunk-RZXJTDH5.js.map +1 -0
- package/dist/{chunk-Z2LZ7IZ7.js → chunk-SN3OZVEQ.js} +5 -31
- package/dist/chunk-SN3OZVEQ.js.map +1 -0
- package/dist/{chunk-4DIQHASK.js → chunk-SQ5VUG77.js} +28 -8
- package/dist/chunk-SQ5VUG77.js.map +1 -0
- package/dist/chunk-STH5DLQP.js +1192 -0
- package/dist/chunk-STH5DLQP.js.map +1 -0
- package/dist/{chunk-QCHKWIRS.js → chunk-VZFJTKIW.js} +13 -13
- package/dist/{chunk-QCHKWIRS.js.map → chunk-VZFJTKIW.js.map} +1 -1
- package/dist/{chunk-VSQBHPWH.js → chunk-X4ZU4QH5.js} +54 -22
- package/dist/chunk-X4ZU4QH5.js.map +1 -0
- package/dist/chunk-XD7SRDUY.js +188 -0
- package/dist/chunk-XD7SRDUY.js.map +1 -0
- package/dist/chunk-XH2IZVLT.js +62 -0
- package/dist/chunk-XH2IZVLT.js.map +1 -0
- package/dist/chunk-Z7I6SONO.js +825 -0
- package/dist/chunk-Z7I6SONO.js.map +1 -0
- package/dist/cli/quickdraw-docs.js +132 -112
- package/dist/cli/quickdraw-docs.js.map +1 -1
- package/dist/client/core.d.ts +387 -0
- package/dist/client/core.js +109 -0
- package/dist/client/index.d.ts +52 -203
- package/dist/client/index.js +59 -218
- package/dist/client/index.js.map +1 -1
- package/dist/{clientTypes-Bc-G8n-U.d.ts → clientTypes-CUUNJwWs.d.ts} +3 -3
- package/dist/{connection-Cr1BU07W.d.ts → connection-2EeQ_Et0.d.ts} +22 -11
- package/dist/{createServer-CP9eDHZZ.d.ts → createServer-Bx5HOcYK.d.ts} +67 -17
- package/dist/{createTestApp-UKVGEmOf.d.ts → createTestApp-DAMANT79.d.ts} +46 -13
- package/dist/{envelope-Cp3YcVxC.d.ts → envelope-BMBaxppV.d.ts} +216 -10
- package/dist/{http-Djj2Inuu.d.ts → http-YzLAar3w.d.ts} +76 -60
- package/dist/index.d.ts +8 -7
- package/dist/index.js +82 -25
- package/dist/index.js.map +1 -1
- package/dist/{infer-Teo1xpsd.d.ts → infer-Br62cnyW.d.ts} +82 -11
- package/dist/logger-Yz93KzdV.d.ts +30 -0
- package/dist/{metrics-BdBu5o8G.d.ts → metrics-CTVpw0gu.d.ts} +2 -2
- package/dist/origins-kvpxnVcW.d.ts +8 -0
- package/dist/parser.js +2 -1
- package/dist/prisma/index.d.ts +14 -7
- package/dist/prisma/index.js +279 -70
- package/dist/prisma/index.js.map +1 -1
- package/dist/{rateLimit-ZMIZJUZF.js → rateLimit-5RKBFLUR.js} +2 -2
- package/dist/rateLimit-5RKBFLUR.js.map +1 -0
- package/dist/remote-N7OUAGOW.js +15 -0
- package/dist/remote-N7OUAGOW.js.map +1 -0
- package/dist/server/auth/index.d.ts +82 -33
- package/dist/server/auth/index.js +277 -270
- package/dist/server/auth/index.js.map +1 -1
- package/dist/server/express/index.d.ts +9 -2
- package/dist/server/express/index.js +1 -1
- package/dist/server/index.d.ts +268 -84
- package/dist/server/index.js +664 -418
- package/dist/server/index.js.map +1 -1
- package/dist/server/mcp/index.d.ts +89 -27
- package/dist/server/mcp/index.js +281 -62
- package/dist/server/mcp/index.js.map +1 -1
- package/dist/server/otel.d.ts +3 -3
- package/dist/{sharing-DVa8W-yR.d.ts → sharing-BrsmlDv_.d.ts} +3 -3
- package/dist/testing/client.d.ts +14 -14
- package/dist/testing/client.js +19 -10
- package/dist/testing/client.js.map +1 -1
- package/dist/testing/index.d.ts +50 -13
- package/dist/testing/index.js +113 -21
- package/dist/testing/index.js.map +1 -1
- package/dist/testing/mock.d.ts +5 -5
- package/dist/testing/mock.js +17 -9
- package/dist/tracked-BR5b2O-U.d.ts +43 -0
- package/dist/{types-Cu0vmx7c.d.ts → types-CLRCQGnO.d.ts} +4 -3
- package/dist/types-tMagHbjy.d.ts +151 -0
- package/dist/utils/index.d.ts +16 -4
- package/dist/utils/index.js +6 -3
- package/package.json +5 -1
- package/dist/chunk-2PWMUVC7.js.map +0 -1
- package/dist/chunk-4DIQHASK.js.map +0 -1
- package/dist/chunk-4YO5H5ON.js.map +0 -1
- package/dist/chunk-B2P7AZ25.js.map +0 -1
- package/dist/chunk-CDKG4TFA.js.map +0 -1
- package/dist/chunk-DD4SKCNO.js.map +0 -1
- package/dist/chunk-H23KEFBA.js.map +0 -1
- package/dist/chunk-OECZPRPW.js.map +0 -1
- package/dist/chunk-QEKVYG5F.js.map +0 -1
- package/dist/chunk-REX5YPHX.js.map +0 -1
- package/dist/chunk-RT6OILOI.js.map +0 -1
- package/dist/chunk-RZTP4IEW.js.map +0 -1
- package/dist/chunk-SHEGLZEP.js.map +0 -1
- package/dist/chunk-TBMKJ26R.js.map +0 -1
- package/dist/chunk-VSQBHPWH.js.map +0 -1
- package/dist/chunk-X5CWPX7H.js.map +0 -1
- package/dist/chunk-YSWH776Y.js +0 -13
- package/dist/chunk-YSWH776Y.js.map +0 -1
- package/dist/chunk-Z2LZ7IZ7.js.map +0 -1
- package/dist/chunk-ZIVPHYRG.js.map +0 -1
- package/dist/logger-BY28acW-.d.ts +0 -16
- /package/dist/{rateLimit-ZMIZJUZF.js.map → client/core.js.map} +0 -0
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { A as AnyService, d as Caller } from '../../caller-
|
|
1
|
+
import { A as AnyService, d as Caller } from '../../caller-BTwGl7vm.js';
|
|
2
2
|
import { IncomingHttpHeaders, IncomingMessage } from 'node:http';
|
|
3
|
-
import { ap as MethodName, d as StandardSchemaV1, c as InferOutput } from '../../infer-
|
|
3
|
+
import { ap as MethodName, d as StandardSchemaV1, c as InferOutput } from '../../infer-Br62cnyW.js';
|
|
4
4
|
import { Q as QuickdrawError, a as ErrorCode } from '../../errors-S-bxEIBC.js';
|
|
5
|
-
import { P as PrincipalOfServices, C as ContractOfServices, D as Dispatcher, H as HttpRouter } from '../../http-
|
|
6
|
-
import {
|
|
7
|
-
import { L as Logger } from '../../logger-
|
|
8
|
-
import { A as AuthenticateResult } from '../../auth-
|
|
5
|
+
import { P as PrincipalOfServices, M as McpContextOfServices, C as ContractOfServices, D as Dispatcher, H as HttpRouter } from '../../http-YzLAar3w.js';
|
|
6
|
+
import { M as MaybePromise, P as Principal } from '../../types-CLRCQGnO.js';
|
|
7
|
+
import { L as Logger } from '../../logger-Yz93KzdV.js';
|
|
8
|
+
import { A as AuthenticateResult } from '../../auth-DtdYjrZ9.js';
|
|
9
9
|
import { Readable, Writable } from 'node:stream';
|
|
10
|
-
import '../../
|
|
11
|
-
import '../../
|
|
10
|
+
import { A as AllowedOrigin } from '../../origins-kvpxnVcW.js';
|
|
11
|
+
import '../../envelope-BMBaxppV.js';
|
|
12
|
+
import '../../metrics-CTVpw0gu.js';
|
|
12
13
|
import 'socket.io';
|
|
13
14
|
|
|
14
15
|
/** The JSON Schema of a tool's arguments. MCP requires an object schema. */
|
|
@@ -55,7 +56,12 @@ interface McpStdioRequest {
|
|
|
55
56
|
/** The session's id. Every call of the server carries the same one. */
|
|
56
57
|
readonly sessionId: string;
|
|
57
58
|
}
|
|
58
|
-
/**
|
|
59
|
+
/**
|
|
60
|
+
* What one request to the MCP HTTP routes stands for. Each request is a
|
|
61
|
+
* session of its own, and its queries share its caller's concurrency lane:
|
|
62
|
+
* its bearer token's, its user's without a token, or its address's when
|
|
63
|
+
* anonymous.
|
|
64
|
+
*/
|
|
59
65
|
interface McpHttpRequest {
|
|
60
66
|
readonly transport: "http";
|
|
61
67
|
readonly sessionId: string;
|
|
@@ -66,8 +72,7 @@ interface McpHttpRequest {
|
|
|
66
72
|
}
|
|
67
73
|
/** The session or request a tool call arrives on, as the registry's `principal` and `context` see it. */
|
|
68
74
|
type McpRequest = McpStdioRequest | McpHttpRequest;
|
|
69
|
-
|
|
70
|
-
type McpContextOfServices<S extends readonly AnyService[]> = [S[number]] extends [never] ? McpContext : McpContextOf<NonNullable<S[number]["~types"]>>;
|
|
75
|
+
|
|
71
76
|
/** How a tool call ended: what the tool returned, or why it failed. */
|
|
72
77
|
type McpCallResult = {
|
|
73
78
|
readonly ok: true;
|
|
@@ -93,6 +98,18 @@ interface McpToolResult {
|
|
|
93
98
|
interface McpCallOptions {
|
|
94
99
|
/** The session or request the call arrived on. */
|
|
95
100
|
readonly request: McpRequest;
|
|
101
|
+
/**
|
|
102
|
+
* Who the call acts for, when the app signed the caller in itself (its own
|
|
103
|
+
* MCP transport over `callMethod`, an in-process assistant): the
|
|
104
|
+
* registry's `principal` hook is not asked. `null` calls anonymously, and
|
|
105
|
+
* so does `undefined`: the hook is asked only when the key is absent. The
|
|
106
|
+
* `context` hook, bound arguments and the call's concurrency lane see this
|
|
107
|
+
* principal. One that carries no `serviceAccess` gets the grants the
|
|
108
|
+
* server's `auth.loadServiceAccess` loads, at each call, as `qd.caller`
|
|
109
|
+
* gives them; one that carries grants (`{}` included) keeps them. An
|
|
110
|
+
* in-process option: the HTTP routes never read it from a request.
|
|
111
|
+
*/
|
|
112
|
+
readonly principal?: Principal | null;
|
|
96
113
|
/** Cancels the call. Only queries stop early; a mutation runs to its end. */
|
|
97
114
|
readonly signal?: AbortSignal;
|
|
98
115
|
/**
|
|
@@ -119,8 +136,9 @@ interface McpToolCall<S extends readonly AnyService[] = readonly AnyService[], A
|
|
|
119
136
|
*/
|
|
120
137
|
readonly arguments: Args;
|
|
121
138
|
/**
|
|
122
|
-
* Who the call acts for, from the registry's `principal
|
|
123
|
-
* an anonymous caller of a
|
|
139
|
+
* Who the call acts for, from the registry's `principal` hook or the
|
|
140
|
+
* call's own `principal` option. `null` only for an anonymous caller of a
|
|
141
|
+
* tool with `access: "public"`.
|
|
124
142
|
*/
|
|
125
143
|
readonly principal: PrincipalOfServices<S> | null;
|
|
126
144
|
/** The fields the registry's `context` produced for the call, if any. */
|
|
@@ -176,6 +194,14 @@ interface McpCustomTool<S extends readonly AnyService[] = readonly AnyService[],
|
|
|
176
194
|
* `"public"` lets anonymous callers in, with `principal: null`.
|
|
177
195
|
*/
|
|
178
196
|
readonly access?: McpToolAccess;
|
|
197
|
+
/**
|
|
198
|
+
* The kinds of principal (`principal.kind`) that may call the tool, within
|
|
199
|
+
* the ones the app's `initQuickdraw({ kinds })` admits, which it admits by
|
|
200
|
+
* default: a caller of another kind gets `FORBIDDEN` before the arguments
|
|
201
|
+
* are read or the handler runs. A `"public"` tool takes none of its own (a
|
|
202
|
+
* caller of a refused kind could call it signed out).
|
|
203
|
+
*/
|
|
204
|
+
readonly kinds?: readonly NonNullable<PrincipalOfServices<S>["kind"]>[];
|
|
179
205
|
/**
|
|
180
206
|
* The tool's arguments. A Standard Schema that can describe itself as JSON
|
|
181
207
|
* Schema (Zod 4.2 or later) validates them before the handler runs; a JSON
|
|
@@ -219,7 +245,15 @@ interface McpRegistryOptions<S extends readonly AnyService[], Tools extends read
|
|
|
219
245
|
* anonymous caller, who may call `"public"` methods and `"public"` custom
|
|
220
246
|
* tools only. A stdio server usually reads a token from its environment;
|
|
221
247
|
* an HTTP request carries one as a bearer token. Throwing fails the call
|
|
222
|
-
* with `UNAUTHENTICATED
|
|
248
|
+
* with `UNAUTHENTICATED`: throw `QuickdrawError("UNAUTHENTICATED")` (or
|
|
249
|
+
* `FORBIDDEN`) to refuse a token, which is logged at debug, and never put
|
|
250
|
+
* the token in a message; anything else thrown is logged as an error.
|
|
251
|
+
* Without it every call is anonymous. An HTTP request's queries share the
|
|
252
|
+
* lane of its bearer token: a hook that authenticates by anything else (a
|
|
253
|
+
* cookie, an API key header) must refuse a request whose bearer token it
|
|
254
|
+
* does not verify, or a caller makes a lane per made-up token. A call
|
|
255
|
+
* whose options give `principal` (an app that signed the caller in
|
|
256
|
+
* itself) is not asked about.
|
|
223
257
|
*/
|
|
224
258
|
readonly principal?: (request: McpRequest) => MaybePromise<AuthenticateResult<PrincipalOfServices<S>>>;
|
|
225
259
|
/**
|
|
@@ -237,10 +271,15 @@ interface McpRegistryOptions<S extends readonly AnyService[], Tools extends read
|
|
|
237
271
|
* before the method runs when the caller is anonymous (`UNAUTHENTICATED`),
|
|
238
272
|
* or when the binder returns `undefined` or `null` or the caller sent the
|
|
239
273
|
* argument with another value (`FORBIDDEN`); a binder that throws fails it
|
|
240
|
-
* with `INTERNAL`, or with the code of a `QuickdrawError`.
|
|
241
|
-
*
|
|
242
|
-
*
|
|
243
|
-
*
|
|
274
|
+
* with `INTERNAL`, or with the code of a `QuickdrawError`. A call of any
|
|
275
|
+
* other method's tool that sends a bound argument is refused (`FORBIDDEN`).
|
|
276
|
+
* An input that is a `$ref` to an object counts as that object, and a
|
|
277
|
+
* bound key anywhere else in an input (in a union's or an intersection's
|
|
278
|
+
* branch, or an input that is no object) fails when the registry is built.
|
|
279
|
+
* Only top-level arguments are bound. Custom tools are never bound.
|
|
280
|
+
* Binding is not access control: the same principal reaches the method
|
|
281
|
+
* over a socket or HTTP with nothing bound, so the method's access must
|
|
282
|
+
* still confine it.
|
|
244
283
|
*/
|
|
245
284
|
readonly bind?: Readonly<Record<string, McpBinder<S>>>;
|
|
246
285
|
/** The app's own tools, listed after the generated ones. */
|
|
@@ -264,16 +303,18 @@ interface McpRegistry {
|
|
|
264
303
|
has(name: string): boolean;
|
|
265
304
|
/**
|
|
266
305
|
* Calls the tool `name` with the client's `args` in the session of
|
|
267
|
-
* `options.request
|
|
268
|
-
* unknown name is `NOT_FOUND`),
|
|
269
|
-
* Never rejects.
|
|
306
|
+
* `options.request`, as `options.principal` when it is given. Resolves
|
|
307
|
+
* with the tool's value or its failure (an unknown name is `NOT_FOUND`),
|
|
308
|
+
* after `options.respond` was given it. Never rejects.
|
|
270
309
|
*/
|
|
271
310
|
call(name: string, args: unknown, options: McpCallOptions): Promise<McpCallResult>;
|
|
272
311
|
/**
|
|
273
312
|
* Calls a method's tool by its service and method name with the method's
|
|
274
313
|
* `input` as it is, without the tool's argument mapping: the shape 4.1's
|
|
275
|
-
* HTTP route took. Bound arguments are filled as for `call
|
|
276
|
-
*
|
|
314
|
+
* HTTP route took. Bound arguments are filled as for `call`, and
|
|
315
|
+
* `options.principal` says who calls as for `call`: an app's own MCP
|
|
316
|
+
* transport over it passes the caller it signed in. A method that is not
|
|
317
|
+
* a tool is `NOT_FOUND`.
|
|
277
318
|
*/
|
|
278
319
|
callMethod(service: string, method: string, input: unknown, options: McpCallOptions): Promise<McpCallResult>;
|
|
279
320
|
}
|
|
@@ -282,9 +323,14 @@ interface McpRegistry {
|
|
|
282
323
|
* `customTools`, served by `dispatcher`. Throws at once when a method's
|
|
283
324
|
* input schema cannot describe itself as JSON Schema (use Zod 4.2 or later
|
|
284
325
|
* for it, or `exclude` the method), when two tools share a name, when the
|
|
285
|
-
* dispatcher does not serve one of the services,
|
|
286
|
-
* `bind` is in no tool's object input or
|
|
287
|
-
* object
|
|
326
|
+
* dispatcher does not serve one of the services, when an argument of
|
|
327
|
+
* `bind` is in no tool's object input or may be anywhere in an input where
|
|
328
|
+
* it cannot be filled (an input that is not an object schema, or a branch
|
|
329
|
+
* of a union or an intersection, behind a `$ref` too), or when custom tools
|
|
330
|
+
* are served beside the services of apps that admit no kind in common.
|
|
331
|
+
* Every call runs in its caller's concurrency lane: a stdio session, or on
|
|
332
|
+
* HTTP its bearer token, its user without a token, or its address when
|
|
333
|
+
* anonymous.
|
|
288
334
|
*
|
|
289
335
|
* @example
|
|
290
336
|
* const registry = createMcpRegistry({
|
|
@@ -381,6 +427,22 @@ interface McpHttpRouterOptions {
|
|
|
381
427
|
readonly maxBodyBytes?: number;
|
|
382
428
|
/** Default: the console. */
|
|
383
429
|
readonly logger?: Logger;
|
|
430
|
+
/**
|
|
431
|
+
* The web pages that may call the routes, by origin: exact origins
|
|
432
|
+
* (`"https://app.example.com"`) or patterns anchored with `^` and `$`, as
|
|
433
|
+
* `socketAuth` takes them. A request whose `Origin` is not listed gets 403;
|
|
434
|
+
* a request without one (an MCP client, a script) is not a page's and
|
|
435
|
+
* passes. Default: none, so no page may call them.
|
|
436
|
+
*/
|
|
437
|
+
readonly allowedOrigins?: readonly AllowedOrigin[];
|
|
438
|
+
/**
|
|
439
|
+
* The `Host` names the routes answer for (`"localhost"`, `"127.0.0.1"`,
|
|
440
|
+
* `"mcp.example.com:8443"`; an entry without a port matches any port): a
|
|
441
|
+
* request for another gets 403. Set it for a server on a developer's
|
|
442
|
+
* machine or a LAN, where a page could reach it through DNS rebinding.
|
|
443
|
+
* Default: any host.
|
|
444
|
+
*/
|
|
445
|
+
readonly allowedHosts?: readonly string[];
|
|
384
446
|
}
|
|
385
447
|
/** What `invoke` answers: 4.1's `{ success, data }`, or a failure's message, code and data. */
|
|
386
448
|
type McpHttpReply = {
|
|
@@ -406,4 +468,4 @@ type McpHttpReply = {
|
|
|
406
468
|
*/
|
|
407
469
|
declare function createMcpHttpRouter(options: McpHttpRouterOptions): HttpRouter;
|
|
408
470
|
|
|
409
|
-
export { type DescribeToolsOptions, MCP_PROTOCOL_VERSION, type McpBindCall, type McpBinder, type McpCallOptions, type McpCallResult,
|
|
471
|
+
export { type DescribeToolsOptions, MCP_PROTOCOL_VERSION, type McpBindCall, type McpBinder, type McpCallOptions, type McpCallResult, McpContextOfServices, type McpCustomTool, type McpHttpReply, type McpHttpRequest, type McpHttpRouterOptions, type McpInputSchema, type McpMethodRef, type McpRegistry, type McpRegistryOptions, type McpRequest, type McpStdioRequest, type McpStdioServer, type McpStdioServerOptions, type McpTextContent, type McpTool, type McpToolAccess, type McpToolAnnotations, type McpToolArguments, type McpToolCall, type McpToolInputSchema, type McpToolResult, bootstrapMcpServer, createMcpHttpRouter, createMcpRegistry, createMcpStdioServer, describeTools, toToolResult };
|