@github/copilot-sdk 0.1.9 → 0.1.10-preview.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client.js +4 -2
- package/dist/generated/session-events.d.ts +34 -1
- package/dist/types.d.ts +9 -1
- package/package.json +2 -2
package/dist/client.js
CHANGED
|
@@ -216,7 +216,8 @@ class CopilotClient {
|
|
|
216
216
|
systemMessage: config.systemMessage,
|
|
217
217
|
availableTools: config.availableTools,
|
|
218
218
|
excludedTools: config.excludedTools,
|
|
219
|
-
provider: config.provider
|
|
219
|
+
provider: config.provider,
|
|
220
|
+
streaming: config.streaming
|
|
220
221
|
});
|
|
221
222
|
const sessionId = response.sessionId;
|
|
222
223
|
const session = new CopilotSession(sessionId, this.connection);
|
|
@@ -242,7 +243,8 @@ class CopilotClient {
|
|
|
242
243
|
description: tool.description,
|
|
243
244
|
parameters: toJsonSchema(tool.parameters)
|
|
244
245
|
})),
|
|
245
|
-
provider: config.provider
|
|
246
|
+
provider: config.provider,
|
|
247
|
+
streaming: config.streaming
|
|
246
248
|
});
|
|
247
249
|
const resumedSessionId = response.sessionId;
|
|
248
250
|
const session = new CopilotSession(resumedSessionId, this.connection);
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Generated from: @github/copilot/session-events.schema.json
|
|
5
5
|
* Generated by: scripts/generate-session-types.ts
|
|
6
|
-
* Generated at: 2026-01-
|
|
6
|
+
* Generated at: 2026-01-08T23:59:19.905Z
|
|
7
7
|
*
|
|
8
8
|
* To update these types:
|
|
9
9
|
* 1. Update the schema in copilot-agent-runtime
|
|
@@ -139,6 +139,27 @@ export type SessionEvent = {
|
|
|
139
139
|
data: {
|
|
140
140
|
intent: string;
|
|
141
141
|
};
|
|
142
|
+
} | {
|
|
143
|
+
id: string;
|
|
144
|
+
timestamp: string;
|
|
145
|
+
parentId: string | null;
|
|
146
|
+
ephemeral?: boolean;
|
|
147
|
+
type: "assistant.reasoning";
|
|
148
|
+
data: {
|
|
149
|
+
reasoningId: string;
|
|
150
|
+
content: string;
|
|
151
|
+
chunkContent?: string;
|
|
152
|
+
};
|
|
153
|
+
} | {
|
|
154
|
+
id: string;
|
|
155
|
+
timestamp: string;
|
|
156
|
+
parentId: string | null;
|
|
157
|
+
ephemeral?: true;
|
|
158
|
+
type: "assistant.reasoning_delta";
|
|
159
|
+
data: {
|
|
160
|
+
reasoningId: string;
|
|
161
|
+
deltaContent: string;
|
|
162
|
+
};
|
|
142
163
|
} | {
|
|
143
164
|
id: string;
|
|
144
165
|
timestamp: string;
|
|
@@ -157,6 +178,18 @@ export type SessionEvent = {
|
|
|
157
178
|
}[];
|
|
158
179
|
parentToolCallId?: string;
|
|
159
180
|
};
|
|
181
|
+
} | {
|
|
182
|
+
id: string;
|
|
183
|
+
timestamp: string;
|
|
184
|
+
parentId: string | null;
|
|
185
|
+
ephemeral?: true;
|
|
186
|
+
type: "assistant.message_delta";
|
|
187
|
+
data: {
|
|
188
|
+
messageId: string;
|
|
189
|
+
deltaContent: string;
|
|
190
|
+
totalResponseSizeBytes?: number;
|
|
191
|
+
parentToolCallId?: string;
|
|
192
|
+
};
|
|
160
193
|
} | {
|
|
161
194
|
id: string;
|
|
162
195
|
timestamp: string;
|
package/dist/types.d.ts
CHANGED
|
@@ -185,11 +185,19 @@ export interface SessionConfig {
|
|
|
185
185
|
* When specified, uses the provided API endpoint instead of the Copilot API.
|
|
186
186
|
*/
|
|
187
187
|
provider?: ProviderConfig;
|
|
188
|
+
/**
|
|
189
|
+
* Enable streaming of assistant message and reasoning chunks.
|
|
190
|
+
* When true, ephemeral assistant.message_delta and assistant.reasoning_delta
|
|
191
|
+
* events are sent as the response is generated. Clients should accumulate
|
|
192
|
+
* deltaContent values to build the full response.
|
|
193
|
+
* @default false
|
|
194
|
+
*/
|
|
195
|
+
streaming?: boolean;
|
|
188
196
|
}
|
|
189
197
|
/**
|
|
190
198
|
* Configuration for resuming a session
|
|
191
199
|
*/
|
|
192
|
-
export type ResumeSessionConfig = Pick<SessionConfig, "tools" | "provider">;
|
|
200
|
+
export type ResumeSessionConfig = Pick<SessionConfig, "tools" | "provider" | "streaming">;
|
|
193
201
|
/**
|
|
194
202
|
* Configuration for a custom API provider.
|
|
195
203
|
*/
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"type": "git",
|
|
5
5
|
"url": "https://github.com/github/copilot-sdk.git"
|
|
6
6
|
},
|
|
7
|
-
"version": "0.1.
|
|
7
|
+
"version": "0.1.10-preview.0",
|
|
8
8
|
"description": "TypeScript SDK for programmatic control of GitHub Copilot CLI via JSON-RPC",
|
|
9
9
|
"main": "./dist/index.js",
|
|
10
10
|
"types": "./dist/index.d.ts",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"author": "GitHub",
|
|
40
40
|
"license": "MIT",
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@github/copilot": "^0.0.
|
|
42
|
+
"@github/copilot": "^0.0.377",
|
|
43
43
|
"vscode-jsonrpc": "^8.2.1",
|
|
44
44
|
"zod": "^4.3.5"
|
|
45
45
|
},
|