|
__all__ = [ |
|
"AbortData", |
|
"AbortReason", |
|
"AssistantIdleData", |
|
"AssistantIntentData", |
|
"AssistantMessageData", |
|
"AssistantMessageDeltaData", |
|
"AssistantMessageServerTools", |
|
"AssistantMessageStartData", |
|
"AssistantMessageToolRequest", |
|
"AssistantMessageToolRequestType", |
|
"AssistantReasoningData", |
|
"AssistantReasoningDeltaData", |
|
"AssistantServerToolProgressData", |
|
"AssistantStreamingDeltaData", |
|
"AssistantToolCallDeltaData", |
|
"AssistantTurnEndData", |
|
"AssistantTurnRetryData", |
|
"AssistantTurnStartData", |
|
"AssistantUsageApiEndpoint", |
|
"AssistantUsageCopilotUsage", |
|
"AssistantUsageCopilotUsageTokenDetail", |
|
"AssistantUsageData", |
|
"Attachment", |
|
"AttachmentBlob", |
|
"AttachmentDirectory", |
|
"AttachmentExtensionContext", |
|
"AttachmentFile", |
|
"AttachmentFileLineRange", |
|
"AttachmentGitHubActionsJob", |
|
"AttachmentGitHubCommit", |
|
"AttachmentGitHubFile", |
|
"AttachmentGitHubFileDiff", |
|
"AttachmentGitHubFileDiffSide", |
|
"AttachmentGitHubReference", |
|
"AttachmentGitHubReferenceType", |
|
"AttachmentGitHubRelease", |
|
"AttachmentGitHubRepository", |
|
"AttachmentGitHubSnippet", |
|
"AttachmentGitHubTreeComparison", |
|
"AttachmentGitHubTreeComparisonSide", |
|
"AttachmentGitHubUrl", |
|
"AttachmentSelection", |
|
"AttachmentSelectionDetails", |
|
"AttachmentSelectionDetailsEnd", |
|
"AttachmentSelectionDetailsStart", |
|
"AutoApprovalRecommendation", |
|
"AutoModeResolvedReasoningBucket", |
|
"AutoModeSwitchCompletedData", |
|
"AutoModeSwitchRequestedData", |
|
"AutoModeSwitchResponse", |
|
"AutopilotObjectiveChangedOperation", |
|
"AutopilotObjectiveChangedStatus", |
|
"BinaryAssetReference", |
|
"BinaryAssetReferenceType", |
|
"BinaryAssetType", |
|
"CanvasRegistryChangedCanvas", |
|
"CanvasRegistryChangedCanvasAction", |
|
"CapabilitiesChangedData", |
|
"CapabilitiesChangedUI", |
|
"CitableSource", |
|
"CitationLocation", |
|
"CitationLocationBlock", |
|
"CitationLocationChar", |
|
"CitationLocationPage", |
|
"CitationProvider", |
|
"CitationReference", |
|
"CitationSource", |
|
"CitationSpan", |
|
"Citations", |
|
"CommandCompletedData", |
|
"CommandExecuteData", |
|
"CommandQueuedData", |
|
"CommandsChangedCommand", |
|
"CommandsChangedData", |
|
"CompactionCompleteCompactionTokensUsed", |
|
"CompactionCompleteCompactionTokensUsedCopilotUsageTokenDetail", |
|
"ContextTier", |
|
"CustomAgentsUpdatedAgent", |
|
"Data", |
|
"ElicitationCompletedAction", |
|
"ElicitationCompletedData", |
|
"ElicitationRequestedData", |
|
"ElicitationRequestedMode", |
|
"ElicitationRequestedSchema", |
|
"EmbeddedBlobResourceContents", |
|
"EmbeddedTextResourceContents", |
|
"ExitPlanModeAction", |
|
"ExitPlanModeCompletedData", |
|
"ExitPlanModeRequestedData", |
|
"ExtensionsLoadedExtension", |
|
"ExtensionsLoadedExtensionSource", |
|
"ExtensionsLoadedExtensionStatus", |
|
"ExternalToolCompletedData", |
|
"ExternalToolRequestedData", |
|
"GitHubRepoRef", |
|
"HandoffRepository", |
|
"HandoffSourceType", |
|
"HeaderEntry", |
|
"HookEndData", |
|
"HookEndError", |
|
"HookProgressData", |
|
"HookStartData", |
|
"ManagedSettingsEnforcedAction", |
|
"ManagedSettingsEnforcedEscalation", |
|
"ManagedSettingsResolvedSource", |
|
"McpAppToolCallCompleteData", |
|
"McpAppToolCallCompleteError", |
|
"McpAppToolCallCompleteToolMeta", |
|
"McpAppToolCallCompleteToolMetaUI", |
|
"McpHeadersRefreshCompletedData", |
|
"McpHeadersRefreshCompletedOutcome", |
|
"McpHeadersRefreshRequiredData", |
|
"McpHeadersRefreshRequiredReason", |
|
"McpOauthCompletedData", |
|
"McpOauthCompletionOutcome", |
|
"McpOauthHttpResponse", |
|
"McpOauthRequestReason", |
|
"McpOauthRequiredData", |
|
"McpOauthRequiredStaticClientConfig", |
|
"McpOauthWWWAuthenticateParams", |
|
"McpPromptsListChangedData", |
|
"McpResourcesListChangedData", |
|
"McpServerSource", |
|
"McpServerStatus", |
|
"McpServerTransport", |
|
"McpServersLoadedServer", |
|
"McpToolsListChangedData", |
|
"ModelCallFailureBadRequestKind", |
|
"ModelCallFailureData", |
|
"ModelCallFailureKind", |
|
"ModelCallFailureRequestFingerprint", |
|
"ModelCallFailureSource", |
|
"ModelCallFailureTransport", |
|
"ModelCallStartData", |
|
"OmittedBinaryOmittedReason", |
|
"OmittedBinaryResult", |
|
"OmittedBinaryType", |
|
"PendingMessagesModifiedData", |
|
"PermissionAllowAllMode", |
|
"PermissionApproved", |
|
"PermissionApprovedForLocation", |
|
"PermissionApprovedForSession", |
|
"PermissionAutoApproval", |
|
"PermissionCancelled", |
|
"PermissionCompletedData", |
|
"PermissionDeniedByContentExclusionPolicy", |
|
"PermissionDeniedByPermissionRequestHook", |
|
"PermissionDeniedByRules", |
|
"PermissionDeniedInteractivelyByUser", |
|
"PermissionDeniedNoApprovalRuleAndCouldNotRequestFromUser", |
|
"PermissionPromptRequest", |
|
"PermissionPromptRequestCommands", |
|
"PermissionPromptRequestCustomTool", |
|
"PermissionPromptRequestExtensionManagement", |
|
"PermissionPromptRequestExtensionPermissionAccess", |
|
"PermissionPromptRequestHook", |
|
"PermissionPromptRequestMcp", |
|
"PermissionPromptRequestMemory", |
|
"PermissionPromptRequestPath", |
|
"PermissionPromptRequestPathAccessKind", |
|
"PermissionPromptRequestRead", |
|
"PermissionPromptRequestUrl", |
|
"PermissionPromptRequestWrite", |
|
"PermissionRequest", |
|
"PermissionRequestCustomTool", |
|
"PermissionRequestExtensionManagement", |
|
"PermissionRequestExtensionPermissionAccess", |
|
"PermissionRequestHook", |
|
"PermissionRequestMcp", |
|
"PermissionRequestMemory", |
|
"PermissionRequestMemoryAction", |
|
"PermissionRequestMemoryDirection", |
|
"PermissionRequestRead", |
|
"PermissionRequestShell", |
|
"PermissionRequestShellCommand", |
|
"PermissionRequestShellPossibleUrl", |
|
"PermissionRequestUrl", |
|
"PermissionRequestWrite", |
|
"PermissionRequestedData", |
|
"PermissionResult", |
|
"PermissionRule", |
|
"PersistedBinaryImage", |
|
"PersistedBinaryImageType", |
|
"PersistedBinaryResult", |
|
"PlanChangedOperation", |
|
"RawSessionEventData", |
|
"ReasoningSummary", |
|
"SamplingCompletedData", |
|
"SamplingRequestedData", |
|
"SessionAutoModeResolvedData", |
|
"SessionAutopilotObjectiveChangedData", |
|
"SessionBackgroundTasksChangedData", |
|
"SessionBinaryAssetData", |
|
"SessionCanvasClosedData", |
|
"SessionCanvasOpenedData", |
|
"SessionCanvasRecordedData", |
|
"SessionCanvasRegistryChangedData", |
|
"SessionCanvasRemovedData", |
|
"SessionCanvasUnavailableData", |
|
"SessionCompactionCompleteData", |
|
"SessionCompactionStartData", |
|
"SessionContextChangedData", |
|
"SessionCustomAgentsUpdatedData", |
|
"SessionCustomNotificationData", |
|
"SessionErrorData", |
|
"SessionEvent", |
|
"SessionEventData", |
|
"SessionEventType", |
|
"SessionExtensionsAttachmentsPushedData", |
|
"SessionExtensionsLoadedData", |
|
"SessionHandoffData", |
|
"SessionIdleData", |
|
"SessionInfoData", |
|
"SessionLimitsConfig", |
|
"SessionLimitsExhaustedCompletedData", |
|
"SessionLimitsExhaustedRequestedData", |
|
"SessionLimitsExhaustedResponse", |
|
"SessionLimitsExhaustedResponseAction", |
|
"SessionManagedSettingsEnforcedData", |
|
"SessionManagedSettingsResolvedData", |
|
"SessionMcpServerStatusChangedData", |
|
"SessionMcpServersLoadedData", |
|
"SessionMode", |
|
"SessionModeChangedData", |
|
"SessionModelChangeData", |
|
"SessionPermissionsChangedData", |
|
"SessionPlanChangedData", |
|
"SessionRemoteSteerableChangedData", |
|
"SessionResumeData", |
|
"SessionScheduleCancelledData", |
|
"SessionScheduleCreatedData", |
|
"SessionScheduleRearmedData", |
|
"SessionSessionLimitsChangedData", |
|
"SessionShutdownData", |
|
"SessionSkillsLoadedData", |
|
"SessionSnapshotRewindData", |
|
"SessionStartData", |
|
"SessionTaskCompleteData", |
|
"SessionTitleChangedData", |
|
"SessionTodosChangedData", |
|
"SessionToolsUpdatedData", |
|
"SessionTruncationData", |
|
"SessionUsageCheckpointData", |
|
"SessionUsageInfoData", |
|
"SessionWarningData", |
|
"SessionWorkspaceFileChangedData", |
|
"ShutdownCodeChanges", |
|
"ShutdownModelMetric", |
|
"ShutdownModelMetricRequests", |
|
"ShutdownModelMetricTokenDetail", |
|
"ShutdownModelMetricUsage", |
|
"ShutdownTokenDetail", |
|
"ShutdownType", |
|
"SkillInvokedData", |
|
"SkillInvokedTrigger", |
|
"SkillSource", |
|
"SkillsLoadedSkill", |
|
"SubagentCompletedData", |
|
"SubagentDeselectedData", |
|
"SubagentFailedData", |
|
"SubagentSelectedData", |
|
"SubagentStartedData", |
|
"SystemMessageData", |
|
"SystemMessageMetadata", |
|
"SystemMessageRole", |
|
"SystemNotification", |
|
"SystemNotificationAgentCompleted", |
|
"SystemNotificationAgentCompletedStatus", |
|
"SystemNotificationAgentIdle", |
|
"SystemNotificationData", |
|
"SystemNotificationInstructionDiscovered", |
|
"SystemNotificationNewInboxMessage", |
|
"SystemNotificationShellCompleted", |
|
"SystemNotificationShellDetachedCompleted", |
|
"ToolExecutionCompleteContent", |
|
"ToolExecutionCompleteContentAudio", |
|
"ToolExecutionCompleteContentImage", |
|
"ToolExecutionCompleteContentResource", |
|
"ToolExecutionCompleteContentResourceDetails", |
|
"ToolExecutionCompleteContentResourceLink", |
|
"ToolExecutionCompleteContentResourceLinkIcon", |
|
"ToolExecutionCompleteContentResourceLinkIconTheme", |
|
"ToolExecutionCompleteContentShellExit", |
|
"ToolExecutionCompleteContentTerminal", |
|
"ToolExecutionCompleteContentText", |
|
"ToolExecutionCompleteData", |
|
"ToolExecutionCompleteError", |
|
"ToolExecutionCompleteResult", |
|
"ToolExecutionCompleteToolDescription", |
|
"ToolExecutionCompleteToolDescriptionMeta", |
|
"ToolExecutionCompleteToolDescriptionMetaUI", |
|
"ToolExecutionCompleteToolDescriptionMetaUIVisibility", |
|
"ToolExecutionCompleteUIResource", |
|
"ToolExecutionCompleteUIResourceMeta", |
|
"ToolExecutionCompleteUIResourceMetaUI", |
|
"ToolExecutionCompleteUIResourceMetaUICsp", |
|
"ToolExecutionCompleteUIResourceMetaUIPermissions", |
|
"ToolExecutionCompleteUIResourceMetaUIPermissionsCamera", |
|
"ToolExecutionCompleteUIResourceMetaUIPermissionsClipboardWrite", |
|
"ToolExecutionCompleteUIResourceMetaUIPermissionsGeolocation", |
|
"ToolExecutionCompleteUIResourceMetaUIPermissionsMicrophone", |
|
"ToolExecutionPartialResultData", |
|
"ToolExecutionProgressData", |
|
"ToolExecutionStartData", |
|
"ToolExecutionStartShellToolInfo", |
|
"ToolExecutionStartToolDescription", |
|
"ToolExecutionStartToolDescriptionMeta", |
|
"ToolExecutionStartToolDescriptionMetaUI", |
|
"ToolExecutionStartToolDescriptionMetaUIVisibility", |
|
"ToolSearchActivatedData", |
|
"ToolUserRequestedData", |
|
"UserInputCompletedData", |
|
"UserInputRequestedData", |
|
"UserMessageAgentMode", |
|
"UserMessageData", |
|
"UserMessageDelivery", |
|
"UserToolSessionApproval", |
|
"UserToolSessionApprovalCommands", |
|
"UserToolSessionApprovalCustomTool", |
|
"UserToolSessionApprovalExtensionManagement", |
|
"UserToolSessionApprovalExtensionPermissionAccess", |
|
"UserToolSessionApprovalMcp", |
|
"UserToolSessionApprovalMemory", |
|
"UserToolSessionApprovalRead", |
|
"UserToolSessionApprovalWrite", |
|
"Verbosity", |
|
"WorkingDirectoryContext", |
|
"WorkingDirectoryContextHostType", |
|
"WorkspaceFileChangedOperation", |
|
"session_event_from_dict", |
|
"session_event_to_dict", |
|
] |
https://github.com/github/copilot-sdk/blob/main/python/copilot/generated/__init__.py Makes it clear that the
copilot.generatedsubpackage is not meant to be public:copilot-sdk/python/copilot/generated/__init__.py
Line 3 in cd2b10b
But the subpackage doesn't start with an underscore to signify it's an implementation detail:
copilot._generated.As well, https://github.com/github/copilot-sdk/blob/main/python/copilot/rpc.py and https://github.com/github/copilot-sdk/blob/main/python/copilot/session_events.py which are meant to act as the public API potentially over-expose things. While
copilot.rpcdoes export something explicitly:copilot-sdk/python/copilot/rpc.py
Lines 10 to 11 in cd2b10b
... both files also do an
import *followed by an import of__all__from the generated code which lists everything contained in the generated code. E.g.:copilot-sdk/python/copilot/session_events.py
Lines 9 to 10 in cd2b10b
exposes 330 symbols in the module:
copilot-sdk/python/copilot/generated/session_events.py
Lines 9883 to 10215 in cd2b10b
I'm not sure if all 330 symbols are meant to be exposed, but at least
copilot.generatedshould be made private by renaming it tocopilot._generated. If all of those symbols are meant to be exposed then that one-liner incopilot.rpcmight as well be removed. If they are not meant to be exposed then theimport __all__andimport *should go and you can explicitly set__all__in the exporting modules.