Commit graph typescript-sdk/src/shared
Author SHA1 Message Date
Sumitesh Naithani
8fa0a5c88b test: added tests for checking correct error codes are thrown on request timeout and connection closed scenarios 2024-12-23 00:10:14 +05:30
Jerome
881a0ce0e8
Destructured progress and total from notification params object 2024-12-16 16:50:05 +00:00
Eric Fritz
3d15050960
Fix cancellation notification mismatch
The server registers a notification handler on `CancelledNotificationSchema`, but is never called on client cancellation because of a mismatch in the method name. This fixes that mismatch.
2024-11-27 23:48:44 -06:00
Justin Spahr-Summers
35396f4a8d
Report errors sending cancellation 2024-11-16 16:31:45 +00:00
Justin Spahr-Summers
2cc3bc8a40
Add RequestOptions.timeout 2024-11-16 16:30:20 +00:00
Justin Spahr-Summers
53f55b8edf
Remove abortAfterTimeout
It's fundamentally flawed because it doesn't support easy cancellation of the timeout.
2024-11-16 16:18:35 +00:00
Justin Spahr-Summers
9882f1c919
Add abortAfterTimeout() utility to make it easy to add timeouts 2024-11-14 14:25:16 +00:00
Justin Spahr-Summers
1b08f203ea
Catch errors that occur when a handler is invoked, but before it returns a Promise 2024-11-14 14:02:51 +00:00
Justin Spahr-Summers
90ba8950d2
Pass an AbortSignal to request handlers 2024-11-14 13:57:04 +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
1f3dbef66c
Support old tools/call result structure, if explicitly opted in 2024-11-07 13:09:20 +00:00
Justin Spahr-Summers
a254ab7e46
Fix missing error codes 2024-11-01 14:47:48 +00:00
Justin Spahr-Summers
be9c1fe9c8
Merge branch 'main' into justin/fix-race-condition 2024-10-16 18:23:48 +01:00
Justin Spahr-Summers
83a43fda1e
Protocol.connect() can automatically call Transport.start() 2024-10-16 13:10:31 +01:00
Ashwin Bhat
bcb4b219ee
add server capabilities derivation 2024-10-15 17:08:08 -07:00
Justin Spahr-Summers
87ae7ffc5a
Add start() to Transport interface 2024-10-11 16:13:46 +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
cd6820e810
Use an enum for error codes 2024-10-02 14:51:55 +01:00
Justin Spahr-Summers
4be31d0f08
Remove explicit constants of method names, factor out ProgressSchema 2024-10-02 14:51:55 +01:00
Justin Spahr-Summers
3786c88960
Combine types into one file 2024-10-02 14:17:31 +01:00
David Soria Parra
02e421c1f1
Initial import 2024-09-24 21:53:34 +01:00