@github/copilot-sdk-win32-x64 1.0.15-preview.1 → 1.0.15-preview.3
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/extension.js +49 -4
- package/copilot-sdk/generated/rpc.d.ts +357 -5
- package/copilot-sdk/generated/session-events.d.ts +20 -2
- package/copilot-sdk/index.d.ts +1 -1
- package/copilot-sdk/index.js +49 -4
- package/copilot-sdk/session.d.ts +1 -0
- package/copilot-sdk/types.d.ts +22 -2
- 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/msal-node-runtime.node +0 -0
- package/prebuilds/win32-x64/msalruntime.dll +0 -0
- package/prebuilds/win32-x64/runtime.node +2 -2
- package/ripgrep/bin/win32-x64/rg.exe +0 -0
- package/schemas/api.schema.json +553 -5
- package/schemas/session-events.schema.json +99 -4
- package/tgrep/bin/win32-x64/tgrep.exe +0 -0
- package/sdk/index.js +0 -1454
package/copilot-sdk/index.js
CHANGED
|
@@ -4080,6 +4080,15 @@ function createServerRpc(connection) {
|
|
|
4080
4080
|
getBuiltInCatalog: async () => connection.sendRequest("models.getBuiltInCatalog", {})
|
|
4081
4081
|
},
|
|
4082
4082
|
/** @experimental */
|
|
4083
|
+
sandbox: {
|
|
4084
|
+
/**
|
|
4085
|
+
* Reports whether the host running this runtime can run the command sandbox, without starting a session or spawning a sandboxed command.
|
|
4086
|
+
*
|
|
4087
|
+
* @returns Whether the host running this runtime can run the command sandbox. The runtime checks `supported` once per process. A capability answer can change while the process runs, for example after the user installs a missing package.
|
|
4088
|
+
*/
|
|
4089
|
+
getHostSupport: async () => connection.sendRequest("sandbox.getHostSupport", {})
|
|
4090
|
+
},
|
|
4091
|
+
/** @experimental */
|
|
4083
4092
|
tools: {
|
|
4084
4093
|
/**
|
|
4085
4094
|
* Lists built-in tools available for a model.
|
|
@@ -5438,7 +5447,20 @@ function createSessionRpc(connection, sessionId) {
|
|
|
5438
5447
|
*
|
|
5439
5448
|
* @returns Instruction sources loaded for the session, in merge order.
|
|
5440
5449
|
*/
|
|
5441
|
-
getSources: async () => connection.sendRequest("session.instructions.getSources", { sessionId })
|
|
5450
|
+
getSources: async () => connection.sendRequest("session.instructions.getSources", { sessionId }),
|
|
5451
|
+
/**
|
|
5452
|
+
* Invalidates cached custom-instruction discovery so subsequent turns and source reads observe instruction files currently on disk.
|
|
5453
|
+
*/
|
|
5454
|
+
reload: async () => connection.sendRequest("session.instructions.reload", { sessionId })
|
|
5455
|
+
},
|
|
5456
|
+
/** @experimental */
|
|
5457
|
+
customizations: {
|
|
5458
|
+
/**
|
|
5459
|
+
* Reloads all repository and user customizations for the active session: instructions, plugins and their MCP servers and hooks, custom agents, extensions, and skills. Returns diagnostics from the final skill reload.
|
|
5460
|
+
*
|
|
5461
|
+
* @returns Diagnostics from reloading skill definitions, with warnings and errors as separate lists.
|
|
5462
|
+
*/
|
|
5463
|
+
reload: async () => connection.sendRequest("session.customizations.reload", { sessionId })
|
|
5442
5464
|
},
|
|
5443
5465
|
/** @experimental */
|
|
5444
5466
|
fleet: {
|
|
@@ -5848,6 +5870,25 @@ function createSessionRpc(connection, sessionId) {
|
|
|
5848
5870
|
}
|
|
5849
5871
|
},
|
|
5850
5872
|
/** @experimental */
|
|
5873
|
+
diagnostics: {
|
|
5874
|
+
/**
|
|
5875
|
+
* Patches configured session diagnostic sources without restarting their producers. Setting a source level to off clears its retained diagnostics and invalidates cursors selecting that source.
|
|
5876
|
+
*
|
|
5877
|
+
* @param params Patch session diagnostic thresholds for explicitly supplied sources.
|
|
5878
|
+
*
|
|
5879
|
+
* @returns Per-source session diagnostics configuration.
|
|
5880
|
+
*/
|
|
5881
|
+
configure: async (params) => connection.sendRequest("session.diagnostics.configure", { sessionId, ...params }),
|
|
5882
|
+
/**
|
|
5883
|
+
* Reads a bounded batch of retained session diagnostics for the selected sources. Records are never consumed and each reader advances independently through its opaque cursor.
|
|
5884
|
+
*
|
|
5885
|
+
* @param params Cursor-based request for session diagnostics. The default limit is 100 (maximum 500); the default waitMs is zero (maximum 30000).
|
|
5886
|
+
*
|
|
5887
|
+
* @returns One cursor-addressed page of retained session diagnostics.
|
|
5888
|
+
*/
|
|
5889
|
+
read: async (params) => connection.sendRequest("session.diagnostics.read", { sessionId, ...params })
|
|
5890
|
+
},
|
|
5891
|
+
/** @experimental */
|
|
5851
5892
|
connectors: {
|
|
5852
5893
|
/**
|
|
5853
5894
|
* Returns feature availability and bounded polling limits for the EXPERIMENTAL session connector API. This method never performs a Connector service request.
|
|
@@ -6727,11 +6768,11 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6727
6768
|
*/
|
|
6728
6769
|
updateText: async (params) => connection.sendRequest("session.queue.updateText", { sessionId, ...params }),
|
|
6729
6770
|
/**
|
|
6730
|
-
* Atomically withdraws an unchanged
|
|
6771
|
+
* Atomically withdraws an unchanged user message of a local session: from the queued or steering lane while unconsumed, or from the running turn it started while the model has not answered it and nothing the user sent after it is pending. Withdrawing from the running turn interrupts that turn and removes its events from history. A client retaining the original draft may restore it only when removed is true.
|
|
6731
6772
|
*
|
|
6732
|
-
* @param params Conditional withdrawal of a single user message,
|
|
6773
|
+
* @param params Conditional withdrawal of a single user message, from its queue or from the running turn it started.
|
|
6733
6774
|
*
|
|
6734
|
-
* @returns Result of
|
|
6775
|
+
* @returns Result of withdrawing a user message.
|
|
6735
6776
|
*/
|
|
6736
6777
|
withdrawMessage: async (params) => connection.sendRequest("session.queue.withdrawMessage", { sessionId, ...params }),
|
|
6737
6778
|
/**
|
|
@@ -9494,6 +9535,7 @@ var CopilotSession = class {
|
|
|
9494
9535
|
});
|
|
9495
9536
|
let lastAssistantMessage;
|
|
9496
9537
|
const unsubscribe = this.on((event) => {
|
|
9538
|
+
if (event.agentId) return;
|
|
9497
9539
|
if (event.type === "assistant.message") {
|
|
9498
9540
|
lastAssistantMessage = event;
|
|
9499
9541
|
} else if (event.type === "session.idle" && event.data.mode !== "autopilot") {
|
|
@@ -12660,6 +12702,7 @@ var CopilotClient = class _CopilotClient {
|
|
|
12660
12702
|
includeSubAgentStreamingEvents: config.includeSubAgentStreamingEvents ?? true,
|
|
12661
12703
|
...this.onGitHubTelemetry != null ? { enableGitHubTelemetryForwarding: true } : {},
|
|
12662
12704
|
mcpServers: toWireMcpServers(config.mcpServers),
|
|
12705
|
+
...config.diagnostics !== void 0 ? { diagnostics: config.diagnostics } : {},
|
|
12663
12706
|
mcpOAuthTokenStorage: config.mcpOAuthTokenStorage,
|
|
12664
12707
|
authClientIdMetadataUrl: config.authClientIdMetadataUrl,
|
|
12665
12708
|
envValueMode: "direct",
|
|
@@ -12669,6 +12712,7 @@ var CopilotClient = class _CopilotClient {
|
|
|
12669
12712
|
agent: config.agent,
|
|
12670
12713
|
configDir: config.configDirectory,
|
|
12671
12714
|
enableConfigDiscovery: config.enableConfigDiscovery,
|
|
12715
|
+
refreshCustomInstructions: config.refreshCustomInstructions,
|
|
12672
12716
|
skipEmbeddingRetrieval: config.skipEmbeddingRetrieval,
|
|
12673
12717
|
embeddingCacheStorage: config.embeddingCacheStorage,
|
|
12674
12718
|
organizationCustomInstructions: config.organizationCustomInstructions,
|
|
@@ -12911,6 +12955,7 @@ var CopilotClient = class _CopilotClient {
|
|
|
12911
12955
|
includeSubAgentStreamingEvents: config.includeSubAgentStreamingEvents ?? true,
|
|
12912
12956
|
...this.onGitHubTelemetry != null ? { enableGitHubTelemetryForwarding: true } : {},
|
|
12913
12957
|
mcpServers: toWireMcpServers(config.mcpServers),
|
|
12958
|
+
...config.diagnostics !== void 0 ? { diagnostics: config.diagnostics } : {},
|
|
12914
12959
|
mcpOAuthTokenStorage: config.mcpOAuthTokenStorage,
|
|
12915
12960
|
authClientIdMetadataUrl: config.authClientIdMetadataUrl,
|
|
12916
12961
|
envValueMode: "direct",
|
package/copilot-sdk/session.d.ts
CHANGED
|
@@ -167,6 +167,7 @@ export declare class CopilotSession {
|
|
|
167
167
|
* assistant has finished processing the message.
|
|
168
168
|
*
|
|
169
169
|
* Events are still delivered to handlers registered via {@link on} while waiting.
|
|
170
|
+
* Sub-agent events with a non-empty `agentId` do not complete the wait or supply its reply.
|
|
170
171
|
* With a schema as the second argument, returns its parsed, validated result.
|
|
171
172
|
* Structured waits select only root-agent output originating from this send;
|
|
172
173
|
* other queued work may delay session.idle but cannot replace the result.
|
package/copilot-sdk/types.d.ts
CHANGED
|
@@ -7,11 +7,11 @@ import type { CopilotRequestHandler } from "./copilotRequestHandler.js";
|
|
|
7
7
|
import type { AttachmentExtensionContext as GeneratedExtensionContextAttachment, AutoTier, PermissionRequest as GeneratedPermissionRequest, PermissionRequestedData as GeneratedPermissionRequestedData, PermissionRequestedEvent as GeneratedPermissionRequestedEvent, ReasoningSummary, SessionLimitsConfig, SessionEvent as GeneratedSessionEvent } from "./generated/session-events.js";
|
|
8
8
|
import type { CopilotSession } from "./session.js";
|
|
9
9
|
import type { FactoryJsonSchema, JsonValue } from "./factory.js";
|
|
10
|
-
import type { ExtensionLaunchProviderHandler as GeneratedExtensionLaunchProvider, GitHubTokenAcquireRequest, GitHubTokenAcquireResult, GitHubTelemetryNotification, ModelBillingTokenPrices, OpenCanvasInstance, RemoteSessionMode, CurrentToolMetadata } from "./generated/rpc.js";
|
|
10
|
+
import type { ExtensionLaunchProviderHandler as GeneratedExtensionLaunchProvider, GitHubTokenAcquireRequest, GitHubTokenAcquireResult, GitHubTelemetryNotification, ModelBillingTokenPrices, DiagnosticsConfiguration, OpenCanvasInstance, RemoteSessionMode, CurrentToolMetadata } from "./generated/rpc.js";
|
|
11
11
|
import type { ToolSet } from "./toolSet.js";
|
|
12
12
|
export type { RemoteSessionMode } from "./generated/rpc.js";
|
|
13
13
|
export type { CurrentToolMetadata } from "./generated/rpc.js";
|
|
14
|
-
export type { ExtensionLaunchProfile, ExtensionLaunchProviderResolveRequest, ExtensionLaunchProviderResolveResult, GitHubTokenAcquireReason, GitHubTokenAcquireResult, GitHubTelemetryNotification, GitHubTelemetryEvent, GitHubTelemetryClientInfo, } from "./generated/rpc.js";
|
|
14
|
+
export type { ConnectorAccountRequest, ConnectorAvailability, ConnectorCapabilities, ConnectorCatalogEntry, ConnectorCatalogResult, ConnectorCatalogStatus, ConnectorConnectRequest, ConnectorConnectResult, ConnectorContinueRequest, ConnectorDisconnectResult, ConnectorMcpStatus, ConnectorReconcileRequest, ConnectorRuntimeStatus, ConnectorStatus, ExtensionLaunchProfile, ExtensionLaunchProviderResolveRequest, ExtensionLaunchProviderResolveResult, GitHubTokenAcquireReason, GitHubTokenAcquireResult, GitHubTelemetryNotification, GitHubTelemetryEvent, GitHubTelemetryClientInfo, } from "./generated/rpc.js";
|
|
15
15
|
/**
|
|
16
16
|
* Arguments passed to a session's {@link GitHubTokenProvider}.
|
|
17
17
|
*
|
|
@@ -1622,6 +1622,8 @@ export interface McpAuthStaticClientConfig {
|
|
|
1622
1622
|
grantType?: "client_credentials";
|
|
1623
1623
|
/** Whether this is a public OAuth client. */
|
|
1624
1624
|
publicClient?: boolean;
|
|
1625
|
+
/** Configured OAuth scope string used when the server challenge omits scope. */
|
|
1626
|
+
scope?: string;
|
|
1625
1627
|
}
|
|
1626
1628
|
/** MCP OAuth request that the SDK host can satisfy with a host-acquired token. */
|
|
1627
1629
|
export interface McpAuthRequest {
|
|
@@ -1922,6 +1924,16 @@ export interface SessionConfigBase {
|
|
|
1922
1924
|
* the session to the long-context tier; omit or use "default" otherwise.
|
|
1923
1925
|
*/
|
|
1924
1926
|
contextTier?: ContextTier;
|
|
1927
|
+
/**
|
|
1928
|
+
* Enables session-scoped MCP diagnostic capture at the requested level.
|
|
1929
|
+
*
|
|
1930
|
+
* Diagnostics are off by default. At `"debug"` and `"trace"` levels, entries
|
|
1931
|
+
* can contain MCP payloads, tool arguments, paths, and server stderr. Do not
|
|
1932
|
+
* upload entries as telemetry or export them without deliberate host action.
|
|
1933
|
+
* Omit this option when resuming a resident session to preserve its current
|
|
1934
|
+
* diagnostic level.
|
|
1935
|
+
*/
|
|
1936
|
+
diagnostics?: DiagnosticsConfiguration;
|
|
1925
1937
|
/** Per-property overrides for model capabilities, deep-merged over runtime defaults. */
|
|
1926
1938
|
modelCapabilities?: ModelCapabilitiesOverride;
|
|
1927
1939
|
/**
|
|
@@ -2465,6 +2477,14 @@ export interface SessionConfig extends SessionConfigBase {
|
|
|
2465
2477
|
* Optional custom session ID. If not provided, the server generates one.
|
|
2466
2478
|
*/
|
|
2467
2479
|
sessionId?: string;
|
|
2480
|
+
/**
|
|
2481
|
+
* Invalidates the process-wide custom-instruction discovery cache before
|
|
2482
|
+
* creating this session. Use when instruction files changed in the same runtime.
|
|
2483
|
+
* Other sessions in this runtime may observe updated instructions on later turns
|
|
2484
|
+
* or discovery. This does not watch files or enable disabled instruction loading.
|
|
2485
|
+
* @default false
|
|
2486
|
+
*/
|
|
2487
|
+
refreshCustomInstructions?: boolean;
|
|
2468
2488
|
/**
|
|
2469
2489
|
* Creates a remote session in the cloud instead of a local session.
|
|
2470
2490
|
* The optional repository is associated with the cloud session.
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
[diffend] Oversized file quarantined before diffing.
|
|
2
2
|
name: package/prebuilds/win32-x64/runtime.node
|
|
3
|
-
size:
|
|
4
|
-
sha256:
|
|
3
|
+
size: 93024032 bytes
|
|
4
|
+
sha256: 1a8ccd4ca0c9a12e826f224dd1d17e0174683006bc1731562e1f225d2a1c6761
|
|
Binary file
|