Commit graph

255 commits

Author SHA1 Message Date
Justin Spahr-Summers
f8e5faffaf
Merge pull request #120 from kalvinnchau/instruction-support
feat: add optional instructions field to server _oninitialize
2025-01-13 18:04:00 +00:00
Kalvin Chau
1bb51d0fca style: remove private getter for getInstructions 2025-01-13 09:50:02 -08:00
Kalvin Chau
54472d2ae1 feat: add optional instructions field to server _oninitialize 2025-01-13 09:09:05 -08:00
Justin Spahr-Summers
29d08ff801
Merge pull request #110 from ycjcl868/fix/module-format
fix: add cjs format support
2025-01-10 10:19:31 +00:00
Justin Spahr-Summers
00c7ab0f9d
Bump version 1.1.1 2025-01-10 10:17:07 +00:00
Charles
b2b1920c8b
Merge branch 'main' into fix/module-format 2025-01-09 18:26:07 +08:00
Jerome
e72ff8d97f
Merge pull request #115 from modelcontextprotocol/jerome/fix/clean-stdio-shutdown
Added clean shutdown + tests
2025-01-08 18:07:28 +00:00
Charles
aca6164cde
Merge branch 'main' into fix/module-format 2025-01-08 10:28:40 +08:00
Justin Spahr-Summers
278cfb1de1
Merge pull request #114 from modelcontextprotocol/justin/improve-type-inference
Improve type inference from Zod schemas
2025-01-06 21:43:48 +00:00
Justin Spahr-Summers
0c5d6c4f18
Missed one 2025-01-06 21:37:30 +00:00
Jerome
a2157dcbd4
Removed unneeded test 2025-01-03 19:09:11 +00:00
Jerome
8a077474a6
Pause stdin if we were the only listeners to the data events 2025-01-03 19:05:38 +00:00
Jerome
6ebf67ea73
Don't remove drain listeners 2025-01-03 18:47:07 +00:00
ycjcl868
7d274d3f8e fix: support cjs 2025-01-04 00:58:01 +08:00
Jerome
7c91349363
Added clean shutdown + tests 2025-01-03 16:29:06 +00:00
Justin Spahr-Summers
b5711be1ad
Can just reuse z.infer instead of using ReturnType 2025-01-03 14:01:17 +00:00
Justin Spahr-Summers
73ea68cf13
Disable ESLint warning 2025-01-03 13:49:07 +00:00
Justin Spahr-Summers
160337cb3e
Update package-lock.json 2025-01-03 13:48:31 +00:00
Justin Spahr-Summers
9b5efc4286
Recursively flatten types for better inference 2025-01-03 13:47:19 +00:00
ycjcl868
0509dabb80 chore: not bundle deps 2025-01-03 21:39:16 +08:00
Charles
0e76d4469e
Merge branch 'main' into fix/module-format 2025-01-03 21:31:48 +08:00
Justin Spahr-Summers
3f178b2b7e
Bump version 1.1.0 2025-01-03 08:59:21 +00:00
Justin Spahr-Summers
2fd4e3555e
Merge pull request #103 from sumitesh9/sumiteshn9/fix-error-codes
Updates SDK error codes to use JSON-RPC server error range
2025-01-03 08:58:02 +00:00
Sumitesh Naithani
ca319138b9 chore: pulled upstream origin branch 2025-01-03 07:36:18 +05:30
Sumitesh Naithani
21e3d465ca chore: updated documentation comment in ErrorCode enum and set protocol test timeout to 0 2025-01-03 06:59:01 +05:30
Justin Spahr-Summers
4658fd01a9
Merge pull request #109 from chrisdickinson/chris/20241230-add-eventsourceinit
feat(client/sse): add {EventSource,Request}Init options param
2025-01-02 14:39:10 +00:00
Justin Spahr-Summers
f7a47cde6c
Merge pull request #100 from TheFloatingString/main
Add missing imports in `README.md` example
2025-01-02 14:24:47 +00:00
ycjcl868
d207cc45ad chore: remove type module 2024-12-31 16:22:52 +08:00
ycjcl868
f27ec9db5d fix: add cjs format support 2024-12-31 16:19:20 +08:00
Chris Dickinson
d55f966562
feat(client/sse): add {EventSource,Request}Init options param
This enables users of the SSE client to optionally send cookie-based credentials
to the event source MCP server using `EventSourceInit` [1] parameters and set
the outgoing request headers for the POST call.

