Class SessionShellApi
java.lang.Object
com.github.copilot.generated.rpc.SessionShellApi
API methods for the
shell namespace.- Since:
- 1.0.0
-
Method Summary
Modifier and TypeMethodDescriptionCancels a user-requested shell command by request ID.exec(SessionShellExecParams params) Starts a shell command, returning an RPC error if it cannot be spawned.Executes a user-requested shell command through the session runtime.kill(SessionShellKillParams params) Sends a signal to a shell process previously started via "shell.exec".
-
Method Details
-
exec
@CopilotExperimental public CompletableFuture<SessionShellExecResult> exec(SessionShellExecParams params) Starts a shell command, returning an RPC error if it cannot be spawned. The command runs as the leader of its own process group (POSIX) or in a dedicated job object (Windows), so a forced termination — via "shell.kill", the request timeout, or session disposal — signals that whole group/job rather than only the direct child. Two gaps are worth planning for: a command that exits on its own does not trigger that teardown, and on POSIX a descendant that moves itself into a new session or process group (for example via "setsid") leaves the signalled group, so either can leave a background process running.Note: the
sessionIdfield in the params record is overridden by the session-scoped wrapper; any value provided is ignored.- Since:
- 1.0.0
-
kill
@CopilotExperimental public CompletableFuture<SessionShellKillResult> kill(SessionShellKillParams params) Sends a signal to a shell process previously started via "shell.exec". The signal targets the command's whole process group (POSIX) or job object (Windows), so descendants still in that group are signalled too, not just the direct child. On POSIX a descendant that moved itself into a new session or process group (for example via "setsid") is no longer in the signalled group and survives.Note: the
sessionIdfield in the params record is overridden by the session-scoped wrapper; any value provided is ignored.- Since:
- 1.0.0
-
executeUserRequested
@CopilotExperimental public CompletableFuture<SessionShellExecuteUserRequestedResult> executeUserRequested(SessionShellExecuteUserRequestedParams params) Executes a user-requested shell command through the session runtime.Note: the
sessionIdfield in the params record is overridden by the session-scoped wrapper; any value provided is ignored.- Since:
- 1.0.0
-
cancelUserRequested
@CopilotExperimental public CompletableFuture<SessionShellCancelUserRequestedResult> cancelUserRequested(SessionShellCancelUserRequestedParams params) Cancels a user-requested shell command by request ID.Note: the
sessionIdfield in the params record is overridden by the session-scoped wrapper; any value provided is ignored.- Since:
- 1.0.0
-