🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@github/copilot-sdk

Package Overview
Dependencies
Maintainers
22
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@github/copilot-sdk - npm Package Compare versions

Comparing version
0.1.25
to
0.1.26-preview.0
+11
-3
dist/client.js

@@ -24,2 +24,8 @@ import { spawn } from "node:child_process";

}
function getNodeExecPath() {
if (process.versions.bun) {
return "node";
}
return process.execPath;
}
function getBundledCliPath() {

@@ -358,2 +364,3 @@ const sdkUrl = import.meta.resolve("@github/copilot/sdk");

sessionId: config.sessionId,
clientName: config.clientName,
reasoningEffort: config.reasoningEffort,

@@ -369,3 +376,3 @@ tools: config.tools?.map((tool) => ({

provider: config.provider,
requestPermission: !!config.onPermissionRequest,
requestPermission: true,
requestUserInput: !!config.onUserInputRequest,

@@ -431,2 +438,3 @@ hooks: !!(config.hooks && Object.values(config.hooks).some(Boolean)),

sessionId,
clientName: config.clientName,
model: config.model,

@@ -443,3 +451,3 @@ reasoningEffort: config.reasoningEffort,

provider: config.provider,
requestPermission: !!config.onPermissionRequest,
requestPermission: true,
requestUserInput: !!config.onUserInputRequest,

@@ -769,3 +777,3 @@ hooks: !!(config.hooks && Object.values(config.hooks).some(Boolean)),

if (isJsFile) {
this.cliProcess = spawn(process.execPath, [this.options.cliPath, ...args], {
this.cliProcess = spawn(getNodeExecPath(), [this.options.cliPath, ...args], {
stdio: stdioConfig,

@@ -772,0 +780,0 @@ cwd: this.options.cwd,

@@ -8,3 +8,3 @@ /**

export { CopilotSession, type AssistantMessageEvent } from "./session.js";
export { defineTool } from "./types.js";
export { defineTool, approveAll } from "./types.js";
export type { ConnectionState, CopilotClientOptions, CustomAgentConfig, ForegroundSessionInfo, GetAuthStatusResponse, GetStatusResponse, InfiniteSessionConfig, MCPLocalServerConfig, MCPRemoteServerConfig, MCPServerConfig, MessageOptions, ModelBilling, ModelCapabilities, ModelInfo, ModelPolicy, PermissionHandler, PermissionRequest, PermissionRequestResult, ResumeSessionConfig, SessionConfig, SessionEvent, SessionEventHandler, SessionEventPayload, SessionEventType, SessionLifecycleEvent, SessionLifecycleEventType, SessionLifecycleHandler, SessionContext, SessionListFilter, SessionMetadata, SystemMessageAppendConfig, SystemMessageConfig, SystemMessageReplaceConfig, Tool, ToolHandler, ToolInvocation, ToolResultObject, TypedSessionEventHandler, TypedSessionLifecycleHandler, ZodSchema, } from "./types.js";
import { CopilotClient } from "./client.js";
import { CopilotSession } from "./session.js";
import { defineTool } from "./types.js";
import { defineTool, approveAll } from "./types.js";
export {
CopilotClient,
CopilotSession,
approveAll,
defineTool
};

@@ -182,2 +182,3 @@ /**

}) => Promise<PermissionRequestResult> | PermissionRequestResult;
export declare const approveAll: PermissionHandler;
/**

@@ -505,2 +506,7 @@ * Request for user input from the agent (enables ask_user tool)

/**
* Client name to identify the application using the SDK.
* Included in the User-Agent header for API requests.
*/
clientName?: string;
/**
* Model to use for this session

@@ -592,3 +598,3 @@ */

*/
export type ResumeSessionConfig = Pick<SessionConfig, "model" | "tools" | "systemMessage" | "availableTools" | "excludedTools" | "provider" | "streaming" | "reasoningEffort" | "onPermissionRequest" | "onUserInputRequest" | "hooks" | "workingDirectory" | "configDir" | "mcpServers" | "customAgents" | "skillDirectories" | "disabledSkills" | "infiniteSessions"> & {
export type ResumeSessionConfig = Pick<SessionConfig, "clientName" | "model" | "tools" | "systemMessage" | "availableTools" | "excludedTools" | "provider" | "streaming" | "reasoningEffort" | "onPermissionRequest" | "onUserInputRequest" | "hooks" | "workingDirectory" | "configDir" | "mcpServers" | "customAgents" | "skillDirectories" | "disabledSkills" | "infiniteSessions"> & {
/**

@@ -595,0 +601,0 @@ * When true, skips emitting the session.resume event.

function defineTool(name, config) {
return { name, ...config };
}
const approveAll = () => ({ kind: "approved" });
export {
approveAll,
defineTool
};

@@ -7,3 +7,3 @@ {

},
"version": "0.1.25",
"version": "0.1.26-preview.0",
"description": "TypeScript SDK for programmatic control of GitHub Copilot CLI via JSON-RPC",

@@ -10,0 +10,0 @@ "main": "./dist/index.js",