Class SessionRpc

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

@Generated("copilot-sdk-codegen") public final class SessionRpc extends Object
Typed client for session-scoped RPC methods.

Provides strongly-typed access to all session-level API namespaces. The sessionId is injected automatically into every call.

Obtain an instance by calling new SessionRpc(caller, sessionId).

Since:
1.0.0
  • Field Details

    • providers

      public final SessionProvidersApi providers
      API methods for the providers namespace.
    • sandbox

      public final SessionSandboxApi sandbox
      API methods for the sandbox namespace.
    • gitHubAuth

      public final SessionGitHubAuthApi gitHubAuth
      API methods for the gitHubAuth namespace.
    • accounts

      public final SessionAccountsApi accounts
      API methods for the accounts namespace.
    • debug

      public final SessionDebugApi debug
      API methods for the debug namespace.
    • canvas

      public final SessionCanvasApi canvas
      API methods for the canvas namespace.
    • workflow

      public final SessionWorkflowApi workflow
      API methods for the workflow namespace.
    • model

      public final SessionModelApi model
      API methods for the model namespace.
    • mode

      public final SessionModeApi mode
      API methods for the mode namespace.
    • name

      public final SessionNameApi name
      API methods for the name namespace.
    • plan

      public final SessionPlanApi plan
      API methods for the plan namespace.
    • workspaces

      public final SessionWorkspacesApi workspaces
      API methods for the workspaces namespace.
    • autopilotObjective

      public final SessionAutopilotObjectiveApi autopilotObjective
      API methods for the autopilotObjective namespace.
    • completions

      public final SessionCompletionsApi completions
      API methods for the completions namespace.
    • instructions

      public final SessionInstructionsApi instructions
      API methods for the instructions namespace.
    • customizations

      public final SessionCustomizationsApi customizations
      API methods for the customizations namespace.
    • fleet

      public final SessionFleetApi fleet
      API methods for the fleet namespace.
    • agent

      public final SessionAgentApi agent
      API methods for the agent namespace.
    • tasks

      public final SessionTasksApi tasks
      API methods for the tasks namespace.
    • skills

      public final SessionSkillsApi skills
      API methods for the skills namespace.
    • mcp

      public final SessionMcpApi mcp
      API methods for the mcp namespace.
    • diagnostics

      public final SessionDiagnosticsApi diagnostics
      API methods for the diagnostics namespace.
    • connectors

      public final SessionConnectorsApi connectors
      API methods for the connectors namespace.
    • managedSettings

      public final SessionManagedSettingsApi managedSettings
      API methods for the managedSettings namespace.
    • plugins

      public final SessionPluginsApi plugins
      API methods for the plugins namespace.
    • provider

      public final SessionProviderApi provider
      API methods for the provider namespace.
    • options

      public final SessionOptionsApi options
      API methods for the options namespace.
    • lsp

      public final SessionLspApi lsp
      API methods for the lsp namespace.
    • extensions

      public final SessionExtensionsApi extensions
      API methods for the extensions namespace.
    • tools

      public final SessionToolsApi tools
      API methods for the tools namespace.
    • commands

      public final SessionCommandsApi commands
      API methods for the commands namespace.
    • telemetry

      public final SessionTelemetryApi telemetry
      API methods for the telemetry namespace.
    • ui

      public final SessionUiApi ui
      API methods for the ui namespace.
    • permissions

      public final SessionPermissionsApi permissions
      API methods for the permissions namespace.
    • metadata

      public final SessionMetadataApi metadata
      API methods for the metadata namespace.
    • contentExclusion

      public final SessionContentExclusionApi contentExclusion
      API methods for the contentExclusion namespace.
    • shell

      public final SessionShellApi shell
      API methods for the shell namespace.
    • history

      public final SessionHistoryApi history
      API methods for the history namespace.
    • queue

      public final SessionQueueApi queue
      API methods for the queue namespace.
    • eventLog

      public final SessionEventLogApi eventLog
      API methods for the eventLog namespace.
    • usage

      public final SessionUsageApi usage
      API methods for the usage namespace.
    • quota

      public final SessionQuotaApi quota
      API methods for the quota namespace.
    • limitPrediction

      public final SessionLimitPredictionApi limitPrediction
      API methods for the limitPrediction namespace.
    • remote

      public final SessionRemoteApi remote
      API methods for the remote namespace.
    • visibility

      public final SessionVisibilityApi visibility
      API methods for the visibility namespace.
    • schedule

      public final SessionScheduleApi schedule
      API methods for the schedule namespace.
  • Constructor Details

    • SessionRpc

      public SessionRpc(RpcCaller caller, String sessionId)
      Creates a new session RPC client.
      Parameters:
      caller - the RPC transport function (e.g., jsonRpcClient::invoke)
      sessionId - the session ID to inject into every request
  • Method Details

    • suspend

      Suspends the session while preserving persisted state for later resume.
      Since:
      1.0.0
    • send

      Sends a user message to the session and returns its message 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
    • sendMessages

      Sends zero or more user messages to the session in a single turn and returns their message IDs. All provided messages are appended to the conversation in order, then exactly one agent turn runs over the resulting history. When the list is empty, one turn runs over the existing history with no new user message. Remote-backed (Mission Control) sessions do not support this method and will return an error.

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

      Since:
      1.0.0
    • abort

      Aborts the current agent turn.

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

      Since:
      1.0.0
    • interruptMainTurn

      Interrupts the current main agent turn while leaving running background work (subagents, sidekicks, and promoted attached shells) alive. No-op when the main loop is not processing.

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

      Since:
      1.0.0
    • cancelAllBackgroundAgents

      @CopilotExperimental public CompletableFuture<Long> cancelAllBackgroundAgents()
      Cancels every running background agent (task-registry subagents plus sidekick agents) without interrupting the main agent loop. Promoted attached shells are left running.
      Since:
      1.0.0
    • shutdown

      Shuts down the session and persists its final state. Awaits any deferred sessionEnd hooks before resolving so user-supplied hook scripts complete before the runtime tears down.

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

      Since:
      1.0.0
    • log

      Emits a user-visible session log event.

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

      Since:
      1.0.0