@github/copilot-sdk-win32-x64 1.0.15-preview.3 → 1.0.15-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/client.d.ts +1 -0
- package/copilot-sdk/docs/extensions.md +0 -1
- package/copilot-sdk/docs/workflows.md +2 -4
- package/copilot-sdk/extension.d.ts +10 -24
- package/copilot-sdk/extension.js +402 -846
- package/copilot-sdk/generated/rpc.d.ts +5960 -4645
- package/copilot-sdk/generated/session-events.d.ts +197 -118
- package/copilot-sdk/index.d.ts +2 -4
- package/copilot-sdk/index.js +392 -832
- package/copilot-sdk/installationConfirmation.d.ts +19 -0
- package/copilot-sdk/session.d.ts +2 -25
- package/copilot-sdk/types.d.ts +10 -65
- package/copilot-sdk/workflow.d.ts +5 -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/runtime.node +2 -2
- package/ripgrep/bin/win32-x64/rg.exe +0 -0
- package/schemas/api.schema.json +18134 -16248
- package/schemas/session-events.schema.json +932 -842
- package/tgrep/bin/win32-x64/tgrep.exe +0 -0
- package/copilot-sdk/docs/factories.md +0 -296
- package/copilot-sdk/docs/factory-patterns.md +0 -194
- package/copilot-sdk/factory.d.ts +0 -327
- package/prebuilds/win32-x64/msal-node-runtime.node +0 -0
- package/prebuilds/win32-x64/msalruntime.dll +0 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type CancellationToken, type MessageConnection } from "vscode-jsonrpc/node.js";
|
|
2
|
+
import type { InstallationConfirmationRequest, InstallationDecision, InstallationsConfirmResult } from "./generated/rpc.js";
|
|
3
|
+
/** The `installations.confirm` receiver, invoked with the transport's request cancellation. */
|
|
4
|
+
export interface InstallationConfirmationReceiver {
|
|
5
|
+
confirm(request: InstallationConfirmationRequest, token: CancellationToken): Promise<InstallationsConfirmResult>;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Collects an explicit human decision for the complete runtime review.
|
|
9
|
+
* Match operationId and policySessionId to the exact action registered by the host
|
|
10
|
+
* before displaying it. Refuse unknown actions or incomplete reviews; never infer
|
|
11
|
+
* authority from the current session or a global pending slot.
|
|
12
|
+
*
|
|
13
|
+
* The SDK echoes the original challenge and fingerprint. Separately spawned UI
|
|
14
|
+
* work must observe the token to retire itself when the request or connection ends.
|
|
15
|
+
* Registering this callback does not enable installation capabilities.
|
|
16
|
+
* @experimental
|
|
17
|
+
*/
|
|
18
|
+
export type InstallationConfirmationHandler = (request: InstallationConfirmationRequest, token: CancellationToken) => InstallationDecision | Promise<InstallationDecision>;
|
|
19
|
+
export declare function createInstallationConfirmationAdapter(connection: MessageConnection, handler: InstallationConfirmationHandler): InstallationConfirmationReceiver;
|
package/copilot-sdk/session.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ import { createSessionRpc } from "./generated/rpc.js";
|
|
|
2
2
|
import type { ModelSwitchAutoTierResult } from "./generated/rpc.js";
|
|
3
3
|
import type { OpenCanvasInstance } from "./generated/rpc.js";
|
|
4
4
|
import type { MessageOptions, ResponseSchema, ContextTier, ReasoningEffort, ReasoningSummary, AutoTier, ModelCapabilitiesOverride, SessionCapabilities, SessionEvent, SessionEventHandler, SessionEventType, SessionUiApi, TypedSessionEventHandler } from "./types.js";
|
|
5
|
-
import { type SessionFactoryApi } from "./factory.js";
|
|
6
5
|
import { type SessionWorkflowApi } from "./workflow.js";
|
|
7
6
|
/** Assistant message event - the final response from the assistant. */
|
|
8
7
|
export type AssistantMessageEvent = Extract<SessionEvent, {
|
|
@@ -49,8 +48,6 @@ export declare class CopilotSession {
|
|
|
49
48
|
private canvases;
|
|
50
49
|
private bearerTokenProviders;
|
|
51
50
|
private commandHandlers;
|
|
52
|
-
private factories;
|
|
53
|
-
private factoryAbortControllers;
|
|
54
51
|
private workflows;
|
|
55
52
|
private workflowAbortControllers;
|
|
56
53
|
private permissionHandler?;
|
|
@@ -72,32 +69,12 @@ export declare class CopilotSession {
|
|
|
72
69
|
private disconnecting;
|
|
73
70
|
private onDisconnected?;
|
|
74
71
|
/**
|
|
75
|
-
* Friendly
|
|
72
|
+
* Friendly workflow API for running registered workflows by name or handle.
|
|
76
73
|
*
|
|
77
|
-
* @experimental Part of the experimental
|
|
74
|
+
* @experimental Part of the experimental Dynamic Workflows surface and may
|
|
78
75
|
* change or be removed in future SDK or CLI releases.
|
|
79
76
|
*/
|
|
80
|
-
readonly factory: SessionFactoryApi;
|
|
81
77
|
readonly workflow: SessionWorkflowApi;
|
|
82
|
-
/**
|
|
83
|
-
* Resolve a start/resume envelope into the terminal envelope callers expect.
|
|
84
|
-
*
|
|
85
|
-
* The CLI may answer `session.factory.run` and `session.factory.resume`
|
|
86
|
-
* before the run settles, so a non-terminal envelope is followed by a wait
|
|
87
|
-
* on the run's terminal state.
|
|
88
|
-
*/
|
|
89
|
-
private settleFactoryRun;
|
|
90
|
-
/**
|
|
91
|
-
* Resolve when a factory run reaches a terminal status.
|
|
92
|
-
*
|
|
93
|
-
* The subscription is installed *before* the first read so a transition
|
|
94
|
-
* landing between the two cannot be missed, and re-reads are serialized so
|
|
95
|
-
* overlapping invalidation events cannot interleave — the run's revision
|
|
96
|
-
* advances once per operation, so a burst of events is common and must
|
|
97
|
-
* collapse into a single in-flight read. A bounded periodic re-read keeps a
|
|
98
|
-
* dropped invalidation from leaving the wait pending forever.
|
|
99
|
-
*/
|
|
100
|
-
private waitForFactoryRun;
|
|
101
78
|
private settleWorkflowRun;
|
|
102
79
|
/**
|
|
103
80
|
* Resolve when a workflow run reaches a terminal status.
|
package/copilot-sdk/types.d.ts
CHANGED
|
@@ -4,14 +4,16 @@
|
|
|
4
4
|
import type { Canvas } from "./canvas.js";
|
|
5
5
|
import type { SessionFsProvider } from "./sessionFsProvider.js";
|
|
6
6
|
import type { CopilotRequestHandler } from "./copilotRequestHandler.js";
|
|
7
|
+
import type { InstallationConfirmationHandler } from "./installationConfirmation.js";
|
|
8
|
+
export type { InstallationConfirmationHandler } from "./installationConfirmation.js";
|
|
7
9
|
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
10
|
import type { CopilotSession } from "./session.js";
|
|
9
|
-
import type {
|
|
11
|
+
import type { JsonValue } from "./workflow.js";
|
|
10
12
|
import type { ExtensionLaunchProviderHandler as GeneratedExtensionLaunchProvider, GitHubTokenAcquireRequest, GitHubTokenAcquireResult, GitHubTelemetryNotification, ModelBillingTokenPrices, DiagnosticsConfiguration, OpenCanvasInstance, RemoteSessionMode, CurrentToolMetadata } from "./generated/rpc.js";
|
|
11
13
|
import type { ToolSet } from "./toolSet.js";
|
|
12
14
|
export type { RemoteSessionMode } from "./generated/rpc.js";
|
|
13
15
|
export type { CurrentToolMetadata } 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";
|
|
16
|
+
export type { ConnectorAccountRequest, ConnectorAvailability, ConnectorCapabilities, ConnectorCatalogEntry, ConnectorCatalogResult, ConnectorCatalogStatus, ConnectorConnectRequest, ConnectorConnectResult, ConnectorContinueRequest, ConnectorDisconnectResult, ConnectorMcpStatus, ConnectorReconcileRequest, ConnectorRuntimeStatus, ConnectorStatus, ExtensionLaunchProfile, ExtensionLaunchProviderResolveRequest, ExtensionLaunchProviderResolveResult, GitHubTokenAcquireReason, GitHubTokenAcquireResult, GitHubTelemetryNotification, GitHubTelemetryEvent, GitHubTelemetryClientInfo, InstallationConfirmationRequest, InstallationConfirmationResponse, InstallationDecision, InstallationReview, McpInstallationReview, } from "./generated/rpc.js";
|
|
15
17
|
/**
|
|
16
18
|
* Arguments passed to a session's {@link GitHubTokenProvider}.
|
|
17
19
|
*
|
|
@@ -290,6 +292,12 @@ export interface CopilotClientOptions {
|
|
|
290
292
|
* @experimental
|
|
291
293
|
*/
|
|
292
294
|
extensionLaunchProvider?: ExtensionLaunchProvider;
|
|
295
|
+
/**
|
|
296
|
+
* Connection-global human review for experimental installation operations.
|
|
297
|
+
* Does not register or enable installation capabilities on the runtime.
|
|
298
|
+
* @experimental
|
|
299
|
+
*/
|
|
300
|
+
installationConfirmationHandler?: InstallationConfirmationHandler;
|
|
293
301
|
/**
|
|
294
302
|
* Log level for the Copilot runtime. When omitted, the runtime uses its
|
|
295
303
|
* own default (currently `"info"`).
|
|
@@ -1692,69 +1700,6 @@ export interface CanvasProviderIdentity {
|
|
|
1692
1700
|
/** Optional display name surfaced as the canvas extension name. */
|
|
1693
1701
|
name?: string;
|
|
1694
1702
|
}
|
|
1695
|
-
/**
|
|
1696
|
-
* Static resource ceilings declared by a factory before it runs.
|
|
1697
|
-
*
|
|
1698
|
-
* @experimental Part of the experimental Agent Factories surface and may
|
|
1699
|
-
* change or be removed in future SDK or CLI releases.
|
|
1700
|
-
*/
|
|
1701
|
-
export interface FactoryLimits {
|
|
1702
|
-
/** Maximum number of factory subagents that may run concurrently. Must be positive when present. */
|
|
1703
|
-
maxConcurrentSubagents?: number;
|
|
1704
|
-
/** Maximum total number of factory subagents that may be spawned. Must be positive when present. */
|
|
1705
|
-
maxTotalSubagents?: number;
|
|
1706
|
-
/** Maximum AI credits consumed by factory subagents and descendants. This post-paid ceiling is soft. */
|
|
1707
|
-
maxAiCredits?: number;
|
|
1708
|
-
/**
|
|
1709
|
-
* Maximum accumulated active-execution time, in seconds. Active execution includes the entire extension body,
|
|
1710
|
-
* subprocess waits, queued-agent waits, and sleeps. The limit is armed from the remaining headroom when a run
|
|
1711
|
-
* resumes; time between attempts is not counted. Must be finite and positive when present.
|
|
1712
|
-
*/
|
|
1713
|
-
timeoutSeconds?: number;
|
|
1714
|
-
}
|
|
1715
|
-
/**
|
|
1716
|
-
* Registration metadata for an extension-authored factory.
|
|
1717
|
-
*
|
|
1718
|
-
* @experimental Part of the experimental Agent Factories surface and may
|
|
1719
|
-
* change or be removed in future SDK or CLI releases.
|
|
1720
|
-
*/
|
|
1721
|
-
export interface FactoryMeta {
|
|
1722
|
-
/** Stable factory name used for invocation. */
|
|
1723
|
-
name: string;
|
|
1724
|
-
/** Human-readable factory description. */
|
|
1725
|
-
description: string;
|
|
1726
|
-
/** Display metadata for the progress phases the factory may report. */
|
|
1727
|
-
phases: Array<{
|
|
1728
|
-
title: string;
|
|
1729
|
-
detail?: string;
|
|
1730
|
-
}>;
|
|
1731
|
-
/**
|
|
1732
|
-
* Optional declared shape of the arguments this factory expects as `ctx.args`.
|
|
1733
|
-
*
|
|
1734
|
-
* Declaring one is strongly recommended for any factory that reads `ctx.args`.
|
|
1735
|
-
* When the model invokes the factory through the `run_factory` tool, the CLI
|
|
1736
|
-
* validates `args` against this declaration **before** the run starts, so a
|
|
1737
|
-
* malformed call is rejected with a correction hint and retried without ever
|
|
1738
|
-
* creating a run row, prompting the user for permission, or spending credits. A
|
|
1739
|
-
* factory that declares nothing is never validated: a malformed call starts,
|
|
1740
|
-
* takes an approval, spends credits, and then fails inside the factory body.
|
|
1741
|
-
* `factories_manage` with `operation: "inspect"` reports the declared shape so an
|
|
1742
|
-
* agent can read it before invoking.
|
|
1743
|
-
*
|
|
1744
|
-
* This covers the model's `run_factory` path only. `session.factory.run(...)` is
|
|
1745
|
-
* not validated against the declaration, so a factory should still check
|
|
1746
|
-
* `ctx.args` rather than assume the declared shape held.
|
|
1747
|
-
*
|
|
1748
|
-
* Enforcement covers structure — types, required properties, and enum/const
|
|
1749
|
-
* values. Finer constraints such as `minLength`, `pattern`, and
|
|
1750
|
-
* `additionalProperties` are recorded in the declaration but not enforced. See
|
|
1751
|
-
* {@link FactoryJsonSchema} for the accepted subset. A declaration outside that
|
|
1752
|
-
* subset is rejected at registration.
|
|
1753
|
-
*/
|
|
1754
|
-
argsSchema?: FactoryJsonSchema;
|
|
1755
|
-
/** Optional resource ceilings presented to the user before execution. */
|
|
1756
|
-
limits?: FactoryLimits;
|
|
1757
|
-
}
|
|
1758
1703
|
/**
|
|
1759
1704
|
* Provider-scoped options for the Copilot API (CAPI).
|
|
1760
1705
|
*
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import type { WorkflowGetRunProgressRequest, WorkflowListRunsRequest, WorkflowListRunsResult, WorkflowProgressPage, WorkflowRunDetail, WorkflowRunResult, WorkflowRunStatus, WorkflowRunSummary } from "./generated/rpc.js";
|
|
2
2
|
import type { ContextTier } from "./generated/session-events.js";
|
|
3
3
|
import type { CopilotSession } from "./session.js";
|
|
4
|
-
import type { JsonValue } from "./factory.js";
|
|
5
4
|
export type { WorkflowRunResult };
|
|
5
|
+
/** A value that can be represented losslessly on the SDK JSON wire. */
|
|
6
|
+
export type JsonValue = null | boolean | number | string | JsonValue[] | {
|
|
7
|
+
[key: string]: JsonValue;
|
|
8
|
+
};
|
|
6
9
|
export type { WorkflowAgentSummary, WorkflowPhaseStatus, WorkflowPhaseObservation, WorkflowProgressLine, WorkflowProgressPage, WorkflowRunDetail, WorkflowRunStatus, WorkflowRunSummary, } from "./generated/rpc.js";
|
|
7
10
|
/**
|
|
8
11
|
* Options for paging durable workflow runs.
|
|
@@ -311,7 +314,7 @@ export interface SessionWorkflowApi {
|
|
|
311
314
|
* snapshot: resuming the same durable run can later change the envelope
|
|
312
315
|
* returned by {@link SessionWorkflowApi.getRun}.
|
|
313
316
|
*
|
|
314
|
-
* This watches the runtime's `
|
|
317
|
+
* This watches the runtime's `workflow.run_updated` event and
|
|
315
318
|
* periodically re-reads the durable envelope so a missed event cannot
|
|
316
319
|
* leave the wait hanging. Pass a `signal` to stop waiting; aborting rejects
|
|
317
320
|
* and has no effect on the run itself, which keeps executing. Use
|
package/package.json
CHANGED
|
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: 95447328 bytes
|
|
4
|
+
sha256: 75207d2db5bd75087ed6648c446f5fcb987e4a0212de3a2ed8e12801f77453c1
|
|
Binary file
|