Skip to content

Commit 4e60a96

Browse files
authored
Return the nanonext socket invisibly (follow-up to #72) (#74)
1 parent 5f2ec35 commit 4e60a96

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

NEWS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# mcptools (development version)
22

3-
* `mcp_session()` now (invisibly) returns the nanonext socket used for communicating with the server.
3+
* `mcp_session()` now returns invisibly the nanonext socket used for communicating with the server.
44
* `mcp_server()` gains logical argument `session_tools`, allowing users to opt-out of presenting R sessions tools to clients.
55

66
# mcptools 0.1.1

R/server.R

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,9 @@
6767
#' * `mcp_server()` blocks the R process it's called in indefinitely and isn't
6868
#' intended for interactive use.
6969
#' * `mcp_session()` makes the interactive R session it's called in available to
70-
#' MCP servers. It returns the \pkg{nanonext} socket used for communicating
71-
#' with the server. Call [close()] on the socket to stop the session.
70+
#' MCP servers. It returns invisibly the \pkg{nanonext} socket used for
71+
#' communicating with the server. Call [close()] on the socket to stop the
72+
#' session.
7273
#'
7374
#' @seealso
7475
#' - The "R as an MCP server" vignette at

R/session.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ mcp_session <- function() {
2525
the$session <- i
2626
schedule_handle_message_from_server()
2727

28-
the$session_socket
28+
invisible(the$session_socket)
2929
}
3030

3131
handle_message_from_server <- function(data) {

man/server.Rd

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)