mirror of
https://github.com/modelcontextprotocol/servers.git
synced 2026-04-21 05:15:21 +02:00
[WIP] Refactor everything server to be more modular and use recommended APIs.
Finalized Roots list changed handling and initial request. Final fit and finish work.
* Updated architecture.md
- Added links to other docs
- Refactor/extracted sections into extension.md, features.md, how-it-works.md, startup.md, and structure.md
* Removed everything.ts
- all features are ported
* In roots.ts
- refactor/renaned setRootsListChangedHandler to syncRoots
- refactor handler logic to requestRoots function
- Calls for roots list directly to get initial list
* In server/index.ts
- import setRootsListChangedHandler
- in clientConnected callback
- call setRootsListChangedHandler passing server and sessionId
* In sse.ts, stdio.ts, and streamableHttp.ts
- update inline and function docs
* In index.ts,
- updated usage output
* In server/index.ts
- refactor/extracted readInstructions to resources/index.ts
- defined ServerFactoryResponse response type
This commit is contained in:
@@ -55,7 +55,7 @@ export const beginSimulatedLogging = (
|
||||
// Send once immediately
|
||||
sendSimulatedLoggingMessage(sessionId);
|
||||
|
||||
// Sen
|
||||
// Send a randomly-leveled log message every 5 seconds
|
||||
logsUpdateIntervals.set(
|
||||
sessionId,
|
||||
setInterval(() => sendSimulatedLoggingMessage(sessionId), 5000)
|
||||
|
||||
Reference in New Issue
Block a user