-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Expand file tree
/
Copy pathindex.ts
More file actions
212 lines (210 loc) · 6.06 KB
/
Copy pathindex.ts
File metadata and controls
212 lines (210 loc) · 6.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
*--------------------------------------------------------------------------------------------*/
/**
* Copilot SDK - TypeScript/Node.js Client
*
* JSON-RPC based SDK for programmatic control of GitHub Copilot CLI
*/
export { CopilotClient } from "./client.js";
export { RuntimeConnection } from "./types.js";
export { BuiltInTools, ToolSet } from "./toolSet.js";
export { CopilotSession, type AssistantMessageEvent } from "./session.js";
export { defineFactory, FactoryResumeError, isFactoryRunTerminal } from "./factory.js";
export {
Canvas,
CanvasError,
createCanvas,
type CanvasAction,
type CanvasDeclaration,
type CanvasHostContext,
type CanvasHostContextCapabilities,
type CanvasJsonSchema,
type CanvasOptions,
} from "./canvas.js";
export {
defineTool,
approveAll,
createAttributedPermissionResult,
convertMcpCallToolResult,
createSessionFsAdapter,
CopilotRequestHandler,
CopilotWebSocketHandler,
CopilotWebSocketCloseStatus,
CopilotWebSocketForwarder,
SessionFsSqliteTransactionFailure,
SYSTEM_MESSAGE_SECTIONS,
} from "./types.js";
// Re-export the generated session-event types (every *Event interface and
// its corresponding *Data payload type, plus supporting unions/aliases) so
// consumers can import them directly from "@github/copilot-sdk" instead of
// reaching into the package's internal dist layout. See issue #1156.
//
// Six names from this file are also explicitly exported elsewhere in this
// module — `SessionEvent` (re-exported below from `./types.js`),
// `PermissionRequest` (re-exported below from `./types.js`),
// `PermissionRequestedData`/`PermissionRequestedEvent` (also re-exported below
// from `./types.js`), `AssistantMessageEvent` (re-exported above from
// `./session.js`), and `JsonValue` (re-exported below from `./factory.js`).
// Per the ECMAScript module spec, the explicit named re-exports
// shadow the names arriving via `export type *`, so the hand-authored public API
// surface for those six identifiers is preserved unchanged.
export type * from "./generated/session-events.js";
export type {
CommandContext,
CommandDefinition,
CommandHandler,
CanvasProviderIdentity,
CloudSessionOptions,
CloudSessionRepository,
AutoModeSwitchHandler,
AutoModeSwitchRequest,
AutoModeSwitchResponse,
AgentStopHandler,
AgentStopHookInput,
AgentStopHookOutput,
UserPromptTransformedHandler,
UserPromptTransformedHookInput,
UserPromptTransformedHookOutput,
CopilotClientMode,
CopilotClientOptions,
CopilotExpAssignmentResponse,
StdioRuntimeConnection,
InProcessRuntimeConnection,
TcpRuntimeConnection,
UriRuntimeConnection,
ChildProcessRuntimeConnection,
CustomAgentConfig,
ElicitationFieldValue,
ElicitationHandler,
ElicitationParams,
ElicitationContext,
ElicitationResult,
ElicitationSchema,
ElicitationSchemaField,
ExpConfigEntry,
ExpFlagValue,
ExitPlanModeHandler,
ExitPlanModeRequest,
ExitPlanModeResult,
ExtensionInfo,
ForegroundSessionInfo,
GetAuthStatusResponse,
GetStatusResponse,
GitHubMcpToolConfig,
GitHubTelemetryNotification,
GitHubTelemetryEvent,
GitHubTelemetryClientInfo,
InfiniteSessionConfig,
LargeToolOutputConfig,
MemoryConfiguration,
UiInputOptions,
FactoryLimits,
FactoryMeta,
MCPStdioServerConfig,
MCPHTTPServerConfig,
MCPServerConfig,
DefaultAgentConfig,
BearerTokenProvider,
MessageOptions,
ManagedSettings,
ManagedSettingsPermissions,
ModelBilling,
ModelBillingTokenPrices,
ModelBillingTokenPricesLongContext,
CapiSessionOptions,
ModelCapabilities,
ModelCapabilitiesOverride,
ModelInfo,
ModelPolicy,
NamedProviderConfig,
PermissionHandler,
PermissionRequest,
PermissionRequestedData,
PermissionRequestedEvent,
PermissionRequestResult,
AttributedPermissionResult,
PermissionDecisionContext,
PermissionDecisionOutcome,
PermissionDecisionSource,
PermissionDecisionSurface,
ProviderConfig,
ProviderModelConfig,
ProviderTokenArgs,
RemoteSessionMode,
ResumeSessionConfig,
SectionOverride,
SectionOverrideAction,
SectionTransformFn,
SessionCapabilities,
SessionConfig,
SessionConfigBase,
SessionEvent,
SessionEventHandler,
SessionEventPayload,
SessionEventType,
SessionLifecycleEvent,
SessionLifecycleEventMetadata,
SessionLifecycleEventType,
SessionLifecycleHandler,
SessionHooks,
SessionCreatedEvent,
SessionDeletedEvent,
SessionUpdatedEvent,
SessionForegroundEvent,
SessionBackgroundEvent,
SessionContext,
SessionListFilter,
SessionMetadata,
SessionUiApi,
SessionFsConfig,
SessionFsProvider,
SessionFsFileInfo,
SessionFsSqliteQueryResult,
SessionFsSqliteQueryType,
SessionFsSqliteProvider,
SessionFsSqliteStatement,
SessionFsSqliteTransactionErrorClass,
CopilotRequestContext,
SystemMessageAppendConfig,
SystemMessageConfig,
SystemMessageCustomizeConfig,
SystemMessageReplaceConfig,
SystemMessageSection,
TelemetryConfig,
TraceContext,
TraceContextProvider,
Tool,
ToolHandler,
ToolInvocation,
CurrentToolMetadata,
ToolTelemetry,
ToolResultObject,
ToolSearchConfig,
TypedSessionEventHandler,
TypedSessionLifecycleHandler,
ZodSchema,
} from "./types.js";
export type {
RunOptions,
ResumeOptions,
FactoryResumeErrorCode,
SessionFactoryApi,
FactoryAgentOptions,
FactoryContext,
FactoryDefinition,
FactoryHandle,
FactoryJsonSchema,
JsonValue,
FactoryPipelineStage,
FactoryStepOptions,
FactoryRunResult,
FactoryRunStatus,
FactoryRunSummary,
FactoryRunDetail,
FactoryProgressPage,
FactoryProgressLine,
FactoryPhaseObservation,
FactoryPhaseStatus,
FactoryAgentSummary,
} from "./factory.js";