[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:
parent
cb073d877a
commit
9b25a3a41b
1 changed files with 581 additions and 1533 deletions
|
|
@ -21,8 +21,13 @@ async function run() {
|
|||
await import("./transports/streamableHttp.js");
|
||||
break;
|
||||
default:
|
||||
console.error(`Unknown script: ${scriptName}`);
|
||||
console.log("Available scripts:");
|
||||
console.error(`-`.repeat(53));
|
||||
console.error(` Everything Server Launcher`);
|
||||
console.error(` Usage: node ./index.js [stdio|sse|streamableHttp]`);
|
||||
console.error(` Default transport: stdio`);
|
||||
console.error(`-`.repeat(53));
|
||||
console.error(`Unknown transport: ${scriptName}`);
|
||||
console.log("Available transports:");
|
||||
console.log("- stdio");
|
||||
console.log("- sse");
|
||||
console.log("- streamableHttp");
|
||||
|
|
@ -34,4 +39,4 @@ async function run() {
|
|||
}
|
||||
}
|
||||
|
||||
run();
|
||||
await run();
|
||||
|
|
|
|||
Loading…
Reference in a new issue