Skip to content

Commit 04d9133

Browse files
docs(core): add @remarks on Protocol subclassing stability
1 parent 5707536 commit 04d9133

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/core/src/shared/protocol.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,11 @@ export type SpecNotifications<SpecT extends ProtocolSpec> = string extends keyof
352352
* `Protocol` is abstract; `Client` and `Server` are the concrete role-specific implementations.
353353
* Subclasses (such as MCP-dialect protocols like MCP Apps) can supply a {@linkcode ProtocolSpec}
354354
* as the second type argument to get method-name autocomplete on their own vocabulary.
355+
*
356+
* @remarks
357+
* Subclassing `Protocol` directly is supported for MCP-dialect frameworks. The protected
358+
* surface (`buildContext`, `assertCapability*`, `_setRequestHandlerByMethod`) may evolve in
359+
* minor versions; prefer `Client`/`Server` unless you need a custom method vocabulary.
355360
*/
356361
export abstract class Protocol<ContextT extends BaseContext = BaseContext, SpecT extends ProtocolSpec = McpSpec> {
357362
private _transport?: Transport;

0 commit comments

Comments
 (0)