1#![forbid(unsafe_code)]
5
6pub mod client;
39pub mod error;
40pub mod events;
41pub mod jsonrpc;
42pub mod process;
43pub mod session;
44pub mod tools;
45pub mod transport;
46pub mod types;
47
48pub use tools::define_tool;
50
51pub use error::{CopilotError, Result};
53pub use types::{
54 session_lifecycle_event_types,
56 AttachmentType,
58 AzureOptions,
60 ClientOptions,
61 ConnectionState,
62 CustomAgentConfig,
63 ErrorOccurredHandler,
65 ErrorOccurredHookInput,
66 ErrorOccurredHookOutput,
67 GetAuthStatusResponse,
69 GetForegroundSessionResponse,
70 GetStatusResponse,
71 InfiniteSessionConfig,
72 LogLevel,
73 McpLocalServerConfig,
74 McpRemoteServerConfig,
75 McpServerConfig,
76 MessageOptions,
77 ModelBilling,
78 ModelCapabilities,
79 ModelInfo,
80 ModelLimits,
81 ModelPolicy,
82 ModelSupports,
83 ModelVisionLimits,
84 PermissionRequest,
86 PermissionRequestResult,
87 PingResponse,
88 PostToolUseHandler,
89 PostToolUseHookInput,
90 PostToolUseHookOutput,
91 PreToolUseHandler,
92 PreToolUseHookInput,
93 PreToolUseHookOutput,
94 ProviderConfig,
95 ResumeSessionConfig,
96 SelectionAttachment,
98 SelectionPosition,
99 SelectionRange,
100 SessionConfig,
101 SessionEndHandler,
102 SessionEndHookInput,
103 SessionEndHookOutput,
104 SessionHooks,
105 SessionLifecycleEvent,
107 SessionLifecycleEventMetadata,
108 SessionMetadata,
109 SessionStartHandler,
110 SessionStartHookInput,
111 SessionStartHookOutput,
112 SetForegroundSessionResponse,
113 StopError,
114 SystemMessageConfig,
115 SystemMessageMode,
116 Tool,
118 ToolBinaryResult,
119 ToolInvocation,
120 ToolResult,
121 ToolResultObject,
122 UserInputInvocation,
124 UserInputRequest,
125 UserInputResponse,
126 UserMessageAttachment,
127 UserPromptSubmittedHandler,
128 UserPromptSubmittedHookInput,
129 UserPromptSubmittedHookOutput,
130 SDK_PROTOCOL_VERSION,
132};
133
134pub use events::{
136 AbortData,
138 AssistantIntentData,
139 AssistantMessageData,
140 AssistantMessageDeltaData,
141 AssistantReasoningData,
142 AssistantReasoningDeltaData,
143 AssistantTurnEndData,
144 AssistantTurnStartData,
145 AssistantUsageData,
146 CompactionTokensUsed,
147 CustomAgentCompletedData,
148 CustomAgentFailedData,
149 CustomAgentSelectedData,
150 CustomAgentStartedData,
151 HandoffSourceType,
152 HookEndData,
153 HookError,
154 HookStartData,
155 PendingMessagesModifiedData,
156 RawSessionEvent,
158 RepositoryInfo,
159 SessionCompactionCompleteData,
160 SessionCompactionStartData,
161 SessionErrorData,
162 SessionEvent,
163 SessionEventData,
164 SessionHandoffData,
165 SessionIdleData,
166 SessionInfoData,
167 SessionModelChangeData,
168 SessionResumeData,
169 SessionShutdownData,
170 SessionSnapshotRewindData,
171 SessionStartData,
172 SessionTruncationData,
173 SessionUsageInfoData,
174 ShutdownCodeChanges,
175 ShutdownType,
176 SkillInvokedData,
177 SystemMessageEventData,
178 SystemMessageMetadata,
179 SystemMessageRole,
180 ToolExecutionCompleteData,
181 ToolExecutionError,
182 ToolExecutionPartialResultData,
183 ToolExecutionProgressData,
184 ToolExecutionStartData,
185 ToolRequestItem,
186 ToolResultContent,
187 ToolUserRequestedData,
188 UserMessageAttachmentItem,
189 UserMessageData,
190};
191
192pub use transport::{MessageFramer, StdioTransport, Transport};
194
195pub use jsonrpc::{
197 JsonRpcClient, JsonRpcError, JsonRpcId, JsonRpcRequest, JsonRpcResponse, NotificationHandler,
198 RequestHandler,
199};
200
201pub use process::{
203 find_copilot_cli, find_executable, find_node, is_node_script, CopilotProcess, ProcessOptions,
204};
205
206pub use session::{
208 EventHandler, EventSubscription, InvokeFuture, PermissionHandler, RegisteredTool, Session,
209 ToolHandler, UserInputHandler,
210};
211
212pub use client::{Client, ClientBuilder, LifecycleHandler};