MCPcopy Index your code
hub / github.com/github/copilot-sdk / _connect

Method _connect

python/copilot/generated/rpc.py:25594–25597  ·  view source on GitHub ↗

Performs the SDK server connection handshake and validates the optional connection token. Marked internal because this is JSON-RPC transport plumbing invoked automatically by an SDK client's own `connect()` wrapper, not a user-facing method. Stays internal as long as the SDK client owns the handshak

(self, params: _ConnectRequest, *, timeout: float | None = None)

Source from the content-addressed store, hash-verified

25592 self.sessions = _InternalServerSessionsApi(client)
25593
25594 async def _connect(self, params: _ConnectRequest, *, timeout: float | None = None) -> _ConnectResult:
25595 "Performs the SDK server connection handshake and validates the optional connection token. Marked internal because this is JSON-RPC transport plumbing invoked automatically by an SDK client's own `connect()` wrapper, not a user-facing method. Stays internal as long as the SDK client owns the handshake; would only become public if the SDK ever exposed the raw schema surface to consumers without a connection wrapper.\n\nArgs:\n params: Optional connection token presented by the SDK client during the handshake.\n\nReturns:\n Handshake result reporting the server's protocol version and package version on success.\n\n.. warning:: This API is experimental and may change or be removed in future versions.\n\n:meta private:\n\nInternal SDK API; not part of the public surface."
25596 params_dict = {k: v for k, v in params.to_dict().items() if v is not None}
25597 return _ConnectResult.from_dict(await self._client.request("connect", params_dict, **_timeout_kwargs(timeout)))
25598
25599
25600# Experimental: this API group is experimental and may change or be removed.

Callers 1

Calls 4

_timeout_kwargsFunction · 0.85
to_dictMethod · 0.45
from_dictMethod · 0.45
requestMethod · 0.45

Tested by

no test coverage detected