@github/copilot-sdk-win32-x64 1.0.15 → 1.0.16-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/copilot-sdk/client.d.ts +27 -1
- package/copilot-sdk/extension.js +470 -10
- package/copilot-sdk/generated/rpc.d.ts +997 -14
- package/copilot-sdk/generated/session-events.d.ts +81 -1
- package/copilot-sdk/host.d.ts +86 -0
- package/copilot-sdk/index.d.ts +3 -1
- package/copilot-sdk/index.js +471 -10
- package/copilot-sdk/types.d.ts +3 -0
- package/package.json +1 -1
- package/prebuilds/win32-x64/OneAuthInterop.dll +0 -0
- package/prebuilds/win32-x64/copilot-runtime.exe +0 -0
- package/prebuilds/win32-x64/runtime.node +2 -2
- package/ripgrep/bin/win32-x64/rg.exe +0 -0
- package/schemas/api.schema.json +1093 -8
- package/schemas/session-events.schema.json +305 -3
- package/tgrep/bin/win32-x64/tgrep.exe +0 -0
package/copilot-sdk/client.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { createServerRpc } from "./generated/rpc.js";
|
|
2
2
|
import { CopilotSession } from "./session.js";
|
|
3
|
+
import { AhpHost, type AhpHostOptions } from "./host.js";
|
|
3
4
|
import type { CopilotClientOptions, GetAuthStatusResponse, GetStatusResponse, ModelInfo, ResumeSessionConfig, SessionConfig, SessionLifecycleEventType, SessionLifecycleHandler, SessionListFilter, SessionMetadata, TypedSessionLifecycleHandler } from "./types.js";
|
|
4
5
|
export declare class CopilotClient {
|
|
5
6
|
private cliStartTimeout;
|
|
@@ -16,6 +17,9 @@ export declare class CopilotClient {
|
|
|
16
17
|
/** Shared in-flight start; concurrent callers await it instead of spawning another CLI. */
|
|
17
18
|
private startPromise;
|
|
18
19
|
private sessions;
|
|
20
|
+
private hostExitCallbacks;
|
|
21
|
+
private hostSessionFactories;
|
|
22
|
+
private hostHandoffs;
|
|
19
23
|
private stderrBuffer;
|
|
20
24
|
/** Resolved connection mode chosen in the constructor. */
|
|
21
25
|
private connectionConfig;
|
|
@@ -135,7 +139,8 @@ export declare class CopilotClient {
|
|
|
135
139
|
* 1. Closes all active sessions (releases in-memory resources)
|
|
136
140
|
* 2. Requests runtime shutdown for SDK-owned CLI processes
|
|
137
141
|
* 3. Closes the JSON-RPC connection
|
|
138
|
-
* 4.
|
|
142
|
+
* 4. Signals EOF to an owned stdio process and waits for host cleanup, then
|
|
143
|
+
* terminates the process if it does not exit within the shutdown timeout
|
|
139
144
|
*
|
|
140
145
|
* Note: session data on disk is preserved, so sessions can be resumed later.
|
|
141
146
|
* To permanently remove session data before stopping, call
|
|
@@ -242,6 +247,27 @@ export declare class CopilotClient {
|
|
|
242
247
|
*/
|
|
243
248
|
resumeSession(sessionId: string, config: ResumeSessionConfig): Promise<CopilotSession>;
|
|
244
249
|
private resumeSessionInternal;
|
|
250
|
+
/**
|
|
251
|
+
* Start a complete AHP listener hosted in-process by this runtime.
|
|
252
|
+
*
|
|
253
|
+
* This connection owns the host. Disposing it or disconnecting the client
|
|
254
|
+
* stops the listener without deleting sessions. The host uses a separate
|
|
255
|
+
* SDK connection to the same runtime, not another runtime process.
|
|
256
|
+
* Only one AHP host may own the catalog in an effective Copilot home
|
|
257
|
+
* at a time. Other SDK clients and sessions remain usable in that home.
|
|
258
|
+
* Select localServer, githubEnvironment, or both. An empty localServer
|
|
259
|
+
* selects 127.0.0.1 on an available port. `onExit` runs at most once; owner disconnection cannot
|
|
260
|
+
* acknowledge listener cleanup over the disconnected transport.
|
|
261
|
+
*
|
|
262
|
+
* @experimental
|
|
263
|
+
*/
|
|
264
|
+
startAhpHost(options: AhpHostOptions): Promise<AhpHost>;
|
|
265
|
+
private handleHostExit;
|
|
266
|
+
private disconnectHosts;
|
|
267
|
+
private releaseHostSessions;
|
|
268
|
+
private releaseHostSession;
|
|
269
|
+
private notifyHostSessionReleased;
|
|
270
|
+
private createHostSession;
|
|
245
271
|
/**
|
|
246
272
|
* Sends a ping request to the server to verify connectivity.
|
|
247
273
|
*
|