-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Expand file tree
/
Copy pathindex.ts
More file actions
116 lines (114 loc) · 3.4 KB
/
index.ts
File metadata and controls
116 lines (114 loc) · 3.4 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
/*---------------------------------------------------------------------------------------------
* 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 { CopilotSession, type AssistantMessageEvent } from "./session.js";
export {
buildMcpAppsAllowAttribute,
buildMcpAppsCspHeader,
type McpAppsCspInput,
type McpAppsPermissionsInput,
} from "./mcpAppsSandbox.js";
export {
defineTool,
approveAll,
convertMcpCallToolResult,
createSessionFsAdapter,
SYSTEM_PROMPT_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,
ConnectionState,
CopilotClientOptions,
CustomAgentConfig,
ElicitationFieldValue,
ElicitationHandler,
ElicitationParams,
ElicitationContext,
ElicitationResult,
ElicitationSchema,
ElicitationSchemaField,
ExitPlanModeHandler,
ExitPlanModeRequest,
ExitPlanModeResult,
ForegroundSessionInfo,
GetAuthStatusResponse,
GetStatusResponse,
InfiniteSessionConfig,
InputOptions,
MCPStdioServerConfig,
MCPHTTPServerConfig,
MCPServerConfig,
DefaultAgentConfig,
MessageOptions,
ModelBilling,
ModelCapabilities,
ModelCapabilitiesOverride,
ModelInfo,
ModelPolicy,
PermissionHandler,
PermissionRequest,
PermissionRequestResult,
ProviderConfig,
RemoteSessionMode,
ResumeSessionConfig,
SectionOverride,
SectionOverrideAction,
SectionTransformFn,
SessionCapabilities,
SessionConfig,
SessionEvent,
SessionEventHandler,
SessionEventPayload,
SessionEventType,
SessionLifecycleEvent,
SessionLifecycleEventType,
SessionLifecycleHandler,
SessionContext,
SessionListFilter,
SessionMetadata,
SessionUiApi,
SessionFsConfig,
SessionFsProvider,
SessionFsFileInfo,
SystemMessageAppendConfig,
SystemMessageConfig,
SystemMessageCustomizeConfig,
SystemMessageReplaceConfig,
SystemPromptSection,
TelemetryConfig,
TraceContext,
TraceContextProvider,
Tool,
ToolHandler,
ToolInvocation,
ToolResultObject,
TypedSessionEventHandler,
TypedSessionLifecycleHandler,
ZodSchema,
} from "./types.js";