Jonathan Amsterdam
19d58e6955
internal/mcp: simplify session type params
...
Write a separate constraint for ClientSession | ServerSession,
and change the pointerness of the type parameter.
There is still a dynamic cast, but overall I think this is a bit
simpler:
- The exported types have the more readable constraint "Session"
instead of "ClientSession | ServerSession".
- We can put the unexported methods in Session instead of needing a
separate interface (previously "session").
- This CL enables a simplified treatment of sending middleware, in
the next CL.
Change-Id: I41184fe93ea201d1da29dbfba26ac59f93771277
Reviewed-on: https://go-review.googlesource.com/c/tools/+/676175
Reviewed-by: Sam Thanawalla <samthanawalla@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Robert Findley <rfindley@google.com>
2025-06-02 10:51:53 -07:00
..
testdata
internal/mcp: handle synthetic responses in conformance test
2025-05-30 08:16:23 -07:00
client.go
internal/mcp: simplify session type params
2025-06-02 10:51:53 -07:00
client_test.go
internal/mcp: add a test for complete mapping of CallToolParams fields
2025-06-02 08:52:53 -07:00
cmd.go
internal/mcp: add a command transport for connecting to a sidecar
2025-05-01 17:43:04 -07:00
cmd_test.go
internal/mcp: add missing testenv.NeedsExec
2025-06-02 09:02:16 -07:00
conformance_test.go
internal/mcp: handle synthetic responses in conformance test
2025-05-30 08:16:23 -07:00
content.go
all: fix some function names and typos in comment
2025-05-23 10:44:52 -07:00
content_test.go
internal/mcp: pointerize all the things
2025-05-14 06:22:56 -07:00
features.go
internal/mcp: keep an ordered list of feature keys
2025-05-20 13:37:12 -07:00
features_test.go
internal/mcp: generic handling of CallToolParams
2025-06-02 07:45:36 -07:00
generate.go
internal/mcp: generic handling of CallToolParams
2025-06-02 07:45:36 -07:00
logging.go
internal/mcp: implement logging
2025-05-22 15:02:13 -07:00
mcp.go
internal/mcp: construct README with weave
2025-05-21 16:21:26 -07:00
mcp_test.go
internal/mcp: simplify session type params
2025-06-02 10:51:53 -07:00
prompt.go
internal/mcp: future-proof prompt handling
2025-05-22 15:06:03 -07:00
prompt_test.go
internal/mcp: future-proof prompt handling
2025-05-22 15:06:03 -07:00
protocol.go
internal/mcp: generic handling of CallToolParams
2025-06-02 07:45:36 -07:00
resource.go
internal/mcp: sampling
2025-05-19 11:15:58 -07:00
resource_go124.go
internal/mcp: add the FileResourceHandler method
2025-05-19 11:15:23 -07:00
resource_pre_go124.go
internal/mcp: add the FileResourceHandler method
2025-05-19 11:15:23 -07:00
resource_test.go
internal/mcp: add the FileResourceHandler method
2025-05-19 11:15:23 -07:00
root.go
internal/mcp: implement roots
2025-05-13 07:52:49 -07:00
server.go
internal/mcp: simplify session type params
2025-06-02 10:51:53 -07:00
server_example_test.go
internal/mcp: generic handling of CallToolParams
2025-06-02 07:45:36 -07:00
server_test.go
internal/mcp: add iterator methods resources and prompts
2025-06-02 07:39:08 -07:00
shared.go
internal/mcp: simplify session type params
2025-06-02 10:51:53 -07:00
shared_test.go
internal/mcp: meta and progress token
2025-05-27 12:53:53 -07:00
sse.go
all: fix some function names and typos in comment
2025-05-23 10:44:52 -07:00
sse_example_test.go
internal/mcp: generic handling of CallToolParams
2025-06-02 07:45:36 -07:00
sse_test.go
internal/mcp: generic handling of CallToolParams
2025-06-02 07:45:36 -07:00
tool.go
internal/mcp: generic handling of CallToolParams
2025-06-02 07:45:36 -07:00
tool_test.go
internal/mcp: generic handling of CallToolParams
2025-06-02 07:45:36 -07:00
transport.go
internal/mcp: generic handling of CallToolParams
2025-06-02 07:45:36 -07:00
transport_test.go
internal/mcp: implement HTTP SSE transport
2025-04-23 19:15:20 -07:00
util.go
internal/mcp: meta and progress token
2025-05-27 12:53:53 -07:00
util_test.go
internal/mcp: meta and progress token
2025-05-27 12:53:53 -07:00