Skip to main content

Module session_events

Module session_events 

Source
Expand description

Auto-generated from session-events.schema.json — do not edit manually.

Structs§

AbortData
Turn abort information including the reason for termination
AssistantIntentData
Agent intent description for current activity or plan
AssistantMessageData
Assistant response containing text content, optional tool requests, and interaction metadata
AssistantMessageDeltaData
Streaming assistant message delta for incremental response updates
AssistantMessageStartData
Streaming assistant message start metadata
AssistantMessageToolRequest
A tool invocation request from the assistant
AssistantReasoningData
Assistant reasoning content for timeline display with complete thinking text
AssistantReasoningDeltaData
Streaming reasoning delta for incremental extended thinking updates
AssistantStreamingDeltaData
Streaming response progress with cumulative byte count
AssistantTurnEndData
Turn completion metadata including the turn identifier
AssistantTurnStartData
Turn initialization metadata including identifier and interaction tracking
AssistantUsageCopilotUsage
Per-request cost and usage data from the CAPI copilot_usage response field
AssistantUsageCopilotUsageTokenDetail
Token usage detail for a single billing category
AssistantUsageData
LLM API call usage metrics including tokens, costs, quotas, and billing information
AssistantUsageQuotaSnapshot
AutoModeSwitchCompletedData
Auto mode switch completion notification
AutoModeSwitchRequestedData
Auto mode switch request notification requiring user approval
CapabilitiesChangedData
Session capability change notification
CapabilitiesChangedUI
UI capability changes
CommandCompletedData
Queued command completion notification signaling UI dismissal
CommandExecuteData
Registered command dispatch request routed to the owning client
CommandQueuedData
Queued slash command dispatch request for client execution
CommandsChangedCommand
CommandsChangedData
SDK command registration change notification
CompactionCompleteCompactionTokensUsed
Token usage breakdown for the compaction LLM call (aligned with assistant.usage format)
CompactionCompleteCompactionTokensUsedCopilotUsage
Per-request cost and usage data from the CAPI copilot_usage response field
CompactionCompleteCompactionTokensUsedCopilotUsageTokenDetail
Token usage detail for a single billing category
CustomAgentsUpdatedAgent
ElicitationCompletedData
Elicitation request completion with the user’s response
ElicitationRequestedData
Elicitation request; may be form-based (structured input) or URL-based (browser redirect)
ElicitationRequestedSchema
JSON Schema describing the form fields to present to the user (form mode only)
ExitPlanModeCompletedData
Plan mode exit completion with the user’s approval decision and optional feedback
ExitPlanModeRequestedData
Plan approval request with plan content and available user actions
ExtensionsLoadedExtension
ExternalToolCompletedData
External tool completion notification signaling UI dismissal
ExternalToolRequestedData
External tool invocation request for client-side tool execution
HandoffRepository
Repository context for the handed-off session
HookEndData
Hook invocation completion details including output, success status, and error information
HookEndError
Error details when the hook failed
HookStartData
Hook invocation start details including type and input data
McpOauthCompletedData
MCP OAuth request completion notification
McpOauthRequiredData
OAuth authentication request for an MCP server
McpOauthRequiredStaticClientConfig
Static OAuth client configuration, if the server specifies one
McpServersLoadedServer
ModelCallFailureData
Failed LLM API call metadata for telemetry
PendingMessagesModifiedData
Empty payload; the event signals that the pending message queue has changed
PermissionApproved
PermissionApprovedForLocation
PermissionApprovedForSession
PermissionCancelled
PermissionCompletedData
Permission request completion notification signaling UI dismissal
PermissionDeniedByContentExclusionPolicy
PermissionDeniedByPermissionRequestHook
PermissionDeniedByRules
PermissionDeniedInteractivelyByUser
PermissionDeniedNoApprovalRuleAndCouldNotRequestFromUser
PermissionPromptRequestCommands
Shell command permission prompt
PermissionPromptRequestCustomTool
Custom tool invocation permission prompt
PermissionPromptRequestHook
Hook confirmation permission prompt
PermissionPromptRequestMcp
MCP tool invocation permission prompt
PermissionPromptRequestMemory
Memory operation permission prompt
PermissionPromptRequestPath
Path access permission prompt
PermissionPromptRequestRead
File read permission prompt
PermissionPromptRequestUrl
URL access permission prompt
PermissionPromptRequestWrite
File write permission prompt
PermissionRequestCustomTool
Custom tool invocation permission request
PermissionRequestHook
Hook confirmation permission request
PermissionRequestMcp
MCP tool invocation permission request
PermissionRequestMemory
Memory operation permission request
PermissionRequestRead
File or directory read permission request
PermissionRequestShell
Shell command permission request
PermissionRequestShellCommand
PermissionRequestShellPossibleUrl
PermissionRequestUrl
URL access permission request
PermissionRequestWrite
File write permission request
PermissionRequestedData
Permission request notification requiring client approval with request details
PermissionRule
SamplingCompletedData
Sampling request completion notification signaling UI dismissal
SamplingRequestedData
Sampling request from an MCP server; contains the server name and a requestId for correlation
SessionBackgroundTasksChangedData
SessionCompactionCompleteData
Conversation compaction results including success status, metrics, and optional error details
SessionCompactionStartData
Context window breakdown at the start of LLM-powered conversation compaction
SessionContextChangedData
Working directory and git context at session start
SessionCustomAgentsUpdatedData
SessionErrorData
Error details for timeline display including message and optional diagnostic information
SessionExtensionsLoadedData
SessionHandoffData
Session handoff metadata including source, context, and repository information
SessionIdleData
Payload indicating the session is idle with no background agents in flight
SessionInfoData
Informational message for timeline display with categorization
SessionMcpServerStatusChangedData
SessionMcpServersLoadedData
SessionModeChangedData
Agent mode change details including previous and new modes
SessionModelChangeData
Model change details including previous and new model identifiers
SessionPlanChangedData
Plan file operation details indicating what changed
SessionRemoteSteerableChangedData
Notifies Mission Control that the session’s remote steering capability has changed
SessionResumeData
Session resume metadata including current context and event count
SessionShutdownData
Session termination metrics including usage statistics, code changes, and shutdown reason
SessionSkillsLoadedData
SessionSnapshotRewindData
Session rewind details including target event and count of removed events
SessionStartData
Session initialization metadata including context and configuration
SessionTaskCompleteData
Task completion notification with summary from the agent
SessionTitleChangedData
Session title change payload containing the new display title
SessionToolsUpdatedData
SessionTruncationData
Conversation truncation statistics including token counts and removed content metrics
SessionUsageInfoData
Current context window usage statistics including token and message counts
SessionWarningData
Warning message for timeline display with categorization
SessionWorkspaceFileChangedData
Workspace file change details including path and operation type
ShutdownCodeChanges
Aggregate code change metrics for the session
ShutdownModelMetric
ShutdownModelMetricRequests
Request count and cost metrics
ShutdownModelMetricTokenDetail
ShutdownModelMetricUsage
Token usage breakdown
ShutdownTokenDetail
SkillInvokedData
Skill invocation details including content, allowed tools, and plugin metadata
SkillsLoadedSkill
SubagentCompletedData
Sub-agent completion details for successful execution
SubagentDeselectedData
Empty payload; the event signals that the custom agent was deselected, returning to the default agent
SubagentFailedData
Sub-agent failure details including error message and agent information
SubagentSelectedData
Custom agent selection details including name and available tools
SubagentStartedData
Sub-agent startup details including parent tool call and agent information
SystemMessageData
System/developer instruction content with role and optional template metadata
SystemMessageMetadata
Metadata about the prompt template and its construction
SystemNotificationData
System-generated notification for runtime events like background task completion
ToolExecutionCompleteData
Tool execution completion results including success status, detailed output, and error information
ToolExecutionCompleteError
Error details when the tool execution failed
ToolExecutionCompleteResult
Tool execution result on success
ToolExecutionPartialResultData
Streaming tool execution output for incremental result display
ToolExecutionProgressData
Tool execution progress notification with status message
ToolExecutionStartData
Tool execution startup details including MCP server information when applicable
ToolUserRequestedData
User-initiated tool invocation request with tool name and arguments
TypedSessionEvent
A session event with typed data payload.
UserInputCompletedData
User input request completion with the user’s response
UserInputRequestedData
User input request notification with question and optional predefined choices
UserMessageData
UserToolSessionApprovalCommands
UserToolSessionApprovalCustomTool
UserToolSessionApprovalMcp
UserToolSessionApprovalMemory
UserToolSessionApprovalRead
UserToolSessionApprovalWrite
WorkingDirectoryContext
Working directory and git context at session start

