Class PermissionInvocation
java.lang.Object
com.github.copilot.rpc.PermissionInvocation
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the derived user-facing permission prompt supplied by newer runtimes.Gets the session ID where the permission was requested.booleanGets whether managed settings are enabled for this session.setManagedSettingsEnabled(boolean managedSettingsEnabled) Sets whether managed settings are enabled for this session.setPromptRequest(PermissionRequest promptRequest) Sets the derived user-facing permission prompt.setSessionId(String sessionId) Sets the session ID.
-
Constructor Details
-
PermissionInvocation
public PermissionInvocation()
-
-
Method Details
-
getSessionId
Gets the session ID where the permission was requested.- Returns:
- the session ID
-
setSessionId
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
Sets whether managed settings are enabled for this session.- Parameters:
managedSettingsEnabled- whether managed settings are enabled- Returns:
- this invocation for method chaining
-
getPromptRequest
Gets the derived user-facing permission prompt supplied by newer runtimes.The raw request retains managed-policy provenance. Only
commands,read,write,url, andworkflowprompts can clear that human requirement after Assisted approval. For missing or other prompt kinds, keep the raw marker authoritative. Prompt-only fields such asassistedApprovalare available throughPermissionRequest.getExtensionData().- Returns:
- the derived prompt, or
nullwhen unavailable
-
setPromptRequest
Sets the derived user-facing permission prompt.- Parameters:
promptRequest- the derived prompt, ornull- Returns:
- this invocation for method chaining
-