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

Method exec

python/copilot/generated/rpc.py:26569–26573  ·  view source on GitHub ↗

Starts a shell command and streams output through session notifications.\n\nArgs:\n params: Shell command to run, with optional working directory and timeout in milliseconds.\n\nReturns:\n Identifier of the spawned process, used to correlate streamed output and exit notifications.

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

Source from the content-addressed store, hash-verified

26567 self._session_id = session_id
26568
26569 async def exec(self, params: ShellExecRequest, *, timeout: float | None = None) -> ShellExecResult:
26570 "Starts a shell command and streams output through session notifications.\n\nArgs:\n params: Shell command to run, with optional working directory and timeout in milliseconds.\n\nReturns:\n Identifier of the spawned process, used to correlate streamed output and exit notifications."
26571 params_dict: dict[str, Any] = {k: v for k, v in params.to_dict().items() if v is not None}
26572 params_dict["sessionId"] = self._session_id
26573 return ShellExecResult.from_dict(await self._client.request("session.shell.exec", params_dict, **_timeout_kwargs(timeout)))
26574
26575 async def kill(self, params: ShellKillRequest, *, timeout: float | None = None) -> ShellKillResult:
26576 "Sends a signal to a shell process previously started via \"shell.exec\".\n\nArgs:\n params: Identifier of a process previously returned by \"shell.exec\" and the signal to send.\n\nReturns:\n Indicates whether the signal was delivered; false if the process was unknown or already exited."

Callers 15

parseBearerTokenFunction · 0.45
appendUniqueExportBlocksFunction · 0.45
wrapGeneratedGoCommentsFunction · 0.45
extractFieldsFunction · 0.45
goDeclaredTypeNameFunction · 0.45
collectGoTopLevelNamesFunction · 0.45
generateRpcFunction · 0.45

Calls 4

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

Tested by 5

startOAuthMcpServerFunction · 0.36
getOrCreateDbFunction · 0.36
queryFunction · 0.36