Commit graph typescript-sdk/src/server
Author SHA1 Message Date
Justin Spahr-Summers
5ddfa0a0d9
Add extra to resource request handlers 2025-01-08 14:20:43 +00:00
Justin Spahr-Summers
f090c93127
Move Server helper definitions to bottom of file 2025-01-08 13:47:38 +00:00
Justin Spahr-Summers
8356cb900c
Create ResourceTemplate class and move listCallback into it 2025-01-08 13:44:12 +00:00
Justin Spahr-Summers
45f99e6590
Make Variables non-optional with resource template URIs 2025-01-07 22:36:20 +00:00
Justin Spahr-Summers
3f9acec31e
Add a test for listCallback 2025-01-07 22:10:05 +00:00
Justin Spahr-Summers
1970509131
Method documentation 2025-01-07 22:05:55 +00:00
Justin Spahr-Summers
098266ae22
Add simplified API for registering resources and resource templates 2025-01-07 22:01:41 +00:00
Justin Spahr-Summers
bb28c9b519
Minor tweak to make test code more idiomatic 2025-01-07 15:57:10 +00:00
Justin Spahr-Summers
aac1959855
Errors invoking tools should be erroneous tool results, not McpErrors 2025-01-07 14:53:56 +00:00
Justin Spahr-Summers
ff22f255ad
Tests for Server.tool 2025-01-07 14:44:23 +00:00
Justin Spahr-Summers
b538731af0
Fix string type check 2025-01-07 14:40:53 +00:00
Justin Spahr-Summers
7ac5a5fcf5
Automatically register tools capability 2025-01-07 14:34:00 +00:00
Justin Spahr-Summers
1506bd1b51
Allow capabilities to be dynamically registered after initialization 2025-01-07 14:34:00 +00:00
Justin Spahr-Summers
4bf5c5358a
Assert tool request handlers do not already exist 2025-01-07 14:34:00 +00:00
Justin Spahr-Summers
f8f5686966
Server.tool() convenience API 2025-01-07 14:33:56 +00:00
Justin Spahr-Summers
1f835e044f
Whitespace tweaks 2024-12-09 13:43:17 +00:00
brn
6535f93f2d feat: Add a parsedBody optional parameter
Please enter the commit message for your changes. Lines starting
2024-12-05 13:18:52 +09:00
Justin Spahr-Summers
437a870029
Tests for request timeout 2024-11-16 16:37:24 +00:00
Justin Spahr-Summers
6ec4c09325
Add tests for issuing cancellation notifications 2024-11-14 14:11:11 +00:00
Justin Spahr-Summers
1451d0ea24
Explicitly allow cancelled notifications without any capability 2024-11-14 14:07:28 +00:00
Justin Spahr-Summers
54d146bbdc
Support passing an AbortSignal to request() 2024-11-14 13:42:18 +00:00
Justin Spahr-Summers
8b307a5d62
Check capabilities when request handlers are set 2024-11-12 12:16:43 +00:00
Justin Spahr-Summers
64c2862883
Check and add tests for notification capabilities too 2024-11-12 12:02:10 +00:00
Justin Spahr-Summers
dc45f5d148
Handle capabilities checks at the request() level, make non-strict by default 2024-11-12 10:57:59 +00:00
Justin Spahr-Summers
8e369b7171
Lint 2024-11-11 22:49:53 +00:00
Justin Spahr-Summers
7ab5880569
Use explicit capabilities lists for now 2024-11-11 22:38:43 +00:00
Justin Spahr-Summers
90e91cdd62
Tests and assertions for client/server capabilities
Resolves #45.
2024-11-11 22:30:50 +00:00
Justin Spahr-Summers
8ea66e7df9
Tests for protocol version negotiation
Resolves #44.
2024-11-11 22:05:13 +00:00
Justin Spahr-Summers
b618157c93
Continue allowing 2024-10-07 in version negotiation 2024-11-07 13:00:52 +00:00
Justin Spahr-Summers
099c2e2be3
Update client and server convenience methods 2024-11-06 11:46:55 +00:00
Justin Spahr-Summers
12c92341b4
Support onprogress callbacks 2024-11-04 22:38:10 +00:00
Justin Spahr-Summers
a9b6ae6679
Convenience methods for Server 2024-11-04 22:38:10 +00:00
Justin Spahr-Summers
f5fa3cf8e3
Oops, ignore more lints 2024-11-04 21:22:05 +00:00
Justin Spahr-Summers
2026260668
Wrap into one test (required) 2024-11-04 21:12:17 +00:00
Justin Spahr-Summers
9774e2fdfe
Disable unused vars lint 2024-11-04 21:10:35 +00:00
Justin Spahr-Summers
b5880ec18a
Support custom server request, notification, and result types 2024-11-04 21:07:53 +00:00
Justin Spahr-Summers
4cf8dd316e
Lint 2024-10-21 12:40:29 +01:00
Justin Spahr-Summers
9dc6c9c9e0
Had to inline getCapability(), wouldn't pass typechecking otherwise 2024-10-21 12:36:50 +01:00
Justin Spahr-Summers
be9c1fe9c8
Merge branch 'main' into justin/fix-race-condition 2024-10-16 18:23:48 +01:00
Justin Spahr-Summers
7b718de77c
Report errors when start() is called multiple times 2024-10-16 13:14:47 +01:00
Ashwin Bhat
bcb4b219ee
add server capabilities derivation 2024-10-15 17:08:08 -07:00
Justin Spahr-Summers
2b0599e163
Update server SSE transport 2024-10-11 16:49:22 +01:00
Justin Spahr-Summers
42fbfe2ff4
Update Protocol type inference 2024-10-02 22:01:49 +01:00
Justin Spahr-Summers
3ea255f088
Use Zod for message validation at transport layer 2024-10-02 15:06:30 +01:00
Justin Spahr-Summers
3786c88960
Combine types into one file 2024-10-02 14:17:31 +01:00
Justin Spahr-Summers
1cb6869681
Fix error handling 2024-09-27 11:25:12 +01:00
Justin Spahr-Summers
81b40e5608
Add SSEServerTransport.handleMessage bypass 2024-09-27 11:14:59 +01:00
David Soria Parra
02e421c1f1
Initial import 2024-09-24 21:53:34 +01:00