@github/copilot-sdk
Advanced tools
+6
-0
@@ -394,3 +394,7 @@ import { spawn } from "node:child_process"; | ||
| sessionId, | ||
| model: config.model, | ||
| reasoningEffort: config.reasoningEffort, | ||
| systemMessage: config.systemMessage, | ||
| availableTools: config.availableTools, | ||
| excludedTools: config.excludedTools, | ||
| tools: config.tools?.map((tool) => ({ | ||
@@ -406,2 +410,3 @@ name: tool.name, | ||
| workingDirectory: config.workingDirectory, | ||
| configDir: config.configDir, | ||
| streaming: config.streaming, | ||
@@ -412,2 +417,3 @@ mcpServers: config.mcpServers, | ||
| disabledSkills: config.disabledSkills, | ||
| infiniteSessions: config.infiniteSessions, | ||
| disableResume: config.disableResume | ||
@@ -414,0 +420,0 @@ }); |
+5
-1
@@ -99,6 +99,7 @@ class CopilotSession { | ||
| }); | ||
| let timeoutId; | ||
| try { | ||
| await this.send(options); | ||
| const timeoutPromise = new Promise((_, reject) => { | ||
| setTimeout( | ||
| timeoutId = setTimeout( | ||
| () => reject( | ||
@@ -115,2 +116,5 @@ new Error( | ||
| } finally { | ||
| if (timeoutId !== void 0) { | ||
| clearTimeout(timeoutId); | ||
| } | ||
| unsubscribe(); | ||
@@ -117,0 +121,0 @@ } |
+22
-3
@@ -590,3 +590,3 @@ /** | ||
| */ | ||
| export type ResumeSessionConfig = Pick<SessionConfig, "tools" | "provider" | "streaming" | "reasoningEffort" | "onPermissionRequest" | "onUserInputRequest" | "hooks" | "workingDirectory" | "mcpServers" | "customAgents" | "skillDirectories" | "disabledSkills"> & { | ||
| export type ResumeSessionConfig = Pick<SessionConfig, "model" | "tools" | "systemMessage" | "availableTools" | "excludedTools" | "provider" | "streaming" | "reasoningEffort" | "onPermissionRequest" | "onUserInputRequest" | "hooks" | "workingDirectory" | "configDir" | "mcpServers" | "customAgents" | "skillDirectories" | "disabledSkills" | "infiniteSessions"> & { | ||
| /** | ||
@@ -644,8 +644,27 @@ * When true, skips emitting the session.resume event. | ||
| /** | ||
| * File or directory attachments | ||
| * File, directory, or selection attachments | ||
| */ | ||
| attachments?: Array<{ | ||
| type: "file" | "directory"; | ||
| type: "file"; | ||
| path: string; | ||
| displayName?: string; | ||
| } | { | ||
| type: "directory"; | ||
| path: string; | ||
| displayName?: string; | ||
| } | { | ||
| type: "selection"; | ||
| filePath: string; | ||
| displayName: string; | ||
| selection?: { | ||
| start: { | ||
| line: number; | ||
| character: number; | ||
| }; | ||
| end: { | ||
| line: number; | ||
| character: number; | ||
| }; | ||
| }; | ||
| text?: string; | ||
| }>; | ||
@@ -652,0 +671,0 @@ /** |
+5
-5
@@ -7,3 +7,3 @@ { | ||
| }, | ||
| "version": "0.1.21", | ||
| "version": "0.1.22", | ||
| "description": "TypeScript SDK for programmatic control of GitHub Copilot CLI via JSON-RPC", | ||
@@ -44,5 +44,5 @@ "main": "./dist/index.js", | ||
| "dependencies": { | ||
| "@github/copilot": "^0.0.402", | ||
| "@github/copilot": "^0.0.403", | ||
| "vscode-jsonrpc": "^8.2.1", | ||
| "zod": "^4.3.5" | ||
| "zod": "^4.3.6" | ||
| }, | ||
@@ -55,6 +55,6 @@ "devDependencies": { | ||
| "eslint": "^9.0.0", | ||
| "glob": "^11.0.0", | ||
| "glob": "^13.0.1", | ||
| "json-schema": "^0.4.0", | ||
| "json-schema-to-typescript": "^15.0.4", | ||
| "prettier": "^3.4.0", | ||
| "prettier": "^3.8.1", | ||
| "quicktype-core": "^23.2.6", | ||
@@ -61,0 +61,0 @@ "rimraf": "^6.1.2", |
132595
0.67%3502
0.86%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
Updated
Updated