Class SessionShellApi

java.lang.Object
com.github.copilot.generated.rpc.SessionShellApi

@Generated("copilot-sdk-codegen") public final class SessionShellApi extends Object
API methods for the shell namespace.
Since:
1.0.0
  • Method Details

    • exec

      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 sessionId field in the params record is overridden by the session-scoped wrapper; any value provided is ignored.

      Since:
      1.0.0
    • kill

      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 sessionId field in the params record is overridden by the session-scoped wrapper; any value provided is ignored.

      Since:
      1.0.0
    • executeUserRequested

      Executes a user-requested shell command through the session runtime.

      Note: the sessionId field in the params record is overridden by the session-scoped wrapper; any value provided is ignored.

      Since:
      1.0.0
    • cancelUserRequested

      Cancels a user-requested shell command by request ID.

      Note: the sessionId field in the params record is overridden by the session-scoped wrapper; any value provided is ignored.

      Since:
      1.0.0