[1]: https://developer.mozilla.org/en-US/docs/Web/API/EventSource/EventSource#options
2024-12-30 23:11:00 -08:00
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
Sumitesh Naithani
d77cd0deb3 style: fixed linting issues 2024-12-22 23:20:35 +05:30
Sumitesh Naithani
e7d08c738e fix(protocol): restrict SDK error codes to JSON-RPC server error range
The SDK's custom error codes were previously using arbitrary negative numbers
(-1, -2) which could conflict with application-specific error codes. This change:

- Updates ConnectionClosed from -1 to -32000
- Updates RequestTimeout from -2 to -32001
- Keeps standard JSON-RPC error codes unchanged
- Adds documentation explaining the server error range usage

This modification ensures compliance with the JSON-RPC 2.0 specification, which
reserves -32000 to -32099 for implementation-defined server errors. This change
allows applications to freely use other error code ranges without potential
conflicts with SDK-generated errors.

Issue: #85
2024-12-22 23:12:22 +05:30
Laurence Liang
2ef54d3b5d
Add missing imports 2024-12-18 15:11:02 -05:00
Justin Spahr-Summers
3164da64d0
Merge pull request #94 from nekomeowww/dev/exclude-tests
chore: satisfies npm-pkg-lint & publint
2024-12-17 16:50:54 +00:00
Neko Ayaka
70ee403fce
chore: adjust node version 2024-12-17 11:31:35 +08:00
Jerome
422a5359ee
Merge pull request #98 from modelcontextprotocol/jerome/fix/propagate-notification-params 1.0.4
fix: propagate notification params
2024-12-16 17:56:31 +00:00
Jerome
7865fcf4ed
Bumped version 2024-12-16 16:51:51 +00:00
Jerome
881a0ce0e8
Destructured progress and total from notification params object 2024-12-16 16:50:05 +00:00
Neko Ayaka
5403cad0dd
chore: satisfies npm-pkg-lint & publint
Co-authored-by: 藍+85CD <50108258+kwaa@users.noreply.github.com>
2024-12-15 15:16:47 +08:00
Justin Spahr-Summers
2a3cab20e6
Merge pull request #93 from nekomeowww/dev/package-lock-update
chore: bump outdated versions in package-lock.json
2024-12-13 13:42:31 +00:00
Neko Ayaka
6c11a9aa24
chore: bump outdated versions in package-lock.json 2024-12-12 18:53:08 +08:00
Justin Spahr-Summers
22370be340
Merge pull request #81 from brn/main
Add a parsedBody optional parameter
2024-12-09 13:44:16 +00:00
Justin Spahr-Summers
1f835e044f
Whitespace tweaks 2024-12-09 13:43:17 +00:00
Taketoshi Aono
ecf50e4249
Merge branch 'main' into main 2024-12-06 13:25:49 +09: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
989550d5f8
Merge pull request #84 from modelcontextprotocol/revert-83-justin/remove-compatibility-tool-result 1.0.3
Revert "Remove `CompatibilityCallToolResult`"
2024-12-04 17:38:35 +00:00
Justin Spahr-Summers
620cb5cb52
Bump to 1.0.3 2024-12-04 17:19:00 +00:00
Justin Spahr-Summers
1962943b22
Revert "Remove CompatibilityCallToolResult" 2024-12-04 17:09:31 +00:00
Justin Spahr-Summers
45af3820fa
Bump version 1.0.2 2024-12-04 14:15:39 +00:00