Enums§

AssistantMessageToolRequestType
Tool call type: “function” for standard tool calls, “custom” for grammar-based tool calls. Defaults to “function” when absent.
ElicitationCompletedAction
The user action: “accept” (submitted form), “decline” (explicitly refused), or “cancel” (dismissed)
ElicitationRequestedMode
Elicitation mode; “form” for structured input, “url” for browser-based. Defaults to “form” when absent.
ElicitationRequestedSchemaType
Schema type indicator (always ‘object’)
ExtensionsLoadedExtensionSource
Discovery source
ExtensionsLoadedExtensionStatus
Current status: running, disabled, failed, or starting
HandoffSourceType
Origin type of the session being handed off
McpOauthRequiredStaticClientConfigGrantType
Optional non-default OAuth grant type. When set to ‘client_credentials’, the OAuth flow runs headlessly using the client_id + keychain-stored secret (no browser, no callback server).
McpServerStatusChangedStatus
New connection status: connected, failed, needs-auth, pending, disabled, or not_configured
McpServersLoadedServerStatus
Connection status: connected, failed, needs-auth, pending, disabled, or not_configured
ModelCallFailureSource
Where the failed model call originated
PermissionApprovedForLocationKind
Approved and persisted for this project location
PermissionApprovedForSessionKind
Approved and remembered for the rest of the session
PermissionApprovedKind
The permission request was approved
PermissionCancelledKind
The permission request was cancelled before a response was used
PermissionDeniedByContentExclusionPolicyKind
Denied by the organization’s content exclusion policy
PermissionDeniedByPermissionRequestHookKind
Denied by a permission request hook registered by an extension or plugin
PermissionDeniedByRulesKind
Denied because approval rules explicitly blocked it
PermissionDeniedInteractivelyByUserKind
Denied by the user during an interactive prompt
PermissionDeniedNoApprovalRuleAndCouldNotRequestFromUserKind
Denied because no approval rule matched and user confirmation was unavailable
PermissionPromptRequest
Derived user-facing permission prompt details for UI consumers
PermissionPromptRequestCommandsKind
Prompt kind discriminator
PermissionPromptRequestCustomToolKind
Prompt kind discriminator
PermissionPromptRequestHookKind
Prompt kind discriminator
PermissionPromptRequestMcpKind
Prompt kind discriminator
PermissionPromptRequestMemoryAction
Whether this is a store or vote memory operation
PermissionPromptRequestMemoryDirection
Vote direction (vote only)
PermissionPromptRequestMemoryKind
Prompt kind discriminator
PermissionPromptRequestPathAccessKind
Underlying permission kind that needs path approval
PermissionPromptRequestPathKind
Prompt kind discriminator
PermissionPromptRequestReadKind
Prompt kind discriminator
PermissionPromptRequestUrlKind
Prompt kind discriminator
PermissionPromptRequestWriteKind
Prompt kind discriminator
PermissionRequest
Details of the permission being requested
PermissionRequestCustomToolKind
Permission kind discriminator
PermissionRequestHookKind
Permission kind discriminator
PermissionRequestMcpKind
Permission kind discriminator
PermissionRequestMemoryAction
Whether this is a store or vote memory operation
PermissionRequestMemoryDirection
Vote direction (vote only)
PermissionRequestMemoryKind
Permission kind discriminator
PermissionRequestReadKind
Permission kind discriminator
PermissionRequestShellKind
Permission kind discriminator
PermissionRequestUrlKind
Permission kind discriminator
PermissionRequestWriteKind
Permission kind discriminator
PermissionResult
The result of the permission request
PlanChangedOperation
The type of operation performed on the plan file
SessionEventData
Typed session event data, discriminated by the event type field.
SessionEventType
Identifies the kind of session event.
ShutdownType
Whether the session ended normally (“routine”) or due to a crash/fatal error (“error”)
SystemMessageRole
Message role: “system” for system prompts, “developer” for developer-injected instructions
UserMessageAgentMode
The agent mode that was active when this message was sent
UserToolSessionApproval
The approval to add as a session-scoped rule
UserToolSessionApprovalCommandsKind
Command approval kind
UserToolSessionApprovalCustomToolKind
Custom tool approval kind
UserToolSessionApprovalMcpKind
MCP tool approval kind
UserToolSessionApprovalMemoryKind
Memory approval kind
UserToolSessionApprovalReadKind
Read approval kind
UserToolSessionApprovalWriteKind
Write approval kind
WorkingDirectoryContextHostType
Hosting platform type of the repository (github or ado)
WorkspaceFileChangedOperation
Whether the file was newly created or updated