Class PermissionInvocation

java.lang.Object
com.github.copilot.rpc.PermissionInvocation

public final class PermissionInvocation extends Object
Context information for a permission request invocation.

This object provides context about the session where the permission request originated.

Since:
1.0.0
See Also:
  • Constructor Details

    • PermissionInvocation

      public PermissionInvocation()
  • Method Details

    • getSessionId

      public String getSessionId()
      Gets the session ID where the permission was requested.
      Returns:
      the session ID
    • setSessionId

      public PermissionInvocation setSessionId(String sessionId)
      Sets the session ID.
      Parameters:
      sessionId - the session ID
      Returns:
      this invocation for method chaining
    • isManagedSettingsEnabled

      public boolean isManagedSettingsEnabled()
      Gets whether managed settings are enabled for this session.
      Returns:
      whether managed settings are enabled
    • setManagedSettingsEnabled

      public PermissionInvocation setManagedSettingsEnabled(boolean managedSettingsEnabled)
      Sets whether managed settings are enabled for this session.
      Parameters:
      managedSettingsEnabled - whether managed settings are enabled
      Returns:
      this invocation for method chaining
    • getPromptRequest

      public PermissionRequest getPromptRequest()
      Gets the derived user-facing permission prompt supplied by newer runtimes.

      The raw request retains managed-policy provenance. Only commands, read, write, url, and workflow prompts can clear that human requirement after Assisted approval. For missing or other prompt kinds, keep the raw marker authoritative. Prompt-only fields such as assistedApproval are available through PermissionRequest.getExtensionData().

      Returns:
      the derived prompt, or null when unavailable
    • setPromptRequest

      public PermissionInvocation setPromptRequest(PermissionRequest promptRequest)
      Sets the derived user-facing permission prompt.
      Parameters:
      promptRequest - the derived prompt, or null
      Returns:
      this invocation for method chaining