@github/copilot-sdk-win32-x64 1.0.17-preview.2 → 1.0.17-preview.4
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/canvas.d.ts +6 -1
- package/copilot-sdk/docs/agent-author.md +29 -2
- package/copilot-sdk/extension.js +293 -19
- package/copilot-sdk/generated/rpc.d.ts +1128 -411
- package/copilot-sdk/generated/session-events.d.ts +255 -4
- package/copilot-sdk/index.d.ts +2 -2
- package/copilot-sdk/index.js +296 -21
- package/copilot-sdk/session.d.ts +45 -1
- package/copilot-sdk/sessionFsProvider.d.ts +9 -1
- package/copilot-sdk/types.d.ts +83 -2
- package/package.json +1 -1
- package/prebuilds/win32-x64/copilot-runtime.exe +0 -0
- package/prebuilds/win32-x64/dpapi.node +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 +1359 -125
- package/schemas/session-events.schema.json +434 -7
- package/tgrep/bin/win32-x64/tgrep.exe +0 -0
- package/prebuilds/win32-x64/OneAuthInterop.LICENSE.txt +0 -192
- package/prebuilds/win32-x64/OneAuthInterop.dll +0 -0
- package/prebuilds/win32-x64/OneAuthInterop.dll.stamp.json +0 -4
package/copilot-sdk/types.d.ts
CHANGED
|
@@ -48,6 +48,7 @@ export type { SessionFsSqliteProvider } from "./sessionFsProvider.js";
|
|
|
48
48
|
export type { SessionFsSqliteStatement } from "./sessionFsProvider.js";
|
|
49
49
|
export type { SessionFsSqliteTransactionErrorClass } from "./sessionFsProvider.js";
|
|
50
50
|
export { SessionFsSqliteTransactionFailure } from "./sessionFsProvider.js";
|
|
51
|
+
export { SessionFsWriteFailure } from "./sessionFsProvider.js";
|
|
51
52
|
export type { LlmInferenceHeaders } from "./generated/rpc.js";
|
|
52
53
|
export type { PermissionDecisionContext, PermissionDecisionOutcome, PermissionDecisionSurface, PermissionResponseCapability, } from "./generated/rpc.js";
|
|
53
54
|
export type { PermissionDecisionSource } from "./generated/session-events.js";
|
|
@@ -922,6 +923,8 @@ export interface SystemMessageReplaceConfig {
|
|
|
922
923
|
/**
|
|
923
924
|
* Customize mode: Override individual sections of the system prompt.
|
|
924
925
|
* Keeps the SDK-managed prompt structure while allowing targeted modifications.
|
|
926
|
+
* The `last_instructions` section includes configured subagent-model guidance.
|
|
927
|
+
* Its overrides and transforms control that prose, not runtime model selection or tool availability.
|
|
925
928
|
*/
|
|
926
929
|
export interface SystemMessageCustomizeConfig {
|
|
927
930
|
mode: "customize";
|
|
@@ -1098,8 +1101,9 @@ export type AutoModeSwitchHandler = (request: AutoModeSwitchRequest, invocation:
|
|
|
1098
1101
|
* Base interface for all hook inputs
|
|
1099
1102
|
*/
|
|
1100
1103
|
export interface BaseHookInput {
|
|
1101
|
-
/** The runtime session ID
|
|
1102
|
-
*
|
|
1104
|
+
/** The runtime session ID associated with the hook. Child tool hooks use
|
|
1105
|
+
* the child session ID; sub-agent lifecycle hooks use the parent session ID,
|
|
1106
|
+
* matching `invocation.sessionId`. */
|
|
1103
1107
|
sessionId: string;
|
|
1104
1108
|
/** Time at which the hook event was emitted by the runtime. */
|
|
1105
1109
|
timestamp: Date;
|
|
@@ -1366,6 +1370,54 @@ export interface AgentStopHookOutput {
|
|
|
1366
1370
|
export type AgentStopHandler = (input: AgentStopHookInput, invocation: {
|
|
1367
1371
|
sessionId: string;
|
|
1368
1372
|
}) => Promise<AgentStopHookOutput | void> | AgentStopHookOutput | void;
|
|
1373
|
+
/**
|
|
1374
|
+
* Input for the hook fired before a sub-agent's first turn.
|
|
1375
|
+
*
|
|
1376
|
+
* The session metadata belongs to the parent session, not the child.
|
|
1377
|
+
*/
|
|
1378
|
+
export interface SubagentStartHookInput extends BaseHookInput {
|
|
1379
|
+
transcriptPath: string;
|
|
1380
|
+
agentName: string;
|
|
1381
|
+
agentDisplayName?: string;
|
|
1382
|
+
agentDescription?: string;
|
|
1383
|
+
}
|
|
1384
|
+
/** Output for the sub-agent start hook. Context is prepended to the child's initial prompt. */
|
|
1385
|
+
export interface SubagentStartHookOutput {
|
|
1386
|
+
additionalContext?: string;
|
|
1387
|
+
}
|
|
1388
|
+
/** Handler for the sub-agent start hook. */
|
|
1389
|
+
export type SubagentStartHandler = (input: SubagentStartHookInput, invocation: {
|
|
1390
|
+
sessionId: string;
|
|
1391
|
+
}) => Promise<SubagentStartHookOutput | void> | SubagentStartHookOutput | void;
|
|
1392
|
+
/**
|
|
1393
|
+
* Input for the hook fired after a sub-agent completes a turn.
|
|
1394
|
+
*
|
|
1395
|
+
* The response is the child's last assistant message before any hook rewrite.
|
|
1396
|
+
*/
|
|
1397
|
+
export interface SubagentStopHookInput extends SubagentStartHookInput {
|
|
1398
|
+
agentId?: string;
|
|
1399
|
+
agentType: string;
|
|
1400
|
+
stopReason: "end_turn";
|
|
1401
|
+
response: string;
|
|
1402
|
+
}
|
|
1403
|
+
/**
|
|
1404
|
+
* Output for the sub-agent stop hook. `"block"` with a nonempty `reason` continues
|
|
1405
|
+
* the child; otherwise `modifiedResponse` replaces the response reported to the parent.
|
|
1406
|
+
* When both are supplied, a valid block takes precedence over the rewrite.
|
|
1407
|
+
*/
|
|
1408
|
+
export type SubagentStopHookOutput = {
|
|
1409
|
+
decision: "block";
|
|
1410
|
+
reason: string;
|
|
1411
|
+
modifiedResponse?: string;
|
|
1412
|
+
} | {
|
|
1413
|
+
decision?: "allow";
|
|
1414
|
+
reason?: never;
|
|
1415
|
+
modifiedResponse?: string;
|
|
1416
|
+
};
|
|
1417
|
+
/** Handler for the sub-agent stop hook. */
|
|
1418
|
+
export type SubagentStopHandler = (input: SubagentStopHookInput, invocation: {
|
|
1419
|
+
sessionId: string;
|
|
1420
|
+
}) => Promise<SubagentStopHookOutput | void> | SubagentStopHookOutput | void;
|
|
1369
1421
|
/**
|
|
1370
1422
|
* Configuration for session hooks
|
|
1371
1423
|
*/
|
|
@@ -1422,6 +1474,13 @@ export interface SessionHooks {
|
|
|
1422
1474
|
* agent stop.
|
|
1423
1475
|
*/
|
|
1424
1476
|
onAgentStop?: AgentStopHandler;
|
|
1477
|
+
/** Called before a sub-agent's first turn. Return context to prepend to its prompt. */
|
|
1478
|
+
onSubagentStart?: SubagentStartHandler;
|
|
1479
|
+
/**
|
|
1480
|
+
* Called after a sub-agent completes a turn. Return a block reason to
|
|
1481
|
+
* continue the child, or a replacement response to report to the parent.
|
|
1482
|
+
*/
|
|
1483
|
+
onSubagentStop?: SubagentStopHandler;
|
|
1425
1484
|
}
|
|
1426
1485
|
/**
|
|
1427
1486
|
* Base interface for MCP server configuration.
|
|
@@ -2522,6 +2581,12 @@ export interface ProviderTokenArgs {
|
|
|
2522
2581
|
* surface and may change or be removed in future SDK or CLI releases.
|
|
2523
2582
|
*/
|
|
2524
2583
|
export type BearerTokenProvider = (args: ProviderTokenArgs) => Promise<string>;
|
|
2584
|
+
/**
|
|
2585
|
+
* Product serving a configured provider's model. Allowed values are
|
|
2586
|
+
* "openai", "anthropic", "azure_openai", "ollama", "lm_studio",
|
|
2587
|
+
* "foundry_local", and "llama_cpp".
|
|
2588
|
+
*/
|
|
2589
|
+
export type ProviderConfigModelProvider = "openai" | "anthropic" | "azure_openai" | "ollama" | "lm_studio" | "foundry_local" | "llama_cpp";
|
|
2525
2590
|
/**
|
|
2526
2591
|
* Configuration for a custom API provider.
|
|
2527
2592
|
*/
|
|
@@ -2544,6 +2609,11 @@ export interface ProviderConfig {
|
|
|
2544
2609
|
* providers using `wireApi: "responses"`.
|
|
2545
2610
|
*/
|
|
2546
2611
|
transport?: "http" | "websockets";
|
|
2612
|
+
/**
|
|
2613
|
+
* Product serving the model, such as "ollama" or "lm_studio", reported in
|
|
2614
|
+
* telemetry as `model_provider`. Only affects telemetry.
|
|
2615
|
+
*/
|
|
2616
|
+
modelProvider?: ProviderConfigModelProvider;
|
|
2547
2617
|
/**
|
|
2548
2618
|
* API endpoint URL
|
|
2549
2619
|
*/
|
|
@@ -2637,6 +2707,11 @@ export interface NamedProviderConfig {
|
|
|
2637
2707
|
* Wire API format (openai/azure only). Defaults to "completions".
|
|
2638
2708
|
*/
|
|
2639
2709
|
wireApi?: "completions" | "responses";
|
|
2710
|
+
/**
|
|
2711
|
+
* Product serving this provider's models, such as "ollama" or "lm_studio",
|
|
2712
|
+
* reported in telemetry as `model_provider`. Only affects telemetry.
|
|
2713
|
+
*/
|
|
2714
|
+
modelProvider?: ProviderConfigModelProvider;
|
|
2640
2715
|
/**
|
|
2641
2716
|
* API endpoint URL.
|
|
2642
2717
|
*/
|
|
@@ -2878,6 +2953,12 @@ export interface SessionFsConfig {
|
|
|
2878
2953
|
* @default false
|
|
2879
2954
|
*/
|
|
2880
2955
|
sqlite?: boolean;
|
|
2956
|
+
/**
|
|
2957
|
+
* Whether this provider supports exact binary reads and writes through readFileBytes and writeFileBytes.
|
|
2958
|
+
* Required to view images stored only in the provider.
|
|
2959
|
+
* @default false
|
|
2960
|
+
*/
|
|
2961
|
+
binary?: boolean;
|
|
2881
2962
|
};
|
|
2882
2963
|
}
|
|
2883
2964
|
/**
|
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: 106660128 bytes
|
|
4
|
+
sha256: 6e74b03f37cdb4ea6d6c9e4a756cd1324fc8867cc7060d48e0bf3f09eb997ba9
|
|
Binary file
|