-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Expand file tree
/
Copy pathindex.ts
More file actions
139 lines (137 loc) · 4.01 KB
/
index.ts
File metadata and controls
139 lines (137 loc) · 4.01 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
/*---------------------------------------------------------------------------------------------
* 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 {
Canvas,
CanvasError,
createCanvas,
type CanvasAction,
type CanvasDeclaration,
type CanvasHostContext,
type CanvasHostContextCapabilities,
type CanvasJsonSchema,
type CanvasOptions,
} from "./canvas.js";
export {
defineTool,
approveAll,
convertMcpCallToolResult,
createSessionFsAdapter,
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.
//
// Three 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`), and
// `AssistantMessageEvent` (re-exported above from `./session.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 three identifiers is preserved unchanged.
export type * from "./generated/session-events.js";
export type {
CommandContext,
CommandDefinition,
CommandHandler,
CloudSessionOptions,
CloudSessionRepository,
AutoModeSwitchHandler,
AutoModeSwitchRequest,
AutoModeSwitchResponse,
CopilotClientMode,
CopilotClientOptions,
StdioRuntimeConnection,
TcpRuntimeConnection,
UriRuntimeConnection,
CustomAgentConfig,
ElicitationFieldValue,
ElicitationHandler,
ElicitationParams,
ElicitationContext,
ElicitationResult,
ElicitationSchema,
ElicitationSchemaField,
ExitPlanModeHandler,
ExitPlanModeRequest,
ExitPlanModeResult,
ExtensionInfo,
ForegroundSessionInfo,
GetAuthStatusResponse,
GetStatusResponse,
InfiniteSessionConfig,
LargeToolOutputConfig,
UiInputOptions,
MCPStdioServerConfig,
MCPHTTPServerConfig,
MCPServerConfig,
DefaultAgentConfig,
MessageOptions,
ModelBilling,
ModelCapabilities,
ModelCapabilitiesOverride,
ModelInfo,
ModelPolicy,
PermissionHandler,
PermissionRequest,
PermissionRequestResult,
ProviderConfig,
RemoteSessionMode,
ResumeSessionConfig,
SectionOverride,
SectionOverrideAction,
SectionTransformFn,
SessionCapabilities,
SessionConfig,
SessionConfigBase,
SessionEvent,
SessionEventHandler,
SessionEventPayload,
SessionEventType,
SessionLifecycleEvent,
SessionLifecycleEventMetadata,
SessionLifecycleEventType,
SessionLifecycleHandler,
SessionCreatedEvent,
SessionDeletedEvent,
SessionUpdatedEvent,
SessionForegroundEvent,
SessionBackgroundEvent,
SessionContext,
SessionListFilter,
SessionMetadata,
SessionUiApi,
SessionFsConfig,
SessionFsProvider,
SessionFsFileInfo,
SessionFsSqliteQueryResult,
SessionFsSqliteQueryType,
SessionFsSqliteProvider,
SystemMessageAppendConfig,
SystemMessageConfig,
SystemMessageCustomizeConfig,
SystemMessageReplaceConfig,
SystemMessageSection,
TelemetryConfig,
TraceContext,
TraceContextProvider,
Tool,
ToolHandler,
ToolInvocation,
ToolTelemetry,
ToolResultObject,
TypedSessionEventHandler,
TypedSessionLifecycleHandler,
ZodSchema,
} from "./types.js";