Skip to content

Commit 071f495

Browse files
docs(core): resolve typedoc link warnings for Protocol.* and DispatchMiddleware (treatWarningsAsErrors)
1 parent 17aef09 commit 071f495

3 files changed

Lines changed: 16 additions & 5 deletions

File tree

packages/core/src/exports/public/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ export { checkResourceAllowed, resourceUrlFromServerUrl } from '../../shared/aut
3838
// Metadata utilities
3939
export { getDisplayName } from '../../shared/metadataUtils.js';
4040

41+
// Dispatcher types referenced by public `use()` method (NOT the Dispatcher class itself)
42+
export type { DispatchMiddleware } from '../../shared/dispatcher.js';
43+
4144
// Protocol types (NOT the Protocol class itself or mergeCapabilities)
4245
export type {
4346
BaseContext,

packages/core/src/shared/context.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export type ProgressCallback = (progress: Progress) => void;
3232
export type ProtocolOptions = {
3333
/**
3434
* Protocol versions supported. First version is preferred (sent by client,
35-
* used as fallback by server). Passed to transport during {@linkcode Protocol.connect | connect()}.
35+
* used as fallback by server). Passed to transport during `connect()`.
3636
*
3737
* @default {@linkcode SUPPORTED_PROTOCOL_VERSIONS}
3838
*/
@@ -70,12 +70,12 @@ export type RequestOptions = {
7070
onprogress?: ProgressCallback;
7171

7272
/**
73-
* Can be used to cancel an in-flight request. This will cause an `AbortError` to be raised from {@linkcode Protocol.request | request()}.
73+
* Can be used to cancel an in-flight request. This will cause an `AbortError` to be raised from `request()`.
7474
*/
7575
signal?: AbortSignal;
7676

7777
/**
78-
* A timeout (in milliseconds) for this request. If exceeded, an {@linkcode SdkError} with code {@linkcode SdkErrorCode.RequestTimeout} will be raised from {@linkcode Protocol.request | request()}.
78+
* A timeout (in milliseconds) for this request. If exceeded, an {@linkcode SdkError} with code {@linkcode SdkErrorCode.RequestTimeout} will be raised from `request()`.
7979
*
8080
* If not specified, {@linkcode DEFAULT_REQUEST_TIMEOUT_MSEC} will be used as the timeout.
8181
*/
@@ -298,7 +298,7 @@ export interface Outbound {
298298
}
299299

300300
/**
301-
* Schema bundle accepted by {@linkcode Protocol.setRequestHandler | setRequestHandler}'s 3-arg form.
301+
* Schema bundle accepted by `setRequestHandler`'s 3-arg form.
302302
*
303303
* `params` is required and validates the inbound `request.params`. `result` is optional;
304304
* when supplied it types the handler's return value (no runtime validation is performed

typedoc.config.mjs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,15 @@ export default {
5050
externalSymbolLinkMappings: {
5151
'@modelcontextprotocol/core': {
5252
StandardSchemaV1: 'https://standardschema.dev/',
53-
StandardJSONSchemaV1: 'https://standardschema.dev/'
53+
StandardJSONSchemaV1: 'https://standardschema.dev/',
54+
// Internal types referenced from public-facing JSDoc. Dispatcher/StreamDriver/
55+
// RequestEnv stay private; mapping to '#' renders the link as plain text without
56+
// typedoc treating the unresolved reference as an error.
57+
Dispatcher: '#',
58+
'Dispatcher.dispatch': '#',
59+
'Dispatcher.use': '#',
60+
RequestEnv: '#',
61+
StreamDriver: '#'
5462
}
5563
}
5664
};

0 commit comments

Comments
 (0)