@github/copilot-sdk 1.0.2 → 1.0.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/README.md +6 -2
- package/dist/cjs/client.js +158 -29
- package/dist/cjs/copilotRequestHandler.js +629 -0
- package/dist/cjs/generated/rpc.js +92 -4
- package/dist/cjs/index.js +8 -0
- package/dist/cjs/session.js +80 -9
- package/dist/cjs/types.js +13 -1
- package/dist/client.d.ts +5 -33
- package/dist/client.js +159 -29
- package/dist/copilotRequestHandler.d.ts +82 -0
- package/dist/copilotRequestHandler.js +601 -0
- package/dist/generated/rpc.d.ts +1200 -587
- package/dist/generated/rpc.js +91 -4
- package/dist/generated/session-events.d.ts +555 -43
- package/dist/index.d.ts +2 -2
- package/dist/index.js +8 -0
- package/dist/session.d.ts +2 -0
- package/dist/session.js +80 -9
- package/dist/types.d.ts +258 -3
- package/dist/types.js +14 -1
- package/package.json +5 -3
package/dist/generated/rpc.d.ts
CHANGED
|
@@ -4,6 +4,13 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import type { MessageConnection } from "vscode-jsonrpc/node.js";
|
|
6
6
|
import type { AbortReason, Attachment, ContextTier, EmbeddedBlobResourceContents, EmbeddedTextResourceContents, McpServerSource, McpServerStatus, PermissionPromptRequest, PermissionRule, ReasoningSummary, SessionEvent, SessionMode, ShutdownType, SkillSource, UserToolSessionApproval } from "./session-events.js";
|
|
7
|
+
/**
|
|
8
|
+
* Initial authentication info for the session.
|
|
9
|
+
*
|
|
10
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
11
|
+
* via the `definition` "AuthInfo".
|
|
12
|
+
*/
|
|
13
|
+
export type AuthInfo = HMACAuthInfo | EnvAuthInfo | TokenAuthInfo | CopilotApiTokenAuthInfo | UserAuthInfo | GhCliAuthInfo | ApiKeyAuthInfo;
|
|
7
14
|
/**
|
|
8
15
|
* Which tier this directory belongs to
|
|
9
16
|
*
|
|
@@ -166,14 +173,6 @@ export type AgentRegistrySpawnValidationErrorField =
|
|
|
166
173
|
| "model"
|
|
167
174
|
/** The permissionMode parameter */
|
|
168
175
|
| "permissionMode";
|
|
169
|
-
/**
|
|
170
|
-
* Initial authentication info for the session.
|
|
171
|
-
*
|
|
172
|
-
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
173
|
-
* via the `definition` "AuthInfo".
|
|
174
|
-
*/
|
|
175
|
-
/** @experimental */
|
|
176
|
-
export type AuthInfo = HMACAuthInfo | EnvAuthInfo | TokenAuthInfo | CopilotApiTokenAuthInfo | UserAuthInfo | GhCliAuthInfo | ApiKeyAuthInfo;
|
|
177
176
|
/**
|
|
178
177
|
* Authentication type
|
|
179
178
|
*
|
|
@@ -196,18 +195,6 @@ export type AuthInfoType =
|
|
|
196
195
|
| "token"
|
|
197
196
|
/** Authentication from a Copilot API token. */
|
|
198
197
|
| "copilot-api-token";
|
|
199
|
-
/**
|
|
200
|
-
* Runtime-controlled routing state for an open canvas instance.
|
|
201
|
-
*
|
|
202
|
-
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
203
|
-
* via the `definition` "CanvasInstanceAvailability".
|
|
204
|
-
*/
|
|
205
|
-
/** @experimental */
|
|
206
|
-
export type CanvasInstanceAvailability =
|
|
207
|
-
/** The owning provider is currently connected and routing calls will be dispatched normally. */
|
|
208
|
-
"ready"
|
|
209
|
-
/** The owning provider is not currently connected. Routing calls fail with canvas_provider_unavailable until the agent re-issues open_canvas (which rehydrates via a fresh canvas.open) or the provider reconnects. */
|
|
210
|
-
| "stale";
|
|
211
198
|
/**
|
|
212
199
|
* Coarse command category for grouping and behavior: runtime built-in, skill-backed command, or SDK/client-owned command
|
|
213
200
|
*
|
|
@@ -473,6 +460,18 @@ export type InstructionSourceLocation =
|
|
|
473
460
|
| "working-directory"
|
|
474
461
|
/** Instructions live in plugin-provided configuration. */
|
|
475
462
|
| "plugin";
|
|
463
|
+
/**
|
|
464
|
+
* Transport the runtime would otherwise use for this request. `http` (the default when absent) covers plain HTTP and SSE responses; `websocket` indicates a full-duplex message channel where each body chunk maps to one WebSocket message and the `binary` flag distinguishes text from binary frames. The SDK consumer uses this to decide whether to service the request with an HTTP client or a WebSocket client. It is the one piece of request metadata the consumer cannot reliably infer from the URL or headers alone.
|
|
465
|
+
*
|
|
466
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
467
|
+
* via the `definition` "LlmInferenceHttpRequestStartTransport".
|
|
468
|
+
*/
|
|
469
|
+
/** @experimental */
|
|
470
|
+
export type LlmInferenceHttpRequestStartTransport =
|
|
471
|
+
/** Plain HTTP or SSE response. Each body chunk is an opaque byte range; the response is a status line, headers, and a (possibly streamed) body. */
|
|
472
|
+
"http"
|
|
473
|
+
/** Full-duplex WebSocket channel. Each body chunk maps to exactly one WebSocket message and the `binary` flag distinguishes text from binary frames; request and response chunks flow concurrently. */
|
|
474
|
+
| "websocket";
|
|
476
475
|
/**
|
|
477
476
|
* Repository host type
|
|
478
477
|
*
|
|
@@ -654,6 +653,46 @@ export type McpServerConfigHttpOauthGrantType =
|
|
|
654
653
|
"authorization_code"
|
|
655
654
|
/** Headless client credentials flow using the configured OAuth client. */
|
|
656
655
|
| "client_credentials";
|
|
656
|
+
/**
|
|
657
|
+
* Host response to the pending OAuth request.
|
|
658
|
+
*
|
|
659
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
660
|
+
* via the `definition` "McpOauthPendingRequestResponse".
|
|
661
|
+
*/
|
|
662
|
+
/** @experimental */
|
|
663
|
+
export type McpOauthPendingRequestResponse = {
|
|
664
|
+
/**
|
|
665
|
+
* Access token acquired by the SDK host
|
|
666
|
+
*/
|
|
667
|
+
accessToken: string;
|
|
668
|
+
/**
|
|
669
|
+
* OAuth token type. Defaults to Bearer when omitted.
|
|
670
|
+
*/
|
|
671
|
+
tokenType?: string;
|
|
672
|
+
/**
|
|
673
|
+
* Refresh token supplied by the host, if available.
|
|
674
|
+
*/
|
|
675
|
+
refreshToken?: string;
|
|
676
|
+
/**
|
|
677
|
+
* Token lifetime in seconds, if known.
|
|
678
|
+
*/
|
|
679
|
+
expiresIn?: number;
|
|
680
|
+
kind: "token";
|
|
681
|
+
} | {
|
|
682
|
+
kind: "cancelled";
|
|
683
|
+
};
|
|
684
|
+
/**
|
|
685
|
+
* OAuth grant type override for this login.
|
|
686
|
+
*
|
|
687
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
688
|
+
* via the `definition` "McpOauthLoginGrantType".
|
|
689
|
+
*/
|
|
690
|
+
/** @experimental */
|
|
691
|
+
export type McpOauthLoginGrantType =
|
|
692
|
+
/** Interactive browser-based OAuth flow using an authorization code, typically with PKCE. */
|
|
693
|
+
"authorization_code"
|
|
694
|
+
/** Headless OAuth flow where a confidential client authenticates directly with a client secret. */
|
|
695
|
+
| "client_credentials";
|
|
657
696
|
/**
|
|
658
697
|
* Outcome of the sampling inference. 'success' produced a response; 'failure' encountered an error (including agent-side rejection by content filter or criteria); 'cancelled' the caller cancelled this execution via cancelSamplingExecution.
|
|
659
698
|
*
|
|
@@ -834,6 +873,18 @@ export type ProviderConfigWireApi =
|
|
|
834
873
|
"completions"
|
|
835
874
|
/** OpenAI Responses API wire format. */
|
|
836
875
|
| "responses";
|
|
876
|
+
/**
|
|
877
|
+
* Provider transport. Defaults to "http".
|
|
878
|
+
*
|
|
879
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
880
|
+
* via the `definition` "ProviderConfigTransport".
|
|
881
|
+
*/
|
|
882
|
+
/** @experimental */
|
|
883
|
+
export type ProviderConfigTransport =
|
|
884
|
+
/** HTTP request/streaming transport. */
|
|
885
|
+
"http"
|
|
886
|
+
/** WebSocket transport. */
|
|
887
|
+
| "websockets";
|
|
837
888
|
/**
|
|
838
889
|
* Allowed values for the `OptionsUpdateAdditionalContentExclusionPolicyScope` enumeration.
|
|
839
890
|
*
|
|
@@ -1022,6 +1073,18 @@ export type ProviderEndpointWireApi =
|
|
|
1022
1073
|
"completions"
|
|
1023
1074
|
/** Newer responses request shape. */
|
|
1024
1075
|
| "responses";
|
|
1076
|
+
/**
|
|
1077
|
+
* Transport to be used for provider requests.
|
|
1078
|
+
*
|
|
1079
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
1080
|
+
* via the `definition` "ProviderEndpointTransport".
|
|
1081
|
+
*/
|
|
1082
|
+
/** @experimental */
|
|
1083
|
+
export type ProviderEndpointTransport =
|
|
1084
|
+
/** HTTP request/streaming transport. */
|
|
1085
|
+
"http"
|
|
1086
|
+
/** WebSocket transport. */
|
|
1087
|
+
| "websockets";
|
|
1025
1088
|
/**
|
|
1026
1089
|
* Schema for the `PushAttachment` type.
|
|
1027
1090
|
*
|
|
@@ -1637,7 +1700,9 @@ export type WorkspaceDiffMode =
|
|
|
1637
1700
|
/** Return staged, unstaged, and untracked working tree changes. */
|
|
1638
1701
|
"unstaged"
|
|
1639
1702
|
/** Return changes compared with the default branch. */
|
|
1640
|
-
| "branch"
|
|
1703
|
+
| "branch"
|
|
1704
|
+
/** Return the cumulative diff of files Copilot changed this session (used in non-git workspaces). */
|
|
1705
|
+
| "session";
|
|
1641
1706
|
/**
|
|
1642
1707
|
* Allowed values for the `WorkspacesWorkspaceDetailsHostType` enumeration.
|
|
1643
1708
|
*
|
|
@@ -1650,6 +1715,13 @@ export type WorkspacesWorkspaceDetailsHostType =
|
|
|
1650
1715
|
"github"
|
|
1651
1716
|
/** Workspace repository is hosted on Azure DevOps. */
|
|
1652
1717
|
| "ado";
|
|
1718
|
+
/**
|
|
1719
|
+
* List of all authenticated users
|
|
1720
|
+
*
|
|
1721
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
1722
|
+
* via the `definition` "AccountGetAllUsersResult".
|
|
1723
|
+
*/
|
|
1724
|
+
export type AccountGetAllUsersResult = AccountAllUsers[];
|
|
1653
1725
|
/**
|
|
1654
1726
|
* Parameters for aborting the current turn
|
|
1655
1727
|
*
|
|
@@ -1677,793 +1749,859 @@ export interface AbortResult {
|
|
|
1677
1749
|
*/
|
|
1678
1750
|
error?: string;
|
|
1679
1751
|
}
|
|
1680
|
-
export interface AccountGetQuotaRequest {
|
|
1681
|
-
/**
|
|
1682
|
-
* GitHub token for per-user quota lookup. When provided, resolves this token to determine the user's quota instead of using the global auth.
|
|
1683
|
-
*/
|
|
1684
|
-
gitHubToken?: string;
|
|
1685
|
-
}
|
|
1686
1752
|
/**
|
|
1687
|
-
*
|
|
1753
|
+
* Schema for the `AccountAllUsers` type.
|
|
1688
1754
|
*
|
|
1689
1755
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
1690
|
-
* via the `definition` "
|
|
1756
|
+
* via the `definition` "AccountAllUsers".
|
|
1691
1757
|
*/
|
|
1692
|
-
export interface
|
|
1758
|
+
export interface AccountAllUsers {
|
|
1759
|
+
authInfo: AuthInfo;
|
|
1693
1760
|
/**
|
|
1694
|
-
*
|
|
1761
|
+
* Associated token, if available
|
|
1695
1762
|
*/
|
|
1696
|
-
|
|
1697
|
-
[k: string]: AccountQuotaSnapshot | undefined;
|
|
1698
|
-
};
|
|
1763
|
+
token?: string;
|
|
1699
1764
|
}
|
|
1700
1765
|
/**
|
|
1701
|
-
* Schema for the `
|
|
1766
|
+
* Schema for the `HMACAuthInfo` type.
|
|
1702
1767
|
*
|
|
1703
1768
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
1704
|
-
* via the `definition` "
|
|
1769
|
+
* via the `definition` "HMACAuthInfo".
|
|
1705
1770
|
*/
|
|
1706
|
-
export interface
|
|
1707
|
-
/**
|
|
1708
|
-
* Whether the user has an unlimited usage entitlement
|
|
1709
|
-
*/
|
|
1710
|
-
isUnlimitedEntitlement: boolean;
|
|
1711
|
-
/**
|
|
1712
|
-
* Number of requests included in the entitlement, or -1 for unlimited entitlements
|
|
1713
|
-
*/
|
|
1714
|
-
entitlementRequests: number;
|
|
1715
|
-
/**
|
|
1716
|
-
* Number of requests used so far this period
|
|
1717
|
-
*/
|
|
1718
|
-
usedRequests: number;
|
|
1719
|
-
/**
|
|
1720
|
-
* Whether usage is still permitted after quota exhaustion
|
|
1721
|
-
*/
|
|
1722
|
-
usageAllowedWithExhaustedQuota: boolean;
|
|
1723
|
-
/**
|
|
1724
|
-
* Percentage of entitlement remaining
|
|
1725
|
-
*/
|
|
1726
|
-
remainingPercentage: number;
|
|
1771
|
+
export interface HMACAuthInfo {
|
|
1727
1772
|
/**
|
|
1728
|
-
*
|
|
1773
|
+
* HMAC-based authentication used by GitHub-internal services.
|
|
1729
1774
|
*/
|
|
1730
|
-
|
|
1775
|
+
type: "hmac";
|
|
1731
1776
|
/**
|
|
1732
|
-
*
|
|
1777
|
+
* Authentication host. HMAC auth always targets the public GitHub host.
|
|
1733
1778
|
*/
|
|
1734
|
-
|
|
1779
|
+
host: "https://github.com";
|
|
1735
1780
|
/**
|
|
1736
|
-
*
|
|
1781
|
+
* HMAC secret used to sign requests.
|
|
1737
1782
|
*/
|
|
1738
|
-
|
|
1783
|
+
hmac: string;
|
|
1784
|
+
copilotUser?: CopilotUserResponse;
|
|
1739
1785
|
}
|
|
1740
1786
|
/**
|
|
1741
|
-
*
|
|
1787
|
+
* Snapshot of the authenticated user's Copilot subscription info, if known. Mirrors the GitHub API `/copilot_internal/v2/token` user response shape — the runtime trusts this verbatim and does not re-fetch when set.
|
|
1742
1788
|
*
|
|
1743
1789
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
1744
|
-
* via the `definition` "
|
|
1790
|
+
* via the `definition` "CopilotUserResponse".
|
|
1745
1791
|
*/
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1792
|
+
export interface CopilotUserResponse {
|
|
1793
|
+
login?: string;
|
|
1794
|
+
access_type_sku?: string;
|
|
1795
|
+
analytics_tracking_id?: string;
|
|
1796
|
+
assigned_date?: ({
|
|
1797
|
+
[k: string]: unknown | undefined;
|
|
1798
|
+
} | string) | null;
|
|
1799
|
+
can_signup_for_limited?: boolean;
|
|
1800
|
+
chat_enabled?: boolean;
|
|
1801
|
+
copilot_plan?: string;
|
|
1802
|
+
copilotignore_enabled?: boolean;
|
|
1803
|
+
endpoints?: CopilotUserResponseEndpoints;
|
|
1804
|
+
organization_login_list?: string[];
|
|
1805
|
+
organization_list?: ({
|
|
1806
|
+
[k: string]: unknown | undefined;
|
|
1807
|
+
} | ({
|
|
1808
|
+
login?: ({
|
|
1809
|
+
[k: string]: unknown | undefined;
|
|
1810
|
+
} | string) | null;
|
|
1811
|
+
name?: ({
|
|
1812
|
+
[k: string]: unknown | undefined;
|
|
1813
|
+
} | string) | null;
|
|
1814
|
+
} | null)[]) | null;
|
|
1815
|
+
codex_agent_enabled?: boolean;
|
|
1816
|
+
is_mcp_enabled?: ({
|
|
1817
|
+
[k: string]: unknown | undefined;
|
|
1818
|
+
} | boolean) | null;
|
|
1819
|
+
quota_reset_date?: string;
|
|
1820
|
+
quota_snapshots?: CopilotUserResponseQuotaSnapshots;
|
|
1821
|
+
restricted_telemetry?: boolean;
|
|
1822
|
+
is_staff?: boolean;
|
|
1823
|
+
token_based_billing?: boolean;
|
|
1824
|
+
can_upgrade_plan?: boolean;
|
|
1825
|
+
quota_reset_date_utc?: string;
|
|
1826
|
+
limited_user_quotas?: {
|
|
1827
|
+
[k: string]: number | undefined;
|
|
1828
|
+
};
|
|
1829
|
+
limited_user_reset_date?: string;
|
|
1830
|
+
monthly_quotas?: {
|
|
1831
|
+
[k: string]: number | undefined;
|
|
1832
|
+
};
|
|
1833
|
+
cloud_session_storage_enabled?: boolean;
|
|
1834
|
+
cli_remote_control_enabled?: boolean;
|
|
1761
1835
|
}
|
|
1762
1836
|
/**
|
|
1763
|
-
*
|
|
1837
|
+
* Schema for the `CopilotUserResponseEndpoints` type.
|
|
1764
1838
|
*
|
|
1765
1839
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
1766
|
-
* via the `definition` "
|
|
1840
|
+
* via the `definition` "CopilotUserResponseEndpoints".
|
|
1767
1841
|
*/
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
paths: AgentDiscoveryPath[];
|
|
1842
|
+
export interface CopilotUserResponseEndpoints {
|
|
1843
|
+
api?: string;
|
|
1844
|
+
"origin-tracker"?: string;
|
|
1845
|
+
proxy?: string;
|
|
1846
|
+
telemetry?: string;
|
|
1774
1847
|
}
|
|
1775
1848
|
/**
|
|
1776
|
-
*
|
|
1849
|
+
* Schema for the `CopilotUserResponseQuotaSnapshots` type.
|
|
1777
1850
|
*
|
|
1778
1851
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
1779
|
-
* via the `definition` "
|
|
1852
|
+
* via the `definition` "CopilotUserResponseQuotaSnapshots".
|
|
1780
1853
|
*/
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1854
|
+
export interface CopilotUserResponseQuotaSnapshots {
|
|
1855
|
+
chat?: CopilotUserResponseQuotaSnapshotsChat;
|
|
1856
|
+
completions?: CopilotUserResponseQuotaSnapshotsCompletions;
|
|
1857
|
+
premium_interactions?: CopilotUserResponseQuotaSnapshotsPremiumInteractions;
|
|
1858
|
+
[k: string]: ({
|
|
1859
|
+
entitlement?: number;
|
|
1860
|
+
overage_count?: number;
|
|
1861
|
+
overage_permitted?: boolean;
|
|
1862
|
+
percent_remaining?: number;
|
|
1863
|
+
quota_id?: string;
|
|
1864
|
+
quota_remaining?: number;
|
|
1865
|
+
remaining?: number;
|
|
1866
|
+
unlimited?: boolean;
|
|
1867
|
+
timestamp_utc?: string;
|
|
1868
|
+
has_quota?: boolean;
|
|
1869
|
+
quota_reset_at?: number;
|
|
1870
|
+
token_based_billing?: boolean;
|
|
1871
|
+
} | null) | undefined;
|
|
1787
1872
|
}
|
|
1788
1873
|
/**
|
|
1789
|
-
* Schema for the `
|
|
1874
|
+
* Schema for the `CopilotUserResponseQuotaSnapshotsChat` type.
|
|
1790
1875
|
*
|
|
1791
1876
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
1792
|
-
* via the `definition` "
|
|
1877
|
+
* via the `definition` "CopilotUserResponseQuotaSnapshotsChat".
|
|
1793
1878
|
*/
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
description: string;
|
|
1808
|
-
/**
|
|
1809
|
-
* Absolute local file path of the agent definition. Only set for file-based agents loaded from disk; remote agents do not have a path.
|
|
1810
|
-
*/
|
|
1811
|
-
path?: string;
|
|
1812
|
-
/**
|
|
1813
|
-
* Stable identifier for selection. For most agents this is the same as `name`; for plugin/builtin agents it may differ. Always populated; defaults to `name` when no distinct id was assigned.
|
|
1814
|
-
*/
|
|
1815
|
-
id: string;
|
|
1816
|
-
source?: AgentInfoSource;
|
|
1817
|
-
/**
|
|
1818
|
-
* Whether the agent can be selected directly by the user. Agents marked `false` are subagent-only.
|
|
1819
|
-
*/
|
|
1820
|
-
userInvocable?: boolean;
|
|
1821
|
-
/**
|
|
1822
|
-
* Allowed tool names for this agent. Empty array means none; omitted means inherit defaults.
|
|
1823
|
-
*/
|
|
1824
|
-
tools?: string[];
|
|
1825
|
-
/**
|
|
1826
|
-
* Preferred model id for this agent. When omitted, inherits the outer agent's model.
|
|
1827
|
-
*/
|
|
1828
|
-
model?: string;
|
|
1829
|
-
/**
|
|
1830
|
-
* MCP server configurations attached to this agent, keyed by server name. Server config shape mirrors the MCP `mcpServers` schema.
|
|
1831
|
-
*
|
|
1832
|
-
* @experimental
|
|
1833
|
-
*/
|
|
1834
|
-
mcpServers?: {
|
|
1835
|
-
[k: string]: unknown | undefined;
|
|
1836
|
-
};
|
|
1837
|
-
/**
|
|
1838
|
-
* Skill names preloaded into this agent's context. Omitted means none.
|
|
1839
|
-
*/
|
|
1840
|
-
skills?: string[];
|
|
1879
|
+
export interface CopilotUserResponseQuotaSnapshotsChat {
|
|
1880
|
+
entitlement?: number;
|
|
1881
|
+
overage_count?: number;
|
|
1882
|
+
overage_permitted?: boolean;
|
|
1883
|
+
percent_remaining?: number;
|
|
1884
|
+
quota_id?: string;
|
|
1885
|
+
quota_remaining?: number;
|
|
1886
|
+
remaining?: number;
|
|
1887
|
+
unlimited?: boolean;
|
|
1888
|
+
timestamp_utc?: string;
|
|
1889
|
+
has_quota?: boolean;
|
|
1890
|
+
quota_reset_at?: number;
|
|
1891
|
+
token_based_billing?: boolean;
|
|
1841
1892
|
}
|
|
1842
1893
|
/**
|
|
1843
|
-
*
|
|
1894
|
+
* Schema for the `CopilotUserResponseQuotaSnapshotsCompletions` type.
|
|
1844
1895
|
*
|
|
1845
1896
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
1846
|
-
* via the `definition` "
|
|
1897
|
+
* via the `definition` "CopilotUserResponseQuotaSnapshotsCompletions".
|
|
1847
1898
|
*/
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1899
|
+
export interface CopilotUserResponseQuotaSnapshotsCompletions {
|
|
1900
|
+
entitlement?: number;
|
|
1901
|
+
overage_count?: number;
|
|
1902
|
+
overage_permitted?: boolean;
|
|
1903
|
+
percent_remaining?: number;
|
|
1904
|
+
quota_id?: string;
|
|
1905
|
+
quota_remaining?: number;
|
|
1906
|
+
remaining?: number;
|
|
1907
|
+
unlimited?: boolean;
|
|
1908
|
+
timestamp_utc?: string;
|
|
1909
|
+
has_quota?: boolean;
|
|
1910
|
+
quota_reset_at?: number;
|
|
1911
|
+
token_based_billing?: boolean;
|
|
1854
1912
|
}
|
|
1855
1913
|
/**
|
|
1856
|
-
*
|
|
1914
|
+
* Schema for the `CopilotUserResponseQuotaSnapshotsPremiumInteractions` type.
|
|
1857
1915
|
*
|
|
1858
1916
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
1859
|
-
* via the `definition` "
|
|
1917
|
+
* via the `definition` "CopilotUserResponseQuotaSnapshotsPremiumInteractions".
|
|
1860
1918
|
*/
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1919
|
+
export interface CopilotUserResponseQuotaSnapshotsPremiumInteractions {
|
|
1920
|
+
entitlement?: number;
|
|
1921
|
+
overage_count?: number;
|
|
1922
|
+
overage_permitted?: boolean;
|
|
1923
|
+
percent_remaining?: number;
|
|
1924
|
+
quota_id?: string;
|
|
1925
|
+
quota_remaining?: number;
|
|
1926
|
+
remaining?: number;
|
|
1927
|
+
unlimited?: boolean;
|
|
1928
|
+
timestamp_utc?: string;
|
|
1929
|
+
has_quota?: boolean;
|
|
1930
|
+
quota_reset_at?: number;
|
|
1931
|
+
token_based_billing?: boolean;
|
|
1932
|
+
}
|
|
1933
|
+
/**
|
|
1934
|
+
* Schema for the `EnvAuthInfo` type.
|
|
1935
|
+
*
|
|
1936
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
1937
|
+
* via the `definition` "EnvAuthInfo".
|
|
1938
|
+
*/
|
|
1939
|
+
export interface EnvAuthInfo {
|
|
1868
1940
|
/**
|
|
1869
|
-
*
|
|
1941
|
+
* Personal access token (PAT) or server-to-server token sourced from an environment variable.
|
|
1870
1942
|
*/
|
|
1871
|
-
|
|
1943
|
+
type: "env";
|
|
1872
1944
|
/**
|
|
1873
|
-
*
|
|
1945
|
+
* Authentication host (e.g. https://github.com or a GHES host).
|
|
1874
1946
|
*/
|
|
1875
1947
|
host: string;
|
|
1876
1948
|
/**
|
|
1877
|
-
*
|
|
1878
|
-
*/
|
|
1879
|
-
port: number;
|
|
1880
|
-
/**
|
|
1881
|
-
* Session ID of the foreground session for this entry
|
|
1882
|
-
*/
|
|
1883
|
-
sessionId?: string;
|
|
1884
|
-
/**
|
|
1885
|
-
* Friendly session name (when set)
|
|
1886
|
-
*/
|
|
1887
|
-
sessionName?: string;
|
|
1888
|
-
/**
|
|
1889
|
-
* Working directory of the session (when known)
|
|
1890
|
-
*/
|
|
1891
|
-
cwd?: string;
|
|
1892
|
-
/**
|
|
1893
|
-
* Git branch of the session (when known)
|
|
1894
|
-
*/
|
|
1895
|
-
branch?: string;
|
|
1896
|
-
/**
|
|
1897
|
-
* Model identifier currently selected for the session
|
|
1898
|
-
*/
|
|
1899
|
-
model?: string;
|
|
1900
|
-
status?: AgentRegistryLiveTargetEntryStatus;
|
|
1901
|
-
attentionKind?: AgentRegistryLiveTargetEntryAttentionKind;
|
|
1902
|
-
/**
|
|
1903
|
-
* Monotonic per-publisher revision counter incremented on every status update. Lets watchers detect transient flips.
|
|
1904
|
-
*/
|
|
1905
|
-
statusRevision?: number;
|
|
1906
|
-
lastTerminalEvent?: AgentRegistryLiveTargetEntryLastTerminalEvent;
|
|
1907
|
-
/**
|
|
1908
|
-
* ISO 8601 timestamp captured at registration
|
|
1949
|
+
* User login associated with the token. Undefined for server-to-server tokens (those starting with `ghs_`).
|
|
1909
1950
|
*/
|
|
1910
|
-
|
|
1951
|
+
login?: string;
|
|
1911
1952
|
/**
|
|
1912
|
-
*
|
|
1953
|
+
* The token value itself. Treat as a secret.
|
|
1913
1954
|
*/
|
|
1914
|
-
|
|
1955
|
+
token: string;
|
|
1915
1956
|
/**
|
|
1916
|
-
*
|
|
1957
|
+
* Name of the environment variable the token was sourced from.
|
|
1917
1958
|
*/
|
|
1918
|
-
|
|
1959
|
+
envVar: string;
|
|
1960
|
+
copilotUser?: CopilotUserResponse;
|
|
1919
1961
|
}
|
|
1920
1962
|
/**
|
|
1921
|
-
*
|
|
1963
|
+
* Schema for the `TokenAuthInfo` type.
|
|
1922
1964
|
*
|
|
1923
1965
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
1924
|
-
* via the `definition` "
|
|
1966
|
+
* via the `definition` "TokenAuthInfo".
|
|
1925
1967
|
*/
|
|
1926
|
-
|
|
1927
|
-
export interface AgentRegistryLogCapture {
|
|
1968
|
+
export interface TokenAuthInfo {
|
|
1928
1969
|
/**
|
|
1929
|
-
*
|
|
1970
|
+
* SDK-side token authentication; the host configured the token directly via the SDK.
|
|
1930
1971
|
*/
|
|
1931
|
-
|
|
1972
|
+
type: "token";
|
|
1932
1973
|
/**
|
|
1933
|
-
*
|
|
1974
|
+
* Authentication host.
|
|
1934
1975
|
*/
|
|
1935
|
-
|
|
1976
|
+
host: string;
|
|
1936
1977
|
/**
|
|
1937
|
-
*
|
|
1978
|
+
* The token value itself. Treat as a secret.
|
|
1938
1979
|
*/
|
|
1939
|
-
|
|
1940
|
-
|
|
1980
|
+
token: string;
|
|
1981
|
+
copilotUser?: CopilotUserResponse;
|
|
1941
1982
|
}
|
|
1942
1983
|
/**
|
|
1943
|
-
*
|
|
1984
|
+
* Schema for the `CopilotApiTokenAuthInfo` type.
|
|
1944
1985
|
*
|
|
1945
1986
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
1946
|
-
* via the `definition` "
|
|
1987
|
+
* via the `definition` "CopilotApiTokenAuthInfo".
|
|
1947
1988
|
*/
|
|
1948
|
-
|
|
1949
|
-
export interface AgentRegistrySpawnError {
|
|
1950
|
-
/**
|
|
1951
|
-
* Discriminator: child_process.spawn itself failed
|
|
1952
|
-
*/
|
|
1953
|
-
kind: "spawn-error";
|
|
1989
|
+
export interface CopilotApiTokenAuthInfo {
|
|
1954
1990
|
/**
|
|
1955
|
-
*
|
|
1991
|
+
* Direct Copilot API authentication via the `GITHUB_COPILOT_API_TOKEN` + `COPILOT_API_URL` environment-variable pair. The token itself is read from the environment by the runtime, not carried in this struct.
|
|
1956
1992
|
*/
|
|
1957
|
-
|
|
1993
|
+
type: "copilot-api-token";
|
|
1958
1994
|
/**
|
|
1959
|
-
*
|
|
1995
|
+
* Authentication host (always the public GitHub host).
|
|
1960
1996
|
*/
|
|
1961
|
-
|
|
1997
|
+
host: "https://github.com";
|
|
1998
|
+
copilotUser?: CopilotUserResponse;
|
|
1962
1999
|
}
|
|
1963
2000
|
/**
|
|
1964
|
-
*
|
|
2001
|
+
* Schema for the `UserAuthInfo` type.
|
|
1965
2002
|
*
|
|
1966
2003
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
1967
|
-
* via the `definition` "
|
|
2004
|
+
* via the `definition` "UserAuthInfo".
|
|
1968
2005
|
*/
|
|
1969
|
-
|
|
1970
|
-
export interface AgentRegistrySpawnRegistryTimeout {
|
|
2006
|
+
export interface UserAuthInfo {
|
|
1971
2007
|
/**
|
|
1972
|
-
*
|
|
2008
|
+
* OAuth user authentication. The token itself is held in the runtime's secret token store (keyed by host+login) and is NOT carried in this struct.
|
|
1973
2009
|
*/
|
|
1974
|
-
|
|
2010
|
+
type: "user";
|
|
1975
2011
|
/**
|
|
1976
|
-
*
|
|
2012
|
+
* Authentication host.
|
|
1977
2013
|
*/
|
|
1978
|
-
|
|
1979
|
-
|
|
2014
|
+
host: string;
|
|
2015
|
+
/**
|
|
2016
|
+
* OAuth user login.
|
|
2017
|
+
*/
|
|
2018
|
+
login: string;
|
|
2019
|
+
copilotUser?: CopilotUserResponse;
|
|
1980
2020
|
}
|
|
1981
2021
|
/**
|
|
1982
|
-
*
|
|
2022
|
+
* Schema for the `GhCliAuthInfo` type.
|
|
1983
2023
|
*
|
|
1984
2024
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
1985
|
-
* via the `definition` "
|
|
2025
|
+
* via the `definition` "GhCliAuthInfo".
|
|
1986
2026
|
*/
|
|
1987
|
-
|
|
1988
|
-
export interface AgentRegistrySpawnRequest {
|
|
1989
|
-
/**
|
|
1990
|
-
* Working directory for the spawned child (must be an existing directory)
|
|
1991
|
-
*/
|
|
1992
|
-
cwd: string;
|
|
2027
|
+
export interface GhCliAuthInfo {
|
|
1993
2028
|
/**
|
|
1994
|
-
*
|
|
2029
|
+
* Authentication via the `gh` CLI's saved credentials.
|
|
1995
2030
|
*/
|
|
1996
|
-
|
|
2031
|
+
type: "gh-cli";
|
|
1997
2032
|
/**
|
|
1998
|
-
*
|
|
2033
|
+
* Authentication host.
|
|
1999
2034
|
*/
|
|
2000
|
-
|
|
2035
|
+
host: string;
|
|
2001
2036
|
/**
|
|
2002
|
-
*
|
|
2037
|
+
* User login as reported by `gh auth status`.
|
|
2003
2038
|
*/
|
|
2004
|
-
|
|
2005
|
-
permissionMode?: AgentRegistrySpawnPermissionMode;
|
|
2039
|
+
login: string;
|
|
2006
2040
|
/**
|
|
2007
|
-
*
|
|
2041
|
+
* The token returned by `gh auth token`. Treat as a secret.
|
|
2008
2042
|
*/
|
|
2009
|
-
|
|
2043
|
+
token: string;
|
|
2044
|
+
copilotUser?: CopilotUserResponse;
|
|
2010
2045
|
}
|
|
2011
2046
|
/**
|
|
2012
|
-
*
|
|
2047
|
+
* Schema for the `ApiKeyAuthInfo` type.
|
|
2013
2048
|
*
|
|
2014
2049
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
2015
|
-
* via the `definition` "
|
|
2050
|
+
* via the `definition` "ApiKeyAuthInfo".
|
|
2016
2051
|
*/
|
|
2017
|
-
|
|
2018
|
-
export interface AgentRegistrySpawnSpawned {
|
|
2052
|
+
export interface ApiKeyAuthInfo {
|
|
2019
2053
|
/**
|
|
2020
|
-
*
|
|
2054
|
+
* API-key authentication for non-GitHub LLM providers (e.g. when running BYOM-style).
|
|
2021
2055
|
*/
|
|
2022
|
-
|
|
2023
|
-
entry: AgentRegistryLiveTargetEntry;
|
|
2056
|
+
type: "api-key";
|
|
2024
2057
|
/**
|
|
2025
|
-
*
|
|
2058
|
+
* The API key. Treat as a secret.
|
|
2026
2059
|
*/
|
|
2027
|
-
|
|
2060
|
+
apiKey: string;
|
|
2028
2061
|
/**
|
|
2029
|
-
*
|
|
2062
|
+
* Authentication host.
|
|
2030
2063
|
*/
|
|
2031
|
-
|
|
2032
|
-
|
|
2064
|
+
host: string;
|
|
2065
|
+
copilotUser?: CopilotUserResponse;
|
|
2033
2066
|
}
|
|
2034
2067
|
/**
|
|
2035
|
-
*
|
|
2068
|
+
* Current authentication state
|
|
2036
2069
|
*
|
|
2037
2070
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
2038
|
-
* via the `definition` "
|
|
2071
|
+
* via the `definition` "AccountGetCurrentAuthResult".
|
|
2039
2072
|
*/
|
|
2040
|
-
|
|
2041
|
-
|
|
2073
|
+
export interface AccountGetCurrentAuthResult {
|
|
2074
|
+
authInfo?: AuthInfo;
|
|
2042
2075
|
/**
|
|
2043
|
-
*
|
|
2076
|
+
* Authentication errors from the last auth attempt, if any
|
|
2044
2077
|
*/
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2078
|
+
authErrors?: string[];
|
|
2079
|
+
}
|
|
2080
|
+
export interface AccountGetQuotaRequest {
|
|
2048
2081
|
/**
|
|
2049
|
-
*
|
|
2082
|
+
* GitHub token for per-user quota lookup. When provided, resolves this token to determine the user's quota instead of using the global auth.
|
|
2050
2083
|
*/
|
|
2051
|
-
|
|
2084
|
+
gitHubToken?: string;
|
|
2052
2085
|
}
|
|
2053
2086
|
/**
|
|
2054
|
-
*
|
|
2087
|
+
* Quota usage snapshots for the resolved user, keyed by quota type.
|
|
2055
2088
|
*
|
|
2056
2089
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
2057
|
-
* via the `definition` "
|
|
2090
|
+
* via the `definition` "AccountGetQuotaResult".
|
|
2058
2091
|
*/
|
|
2059
|
-
|
|
2060
|
-
export interface AgentReloadResult {
|
|
2092
|
+
export interface AccountGetQuotaResult {
|
|
2061
2093
|
/**
|
|
2062
|
-
*
|
|
2094
|
+
* Quota snapshots keyed by type (e.g., chat, completions, premium_interactions)
|
|
2063
2095
|
*/
|
|
2064
|
-
|
|
2096
|
+
quotaSnapshots: {
|
|
2097
|
+
[k: string]: AccountQuotaSnapshot | undefined;
|
|
2098
|
+
};
|
|
2065
2099
|
}
|
|
2066
2100
|
/**
|
|
2067
|
-
*
|
|
2101
|
+
* Schema for the `AccountQuotaSnapshot` type.
|
|
2068
2102
|
*
|
|
2069
2103
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
2070
|
-
* via the `definition` "
|
|
2104
|
+
* via the `definition` "AccountQuotaSnapshot".
|
|
2071
2105
|
*/
|
|
2072
|
-
|
|
2073
|
-
export interface AgentsDiscoverRequest {
|
|
2106
|
+
export interface AccountQuotaSnapshot {
|
|
2074
2107
|
/**
|
|
2075
|
-
*
|
|
2108
|
+
* Whether the user has an unlimited usage entitlement
|
|
2076
2109
|
*/
|
|
2077
|
-
|
|
2110
|
+
isUnlimitedEntitlement: boolean;
|
|
2078
2111
|
/**
|
|
2079
|
-
*
|
|
2112
|
+
* Number of requests included in the entitlement, or -1 for unlimited entitlements
|
|
2080
2113
|
*/
|
|
2081
|
-
|
|
2114
|
+
entitlementRequests: number;
|
|
2115
|
+
/**
|
|
2116
|
+
* Number of requests used so far this period
|
|
2117
|
+
*/
|
|
2118
|
+
usedRequests: number;
|
|
2119
|
+
/**
|
|
2120
|
+
* Whether usage is still permitted after quota exhaustion
|
|
2121
|
+
*/
|
|
2122
|
+
usageAllowedWithExhaustedQuota: boolean;
|
|
2123
|
+
/**
|
|
2124
|
+
* Percentage of entitlement remaining
|
|
2125
|
+
*/
|
|
2126
|
+
remainingPercentage: number;
|
|
2127
|
+
/**
|
|
2128
|
+
* Number of additional usage requests made this period
|
|
2129
|
+
*/
|
|
2130
|
+
overage: number;
|
|
2131
|
+
/**
|
|
2132
|
+
* Whether additional usage is allowed when quota is exhausted
|
|
2133
|
+
*/
|
|
2134
|
+
overageAllowedWithExhaustedQuota: boolean;
|
|
2135
|
+
/**
|
|
2136
|
+
* Date when the quota resets (ISO 8601 string)
|
|
2137
|
+
*/
|
|
2138
|
+
resetDate?: string;
|
|
2082
2139
|
}
|
|
2083
2140
|
/**
|
|
2084
|
-
*
|
|
2141
|
+
* Credentials to store after successful authentication
|
|
2085
2142
|
*
|
|
2086
2143
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
2087
|
-
* via the `definition` "
|
|
2144
|
+
* via the `definition` "AccountLoginRequest".
|
|
2088
2145
|
*/
|
|
2089
|
-
|
|
2090
|
-
export interface AgentSelectRequest {
|
|
2146
|
+
export interface AccountLoginRequest {
|
|
2091
2147
|
/**
|
|
2092
|
-
*
|
|
2148
|
+
* GitHub host URL
|
|
2093
2149
|
*/
|
|
2094
|
-
|
|
2150
|
+
host: string;
|
|
2151
|
+
/**
|
|
2152
|
+
* User login/username
|
|
2153
|
+
*/
|
|
2154
|
+
login: string;
|
|
2155
|
+
/**
|
|
2156
|
+
* GitHub authentication token
|
|
2157
|
+
*/
|
|
2158
|
+
token: string;
|
|
2095
2159
|
}
|
|
2096
2160
|
/**
|
|
2097
|
-
*
|
|
2161
|
+
* Result of a successful login; throws on failure
|
|
2098
2162
|
*
|
|
2099
2163
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
2100
|
-
* via the `definition` "
|
|
2164
|
+
* via the `definition` "AccountLoginResult".
|
|
2101
2165
|
*/
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2166
|
+
export interface AccountLoginResult {
|
|
2167
|
+
/**
|
|
2168
|
+
* Whether the credential was persisted to a secure store (system keychain, or the config file when plaintext storage is enabled). False when no secure store was available and the token was not saved, so the consumer can decide how to proceed.
|
|
2169
|
+
*/
|
|
2170
|
+
storedInVault: boolean;
|
|
2105
2171
|
}
|
|
2106
2172
|
/**
|
|
2107
|
-
*
|
|
2173
|
+
* User to log out
|
|
2108
2174
|
*
|
|
2109
2175
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
2110
|
-
* via the `definition` "
|
|
2176
|
+
* via the `definition` "AccountLogoutRequest".
|
|
2111
2177
|
*/
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2178
|
+
export interface AccountLogoutRequest {
|
|
2179
|
+
authInfo: AuthInfo;
|
|
2180
|
+
}
|
|
2181
|
+
/**
|
|
2182
|
+
* Logout result indicating if more users remain
|
|
2183
|
+
*
|
|
2184
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
2185
|
+
* via the `definition` "AccountLogoutResult".
|
|
2186
|
+
*/
|
|
2187
|
+
export interface AccountLogoutResult {
|
|
2118
2188
|
/**
|
|
2119
|
-
*
|
|
2189
|
+
* Whether other authenticated users remain after logout
|
|
2120
2190
|
*/
|
|
2121
|
-
|
|
2191
|
+
hasMoreUsers: boolean;
|
|
2122
2192
|
}
|
|
2123
2193
|
/**
|
|
2124
|
-
*
|
|
2194
|
+
* Schema for the `AgentDiscoveryPath` type.
|
|
2125
2195
|
*
|
|
2126
2196
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
2127
|
-
* via the `definition` "
|
|
2197
|
+
* via the `definition` "AgentDiscoveryPath".
|
|
2128
2198
|
*/
|
|
2129
2199
|
/** @experimental */
|
|
2130
|
-
export interface
|
|
2200
|
+
export interface AgentDiscoveryPath {
|
|
2131
2201
|
/**
|
|
2132
|
-
*
|
|
2202
|
+
* Absolute path of the search/create directory (may not exist on disk yet)
|
|
2133
2203
|
*/
|
|
2134
|
-
|
|
2204
|
+
path: string;
|
|
2205
|
+
scope: AgentDiscoveryPathScope;
|
|
2135
2206
|
/**
|
|
2136
|
-
*
|
|
2207
|
+
* Whether this is the canonical directory to create a new agent in its tier. At most one entry per tier is preferred.
|
|
2137
2208
|
*/
|
|
2138
|
-
|
|
2209
|
+
preferredForCreation: boolean;
|
|
2210
|
+
/**
|
|
2211
|
+
* The input project path this directory was derived from (only for project scope)
|
|
2212
|
+
*/
|
|
2213
|
+
projectPath?: string;
|
|
2139
2214
|
}
|
|
2140
2215
|
/**
|
|
2141
|
-
*
|
|
2216
|
+
* Canonical locations where custom agents can be created so the runtime will recognize them.
|
|
2142
2217
|
*
|
|
2143
2218
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
2144
|
-
* via the `definition` "
|
|
2219
|
+
* via the `definition` "AgentDiscoveryPathList".
|
|
2145
2220
|
*/
|
|
2146
2221
|
/** @experimental */
|
|
2147
|
-
export interface
|
|
2222
|
+
export interface AgentDiscoveryPathList {
|
|
2148
2223
|
/**
|
|
2149
|
-
*
|
|
2224
|
+
* Canonical agent create/discovery directories, in priority order
|
|
2150
2225
|
*/
|
|
2151
|
-
|
|
2226
|
+
paths: AgentDiscoveryPath[];
|
|
2152
2227
|
}
|
|
2153
2228
|
/**
|
|
2154
|
-
*
|
|
2229
|
+
* The currently selected custom agent, or null when using the default agent.
|
|
2155
2230
|
*
|
|
2156
2231
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
2157
|
-
* via the `definition` "
|
|
2232
|
+
* via the `definition` "AgentGetCurrentResult".
|
|
2158
2233
|
*/
|
|
2159
2234
|
/** @experimental */
|
|
2160
|
-
export interface
|
|
2161
|
-
/**
|
|
2162
|
-
* API-key authentication for non-GitHub LLM providers (e.g. when running BYOM-style).
|
|
2163
|
-
*/
|
|
2164
|
-
type: "api-key";
|
|
2165
|
-
/**
|
|
2166
|
-
* The API key. Treat as a secret.
|
|
2167
|
-
*/
|
|
2168
|
-
apiKey: string;
|
|
2235
|
+
export interface AgentGetCurrentResult {
|
|
2169
2236
|
/**
|
|
2170
|
-
*
|
|
2237
|
+
* Currently selected custom agent, or null if using the default agent
|
|
2171
2238
|
*/
|
|
2172
|
-
|
|
2173
|
-
copilotUser?: CopilotUserResponse;
|
|
2239
|
+
agent?: AgentInfo | null;
|
|
2174
2240
|
}
|
|
2175
2241
|
/**
|
|
2176
|
-
*
|
|
2242
|
+
* Schema for the `AgentInfo` type.
|
|
2177
2243
|
*
|
|
2178
2244
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
2179
|
-
* via the `definition` "
|
|
2245
|
+
* via the `definition` "AgentInfo".
|
|
2180
2246
|
*/
|
|
2181
2247
|
/** @experimental */
|
|
2182
|
-
export interface
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2248
|
+
export interface AgentInfo {
|
|
2249
|
+
/**
|
|
2250
|
+
* Unique identifier of the custom agent
|
|
2251
|
+
*/
|
|
2252
|
+
name: string;
|
|
2253
|
+
/**
|
|
2254
|
+
* Human-readable display name
|
|
2255
|
+
*/
|
|
2256
|
+
displayName: string;
|
|
2257
|
+
/**
|
|
2258
|
+
* Description of the agent's purpose
|
|
2259
|
+
*/
|
|
2260
|
+
description: string;
|
|
2261
|
+
/**
|
|
2262
|
+
* Absolute local file path of the agent definition. Only set for file-based agents loaded from disk; remote agents do not have a path.
|
|
2263
|
+
*/
|
|
2264
|
+
path?: string;
|
|
2265
|
+
/**
|
|
2266
|
+
* Stable identifier for selection. For most agents this is the same as `name`; for plugin/builtin agents it may differ. Always populated; defaults to `name` when no distinct id was assigned.
|
|
2267
|
+
*/
|
|
2268
|
+
id: string;
|
|
2269
|
+
source?: AgentInfoSource;
|
|
2270
|
+
/**
|
|
2271
|
+
* Whether the agent can be selected directly by the user. Agents marked `false` are subagent-only.
|
|
2272
|
+
*/
|
|
2273
|
+
userInvocable?: boolean;
|
|
2274
|
+
/**
|
|
2275
|
+
* Allowed tool names for this agent. Empty array means none; omitted means inherit defaults.
|
|
2276
|
+
*/
|
|
2277
|
+
tools?: string[];
|
|
2278
|
+
/**
|
|
2279
|
+
* Preferred model id for this agent. When omitted, inherits the outer agent's model.
|
|
2280
|
+
*/
|
|
2281
|
+
model?: string;
|
|
2282
|
+
/**
|
|
2283
|
+
* MCP server configurations attached to this agent, keyed by server name. Server config shape mirrors the MCP `mcpServers` schema.
|
|
2284
|
+
*
|
|
2285
|
+
* @experimental
|
|
2286
|
+
*/
|
|
2287
|
+
mcpServers?: {
|
|
2207
2288
|
[k: string]: unknown | undefined;
|
|
2208
|
-
} | boolean) | null;
|
|
2209
|
-
quota_reset_date?: string;
|
|
2210
|
-
quota_snapshots?: CopilotUserResponseQuotaSnapshots;
|
|
2211
|
-
restricted_telemetry?: boolean;
|
|
2212
|
-
is_staff?: boolean;
|
|
2213
|
-
token_based_billing?: boolean;
|
|
2214
|
-
can_upgrade_plan?: boolean;
|
|
2215
|
-
quota_reset_date_utc?: string;
|
|
2216
|
-
limited_user_quotas?: {
|
|
2217
|
-
[k: string]: number | undefined;
|
|
2218
2289
|
};
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
cloud_session_storage_enabled?: boolean;
|
|
2224
|
-
cli_remote_control_enabled?: boolean;
|
|
2290
|
+
/**
|
|
2291
|
+
* Skill names preloaded into this agent's context. Omitted means none.
|
|
2292
|
+
*/
|
|
2293
|
+
skills?: string[];
|
|
2225
2294
|
}
|
|
2226
2295
|
/**
|
|
2227
|
-
*
|
|
2296
|
+
* Custom agents available to the session.
|
|
2228
2297
|
*
|
|
2229
2298
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
2230
|
-
* via the `definition` "
|
|
2299
|
+
* via the `definition` "AgentList".
|
|
2231
2300
|
*/
|
|
2232
2301
|
/** @experimental */
|
|
2233
|
-
export interface
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2302
|
+
export interface AgentList {
|
|
2303
|
+
/**
|
|
2304
|
+
* Available custom agents
|
|
2305
|
+
*/
|
|
2306
|
+
agents: AgentInfo[];
|
|
2238
2307
|
}
|
|
2239
2308
|
/**
|
|
2240
|
-
*
|
|
2309
|
+
* Full registry entry for the spawned child. Lets the controller call `handleLiveTargetSelected(entry)` directly without re-reading the registry (avoids a TOCTOU window).
|
|
2241
2310
|
*
|
|
2242
2311
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
2243
|
-
* via the `definition` "
|
|
2312
|
+
* via the `definition` "AgentRegistryLiveTargetEntry".
|
|
2244
2313
|
*/
|
|
2245
2314
|
/** @experimental */
|
|
2246
|
-
export interface
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2315
|
+
export interface AgentRegistryLiveTargetEntry {
|
|
2316
|
+
/**
|
|
2317
|
+
* Registry entry schema version (1 = ui-server, 2 = managed-server)
|
|
2318
|
+
*/
|
|
2319
|
+
schemaVersion: number;
|
|
2320
|
+
kind: AgentRegistryLiveTargetEntryKind;
|
|
2321
|
+
/**
|
|
2322
|
+
* Operating-system pid of the process owning this entry
|
|
2323
|
+
*/
|
|
2324
|
+
pid: number;
|
|
2325
|
+
/**
|
|
2326
|
+
* Bind host for the entry's JSON-RPC server
|
|
2327
|
+
*/
|
|
2328
|
+
host: string;
|
|
2329
|
+
/**
|
|
2330
|
+
* TCP port the entry's JSON-RPC server is listening on
|
|
2331
|
+
*/
|
|
2332
|
+
port: number;
|
|
2333
|
+
/**
|
|
2334
|
+
* Session ID of the foreground session for this entry
|
|
2335
|
+
*/
|
|
2336
|
+
sessionId?: string;
|
|
2337
|
+
/**
|
|
2338
|
+
* Friendly session name (when set)
|
|
2339
|
+
*/
|
|
2340
|
+
sessionName?: string;
|
|
2341
|
+
/**
|
|
2342
|
+
* Working directory of the session (when known)
|
|
2343
|
+
*/
|
|
2344
|
+
cwd?: string;
|
|
2345
|
+
/**
|
|
2346
|
+
* Git branch of the session (when known)
|
|
2347
|
+
*/
|
|
2348
|
+
branch?: string;
|
|
2349
|
+
/**
|
|
2350
|
+
* Model identifier currently selected for the session
|
|
2351
|
+
*/
|
|
2352
|
+
model?: string;
|
|
2353
|
+
status?: AgentRegistryLiveTargetEntryStatus;
|
|
2354
|
+
attentionKind?: AgentRegistryLiveTargetEntryAttentionKind;
|
|
2355
|
+
/**
|
|
2356
|
+
* Monotonic per-publisher revision counter incremented on every status update. Lets watchers detect transient flips.
|
|
2357
|
+
*/
|
|
2358
|
+
statusRevision?: number;
|
|
2359
|
+
lastTerminalEvent?: AgentRegistryLiveTargetEntryLastTerminalEvent;
|
|
2360
|
+
/**
|
|
2361
|
+
* ISO 8601 timestamp captured at registration
|
|
2362
|
+
*/
|
|
2363
|
+
startedAt: string;
|
|
2364
|
+
/**
|
|
2365
|
+
* Copilot CLI version that wrote the entry
|
|
2366
|
+
*/
|
|
2367
|
+
copilotVersion: string;
|
|
2368
|
+
/**
|
|
2369
|
+
* Wall-clock milliseconds since the watcher last observed this entry (heartbeat freshness)
|
|
2370
|
+
*/
|
|
2371
|
+
lastSeenMs: number;
|
|
2264
2372
|
}
|
|
2265
2373
|
/**
|
|
2266
|
-
*
|
|
2374
|
+
* Per-spawn log-capture outcome; populated from spawnLiveTarget.
|
|
2267
2375
|
*
|
|
2268
2376
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
2269
|
-
* via the `definition` "
|
|
2377
|
+
* via the `definition` "AgentRegistryLogCapture".
|
|
2270
2378
|
*/
|
|
2271
2379
|
/** @experimental */
|
|
2272
|
-
export interface
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2380
|
+
export interface AgentRegistryLogCapture {
|
|
2381
|
+
/**
|
|
2382
|
+
* Whether per-spawn log capture is on (false when env-disabled or open failed)
|
|
2383
|
+
*/
|
|
2384
|
+
enabled: boolean;
|
|
2385
|
+
/**
|
|
2386
|
+
* Absolute path to the per-spawn log file (only set when enabled)
|
|
2387
|
+
*/
|
|
2388
|
+
path?: string;
|
|
2389
|
+
/**
|
|
2390
|
+
* Human-readable open failure message (only set when enabled === false AND the env-disable opt-out was NOT used)
|
|
2391
|
+
*/
|
|
2392
|
+
openError?: string;
|
|
2393
|
+
openErrorReason?: AgentRegistryLogCaptureOpenErrorReason;
|
|
2285
2394
|
}
|
|
2286
2395
|
/**
|
|
2287
|
-
*
|
|
2396
|
+
* `child_process.spawn` itself failed before the child entered the registry.
|
|
2288
2397
|
*
|
|
2289
2398
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
2290
|
-
* via the `definition` "
|
|
2399
|
+
* via the `definition` "AgentRegistrySpawnError".
|
|
2291
2400
|
*/
|
|
2292
2401
|
/** @experimental */
|
|
2293
|
-
export interface
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2402
|
+
export interface AgentRegistrySpawnError {
|
|
2403
|
+
/**
|
|
2404
|
+
* Discriminator: child_process.spawn itself failed
|
|
2405
|
+
*/
|
|
2406
|
+
kind: "spawn-error";
|
|
2407
|
+
/**
|
|
2408
|
+
* Human-readable error message
|
|
2409
|
+
*/
|
|
2410
|
+
message: string;
|
|
2411
|
+
/**
|
|
2412
|
+
* Underlying errno code (e.g. ENOENT, EACCES) when available
|
|
2413
|
+
*/
|
|
2414
|
+
code?: string;
|
|
2306
2415
|
}
|
|
2307
2416
|
/**
|
|
2308
|
-
*
|
|
2417
|
+
* Spawn succeeded but the child did not publish a matching managed-server entry within the timeout.
|
|
2309
2418
|
*
|
|
2310
2419
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
2311
|
-
* via the `definition` "
|
|
2420
|
+
* via the `definition` "AgentRegistrySpawnRegistryTimeout".
|
|
2312
2421
|
*/
|
|
2313
2422
|
/** @experimental */
|
|
2314
|
-
export interface
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
has_quota?: boolean;
|
|
2325
|
-
quota_reset_at?: number;
|
|
2326
|
-
token_based_billing?: boolean;
|
|
2423
|
+
export interface AgentRegistrySpawnRegistryTimeout {
|
|
2424
|
+
/**
|
|
2425
|
+
* Discriminator: spawn succeeded but child never registered
|
|
2426
|
+
*/
|
|
2427
|
+
kind: "registry-timeout";
|
|
2428
|
+
/**
|
|
2429
|
+
* Process ID of the orphaned child (so the caller can offer 'kill the pid' guidance)
|
|
2430
|
+
*/
|
|
2431
|
+
childPid: number;
|
|
2432
|
+
logCapture?: AgentRegistryLogCapture;
|
|
2327
2433
|
}
|
|
2328
2434
|
/**
|
|
2329
|
-
*
|
|
2435
|
+
* Inputs to spawn a managed-server child via the controller's spawn delegate.
|
|
2330
2436
|
*
|
|
2331
2437
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
2332
|
-
* via the `definition` "
|
|
2438
|
+
* via the `definition` "AgentRegistrySpawnRequest".
|
|
2333
2439
|
*/
|
|
2334
2440
|
/** @experimental */
|
|
2335
|
-
export interface
|
|
2441
|
+
export interface AgentRegistrySpawnRequest {
|
|
2336
2442
|
/**
|
|
2337
|
-
*
|
|
2443
|
+
* Working directory for the spawned child (must be an existing directory)
|
|
2338
2444
|
*/
|
|
2339
|
-
|
|
2445
|
+
cwd: string;
|
|
2340
2446
|
/**
|
|
2341
|
-
*
|
|
2447
|
+
* Custom or built-in agent name (e.g. 'explore'). When omitted, the child uses its own default.
|
|
2342
2448
|
*/
|
|
2343
|
-
|
|
2449
|
+
agentName?: string;
|
|
2344
2450
|
/**
|
|
2345
|
-
*
|
|
2451
|
+
* Model identifier to apply to the new session
|
|
2346
2452
|
*/
|
|
2347
|
-
|
|
2348
|
-
|
|
2453
|
+
model?: string;
|
|
2454
|
+
/**
|
|
2455
|
+
* Friendly session name. Must satisfy validateSessionName: non-empty, no leading/trailing whitespace, <=100 chars, no control chars, no double quotes.
|
|
2456
|
+
*/
|
|
2457
|
+
name?: string;
|
|
2458
|
+
permissionMode?: AgentRegistrySpawnPermissionMode;
|
|
2459
|
+
/**
|
|
2460
|
+
* Optional first user message. Forwarded to the caller (the CLI's spawn wrapper sends it post-attach via the standard LocalRpcSession.send path).
|
|
2461
|
+
*/
|
|
2462
|
+
initialPrompt?: string;
|
|
2349
2463
|
}
|
|
2350
2464
|
/**
|
|
2351
|
-
*
|
|
2465
|
+
* Managed-server child was spawned and registered successfully.
|
|
2352
2466
|
*
|
|
2353
2467
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
2354
|
-
* via the `definition` "
|
|
2468
|
+
* via the `definition` "AgentRegistrySpawnSpawned".
|
|
2355
2469
|
*/
|
|
2356
2470
|
/** @experimental */
|
|
2357
|
-
export interface
|
|
2358
|
-
/**
|
|
2359
|
-
* Personal access token (PAT) or server-to-server token sourced from an environment variable.
|
|
2360
|
-
*/
|
|
2361
|
-
type: "env";
|
|
2362
|
-
/**
|
|
2363
|
-
* Authentication host (e.g. https://github.com or a GHES host).
|
|
2364
|
-
*/
|
|
2365
|
-
host: string;
|
|
2471
|
+
export interface AgentRegistrySpawnSpawned {
|
|
2366
2472
|
/**
|
|
2367
|
-
*
|
|
2473
|
+
* Discriminator: managed-server child spawned successfully
|
|
2368
2474
|
*/
|
|
2369
|
-
|
|
2475
|
+
kind: "spawned";
|
|
2476
|
+
entry: AgentRegistryLiveTargetEntry;
|
|
2370
2477
|
/**
|
|
2371
|
-
*
|
|
2478
|
+
* Whether the delegate already sent the initial prompt. Always omitted in the current wiring: the controller sends the prompt post-attach via the standard LocalRpcSession.send path.
|
|
2372
2479
|
*/
|
|
2373
|
-
|
|
2480
|
+
initialPromptSent?: boolean;
|
|
2374
2481
|
/**
|
|
2375
|
-
*
|
|
2482
|
+
* If the delegate attempted to send the initial prompt and failed, the categorized error message.
|
|
2376
2483
|
*/
|
|
2377
|
-
|
|
2378
|
-
|
|
2484
|
+
initialPromptError?: string;
|
|
2485
|
+
logCapture?: AgentRegistryLogCapture;
|
|
2379
2486
|
}
|
|
2380
2487
|
/**
|
|
2381
|
-
*
|
|
2488
|
+
* Synchronous pre-validation rejected the spawn request.
|
|
2382
2489
|
*
|
|
2383
2490
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
2384
|
-
* via the `definition` "
|
|
2491
|
+
* via the `definition` "AgentRegistrySpawnValidationError".
|
|
2385
2492
|
*/
|
|
2386
2493
|
/** @experimental */
|
|
2387
|
-
export interface
|
|
2494
|
+
export interface AgentRegistrySpawnValidationError {
|
|
2388
2495
|
/**
|
|
2389
|
-
*
|
|
2496
|
+
* Discriminator: synchronous pre-validation rejected the request
|
|
2390
2497
|
*/
|
|
2391
|
-
|
|
2498
|
+
kind: "validation-error";
|
|
2499
|
+
reason: AgentRegistrySpawnValidationErrorReason;
|
|
2500
|
+
field?: AgentRegistrySpawnValidationErrorField;
|
|
2392
2501
|
/**
|
|
2393
|
-
*
|
|
2502
|
+
* Human-readable explanation; safe to surface in the UI banner. Never logged to unrestricted telemetry.
|
|
2394
2503
|
*/
|
|
2395
|
-
|
|
2504
|
+
message: string;
|
|
2505
|
+
}
|
|
2506
|
+
/**
|
|
2507
|
+
* Custom agents available to the session after reloading definitions from disk.
|
|
2508
|
+
*
|
|
2509
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
2510
|
+
* via the `definition` "AgentReloadResult".
|
|
2511
|
+
*/
|
|
2512
|
+
/** @experimental */
|
|
2513
|
+
export interface AgentReloadResult {
|
|
2396
2514
|
/**
|
|
2397
|
-
*
|
|
2515
|
+
* Reloaded custom agents
|
|
2398
2516
|
*/
|
|
2399
|
-
|
|
2400
|
-
copilotUser?: CopilotUserResponse;
|
|
2517
|
+
agents: AgentInfo[];
|
|
2401
2518
|
}
|
|
2402
2519
|
/**
|
|
2403
|
-
*
|
|
2520
|
+
* Optional project paths to include in agent discovery.
|
|
2404
2521
|
*
|
|
2405
2522
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
2406
|
-
* via the `definition` "
|
|
2523
|
+
* via the `definition` "AgentsDiscoverRequest".
|
|
2407
2524
|
*/
|
|
2408
2525
|
/** @experimental */
|
|
2409
|
-
export interface
|
|
2526
|
+
export interface AgentsDiscoverRequest {
|
|
2410
2527
|
/**
|
|
2411
|
-
*
|
|
2528
|
+
* Optional list of project directory paths to scan for project-scoped agents. When omitted or empty, only user/plugin/remote-independent agents are returned (no project scan).
|
|
2412
2529
|
*/
|
|
2413
|
-
|
|
2530
|
+
projectPaths?: string[];
|
|
2414
2531
|
/**
|
|
2415
|
-
*
|
|
2532
|
+
* When true, omit the host's agents (the user-level agent directory and all plugin agents), leaving only project and remote agents. For multitenant deployments.
|
|
2416
2533
|
*/
|
|
2417
|
-
|
|
2418
|
-
copilotUser?: CopilotUserResponse;
|
|
2534
|
+
excludeHostAgents?: boolean;
|
|
2419
2535
|
}
|
|
2420
2536
|
/**
|
|
2421
|
-
*
|
|
2537
|
+
* Name of the custom agent to select for subsequent turns.
|
|
2422
2538
|
*
|
|
2423
2539
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
2424
|
-
* via the `definition` "
|
|
2540
|
+
* via the `definition` "AgentSelectRequest".
|
|
2425
2541
|
*/
|
|
2426
2542
|
/** @experimental */
|
|
2427
|
-
export interface
|
|
2543
|
+
export interface AgentSelectRequest {
|
|
2428
2544
|
/**
|
|
2429
|
-
*
|
|
2545
|
+
* Name of the custom agent to select
|
|
2430
2546
|
*/
|
|
2431
|
-
|
|
2547
|
+
name: string;
|
|
2548
|
+
}
|
|
2549
|
+
/**
|
|
2550
|
+
* The newly selected custom agent.
|
|
2551
|
+
*
|
|
2552
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
2553
|
+
* via the `definition` "AgentSelectResult".
|
|
2554
|
+
*/
|
|
2555
|
+
/** @experimental */
|
|
2556
|
+
export interface AgentSelectResult {
|
|
2557
|
+
agent: AgentInfo;
|
|
2558
|
+
}
|
|
2559
|
+
/**
|
|
2560
|
+
* Optional project paths to include when enumerating agent discovery directories.
|
|
2561
|
+
*
|
|
2562
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
2563
|
+
* via the `definition` "AgentsGetDiscoveryPathsRequest".
|
|
2564
|
+
*/
|
|
2565
|
+
/** @experimental */
|
|
2566
|
+
export interface AgentsGetDiscoveryPathsRequest {
|
|
2432
2567
|
/**
|
|
2433
|
-
*
|
|
2568
|
+
* Optional list of project directory paths. When omitted or empty, only the user-level directory is returned.
|
|
2434
2569
|
*/
|
|
2435
|
-
|
|
2570
|
+
projectPaths?: string[];
|
|
2436
2571
|
/**
|
|
2437
|
-
*
|
|
2572
|
+
* When true, omit the host's user-level agent directory, leaving only project directories. For multitenant deployments (mirrors `discover`'s `excludeHostAgents`).
|
|
2438
2573
|
*/
|
|
2439
|
-
|
|
2440
|
-
copilotUser?: CopilotUserResponse;
|
|
2574
|
+
excludeHostAgents?: boolean;
|
|
2441
2575
|
}
|
|
2442
2576
|
/**
|
|
2443
|
-
*
|
|
2577
|
+
* Indicates whether the operation succeeded and reports the post-mutation state.
|
|
2444
2578
|
*
|
|
2445
2579
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
2446
|
-
* via the `definition` "
|
|
2580
|
+
* via the `definition` "AllowAllPermissionSetResult".
|
|
2447
2581
|
*/
|
|
2448
2582
|
/** @experimental */
|
|
2449
|
-
export interface
|
|
2450
|
-
/**
|
|
2451
|
-
* Authentication via the `gh` CLI's saved credentials.
|
|
2452
|
-
*/
|
|
2453
|
-
type: "gh-cli";
|
|
2583
|
+
export interface AllowAllPermissionSetResult {
|
|
2454
2584
|
/**
|
|
2455
|
-
*
|
|
2585
|
+
* Whether the operation succeeded
|
|
2456
2586
|
*/
|
|
2457
|
-
|
|
2587
|
+
success: boolean;
|
|
2458
2588
|
/**
|
|
2459
|
-
*
|
|
2589
|
+
* Authoritative allow-all state after the mutation
|
|
2460
2590
|
*/
|
|
2461
|
-
|
|
2591
|
+
enabled: boolean;
|
|
2592
|
+
}
|
|
2593
|
+
/**
|
|
2594
|
+
* Current full allow-all permission state.
|
|
2595
|
+
*
|
|
2596
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
2597
|
+
* via the `definition` "AllowAllPermissionState".
|
|
2598
|
+
*/
|
|
2599
|
+
/** @experimental */
|
|
2600
|
+
export interface AllowAllPermissionState {
|
|
2462
2601
|
/**
|
|
2463
|
-
*
|
|
2602
|
+
* Whether full allow-all permissions are currently active
|
|
2464
2603
|
*/
|
|
2465
|
-
|
|
2466
|
-
copilotUser?: CopilotUserResponse;
|
|
2604
|
+
enabled: boolean;
|
|
2467
2605
|
}
|
|
2468
2606
|
/**
|
|
2469
2607
|
* Cancellation result for a user-requested shell command.
|
|
@@ -2677,11 +2815,6 @@ export interface OpenCanvasInstance {
|
|
|
2677
2815
|
input?: {
|
|
2678
2816
|
[k: string]: unknown | undefined;
|
|
2679
2817
|
};
|
|
2680
|
-
/**
|
|
2681
|
-
* Whether this snapshot came from an idempotent reopen
|
|
2682
|
-
*/
|
|
2683
|
-
reopen: boolean;
|
|
2684
|
-
availability: CanvasInstanceAvailability;
|
|
2685
2818
|
}
|
|
2686
2819
|
/**
|
|
2687
2820
|
* Canvas open parameters.
|
|
@@ -2841,6 +2974,19 @@ export interface CanvasProviderOpenResult {
|
|
|
2841
2974
|
*/
|
|
2842
2975
|
status?: string;
|
|
2843
2976
|
}
|
|
2977
|
+
/**
|
|
2978
|
+
* Options scoped to the built-in CAPI (Copilot API) provider.
|
|
2979
|
+
*
|
|
2980
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
2981
|
+
* via the `definition` "CapiSessionOptions".
|
|
2982
|
+
*/
|
|
2983
|
+
/** @experimental */
|
|
2984
|
+
export interface CapiSessionOptions {
|
|
2985
|
+
/**
|
|
2986
|
+
* Whether to use WebSocket transport for the CAPI Responses API. Enabled by default when the model advertises `ws:/responses` support; set to `false` to force the HTTP Responses transport in environments where WebSockets are blocked (e.g. behind a proxy). Setting this to `false` is equivalent to the `COPILOT_CLI_DISABLE_WEBSOCKET_RESPONSES` environment variable.
|
|
2987
|
+
*/
|
|
2988
|
+
enableWebSocketResponses?: boolean;
|
|
2989
|
+
}
|
|
2844
2990
|
/**
|
|
2845
2991
|
* Slash commands available in the session, after applying any include/exclude filters.
|
|
2846
2992
|
*
|
|
@@ -3450,7 +3596,6 @@ export interface ExternalToolTextResultForLlm {
|
|
|
3450
3596
|
* Structured content blocks from the tool
|
|
3451
3597
|
*/
|
|
3452
3598
|
contents?: ExternalToolTextResultForLlmContent[];
|
|
3453
|
-
[k: string]: unknown | undefined;
|
|
3454
3599
|
}
|
|
3455
3600
|
/**
|
|
3456
3601
|
* Binary result returned by a tool for the model
|
|
@@ -4089,21 +4234,213 @@ export interface InstructionSource {
|
|
|
4089
4234
|
type: InstructionSourceType;
|
|
4090
4235
|
location: InstructionSourceLocation;
|
|
4091
4236
|
/**
|
|
4092
|
-
* Glob pattern(s) from frontmatter — when set, this instruction applies only to matching files
|
|
4237
|
+
* Glob pattern(s) from frontmatter — when set, this instruction applies only to matching files
|
|
4238
|
+
*/
|
|
4239
|
+
applyTo?: string[];
|
|
4240
|
+
/**
|
|
4241
|
+
* Short description (body after frontmatter) for use in instruction tables
|
|
4242
|
+
*/
|
|
4243
|
+
description?: string;
|
|
4244
|
+
/**
|
|
4245
|
+
* When true, this source starts disabled and must be toggled on by the user
|
|
4246
|
+
*/
|
|
4247
|
+
defaultDisabled?: boolean;
|
|
4248
|
+
/**
|
|
4249
|
+
* The project path this source was discovered from. Only set by sessionless discovery for repository/working-directory sources, where it disambiguates same-named files (e.g. .github/copilot-instructions.md) across multiple workspace roots. The session-scoped getSources leaves it unset.
|
|
4250
|
+
*/
|
|
4251
|
+
projectPath?: string;
|
|
4252
|
+
}
|
|
4253
|
+
/**
|
|
4254
|
+
* HTTP headers as a map from lowercased header name to a list of values. Multi-valued headers (e.g. Set-Cookie) preserve all values.
|
|
4255
|
+
*
|
|
4256
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
4257
|
+
* via the `definition` "LlmInferenceHeaders".
|
|
4258
|
+
*/
|
|
4259
|
+
/** @experimental */
|
|
4260
|
+
export interface LlmInferenceHeaders {
|
|
4261
|
+
[k: string]: string[] | undefined;
|
|
4262
|
+
}
|
|
4263
|
+
/**
|
|
4264
|
+
* A request body chunk or cancellation signal.
|
|
4265
|
+
*
|
|
4266
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
4267
|
+
* via the `definition` "LlmInferenceHttpRequestChunkRequest".
|
|
4268
|
+
*/
|
|
4269
|
+
/** @experimental */
|
|
4270
|
+
export interface LlmInferenceHttpRequestChunkRequest {
|
|
4271
|
+
/**
|
|
4272
|
+
* Matches the requestId from the originating httpRequestStart frame.
|
|
4273
|
+
*/
|
|
4274
|
+
requestId: string;
|
|
4275
|
+
/**
|
|
4276
|
+
* Body byte range. UTF-8 text when `binary` is absent or false; base64-encoded bytes when `binary` is true. May be empty.
|
|
4277
|
+
*/
|
|
4278
|
+
data: string;
|
|
4279
|
+
/**
|
|
4280
|
+
* When true, `data` is base64-encoded bytes. When absent or false, `data` is UTF-8 text.
|
|
4281
|
+
*/
|
|
4282
|
+
binary?: boolean;
|
|
4283
|
+
/**
|
|
4284
|
+
* When true, this is the final body chunk for the request. The SDK may rely on having received an end-marked chunk before treating the request body as complete.
|
|
4285
|
+
*/
|
|
4286
|
+
end?: boolean;
|
|
4287
|
+
/**
|
|
4288
|
+
* When true, the runtime is cancelling the in-flight request (e.g. upstream consumer aborted). `data` is ignored. Implies end-of-request.
|
|
4289
|
+
*/
|
|
4290
|
+
cancel?: boolean;
|
|
4291
|
+
/**
|
|
4292
|
+
* Optional human-readable reason for the cancellation, propagated for logging.
|
|
4293
|
+
*/
|
|
4294
|
+
cancelReason?: string;
|
|
4295
|
+
}
|
|
4296
|
+
/**
|
|
4297
|
+
* Acknowledgement. The SDK is free to ignore the ack and treat chunk delivery as fire-and-forget.
|
|
4298
|
+
*
|
|
4299
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
4300
|
+
* via the `definition` "LlmInferenceHttpRequestChunkResult".
|
|
4301
|
+
*/
|
|
4302
|
+
/** @experimental */
|
|
4303
|
+
export interface LlmInferenceHttpRequestChunkResult {
|
|
4304
|
+
}
|
|
4305
|
+
/**
|
|
4306
|
+
* The head of an outbound model-layer HTTP request.
|
|
4307
|
+
*
|
|
4308
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
4309
|
+
* via the `definition` "LlmInferenceHttpRequestStartRequest".
|
|
4310
|
+
*/
|
|
4311
|
+
/** @experimental */
|
|
4312
|
+
export interface LlmInferenceHttpRequestStartRequest {
|
|
4313
|
+
/**
|
|
4314
|
+
* Opaque runtime-minted id, unique per in-flight request. The SDK uses this to correlate httpRequestChunk frames and to address its httpResponseStart / httpResponseChunk replies back to the runtime.
|
|
4315
|
+
*/
|
|
4316
|
+
requestId: string;
|
|
4317
|
+
/**
|
|
4318
|
+
* Id of the runtime session that triggered this request, when one is in scope. Absent for requests issued outside any session (e.g. startup model-catalog or capability resolution). This is a payload field — not a dispatch key — because the client-global API is registered process-wide rather than per session.
|
|
4319
|
+
*/
|
|
4320
|
+
sessionId?: string;
|
|
4321
|
+
/**
|
|
4322
|
+
* HTTP method, e.g. GET, POST.
|
|
4323
|
+
*/
|
|
4324
|
+
method: string;
|
|
4325
|
+
/**
|
|
4326
|
+
* Absolute request URL.
|
|
4327
|
+
*/
|
|
4328
|
+
url: string;
|
|
4329
|
+
headers: LlmInferenceHeaders;
|
|
4330
|
+
transport?: LlmInferenceHttpRequestStartTransport;
|
|
4331
|
+
}
|
|
4332
|
+
/**
|
|
4333
|
+
* Acknowledgement. Returning successfully simply means the SDK accepted the start frame; it does not imply the request will succeed.
|
|
4334
|
+
*
|
|
4335
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
4336
|
+
* via the `definition` "LlmInferenceHttpRequestStartResult".
|
|
4337
|
+
*/
|
|
4338
|
+
/** @experimental */
|
|
4339
|
+
export interface LlmInferenceHttpRequestStartResult {
|
|
4340
|
+
}
|
|
4341
|
+
/**
|
|
4342
|
+
* Set to terminate the response with a transport-level failure. Implies end-of-stream; any further chunks for this requestId are ignored.
|
|
4343
|
+
*
|
|
4344
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
4345
|
+
* via the `definition` "LlmInferenceHttpResponseChunkError".
|
|
4346
|
+
*/
|
|
4347
|
+
/** @experimental */
|
|
4348
|
+
export interface LlmInferenceHttpResponseChunkError {
|
|
4349
|
+
/**
|
|
4350
|
+
* Human-readable failure description.
|
|
4351
|
+
*/
|
|
4352
|
+
message: string;
|
|
4353
|
+
/**
|
|
4354
|
+
* Optional machine-readable error code.
|
|
4355
|
+
*/
|
|
4356
|
+
code?: string;
|
|
4357
|
+
}
|
|
4358
|
+
/**
|
|
4359
|
+
* A response body chunk or terminal error.
|
|
4360
|
+
*
|
|
4361
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
4362
|
+
* via the `definition` "LlmInferenceHttpResponseChunkRequest".
|
|
4363
|
+
*/
|
|
4364
|
+
/** @experimental */
|
|
4365
|
+
export interface LlmInferenceHttpResponseChunkRequest {
|
|
4366
|
+
/**
|
|
4367
|
+
* Matches the requestId from the originating httpRequestStart frame.
|
|
4368
|
+
*/
|
|
4369
|
+
requestId: string;
|
|
4370
|
+
/**
|
|
4371
|
+
* Body byte range. UTF-8 text when `binary` is absent or false; base64-encoded bytes when `binary` is true. May be empty (e.g. when the response body is empty: send a single chunk with empty data and end=true).
|
|
4372
|
+
*/
|
|
4373
|
+
data: string;
|
|
4374
|
+
/**
|
|
4375
|
+
* When true, `data` is base64-encoded bytes. When absent or false, `data` is UTF-8 text.
|
|
4376
|
+
*/
|
|
4377
|
+
binary?: boolean;
|
|
4378
|
+
/**
|
|
4379
|
+
* When true, this is the final body chunk for the response. The runtime treats the response body as complete after receiving an end-marked chunk.
|
|
4380
|
+
*/
|
|
4381
|
+
end?: boolean;
|
|
4382
|
+
error?: LlmInferenceHttpResponseChunkError;
|
|
4383
|
+
}
|
|
4384
|
+
/**
|
|
4385
|
+
* Whether the chunk was accepted.
|
|
4386
|
+
*
|
|
4387
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
4388
|
+
* via the `definition` "LlmInferenceHttpResponseChunkResult".
|
|
4389
|
+
*/
|
|
4390
|
+
/** @experimental */
|
|
4391
|
+
export interface LlmInferenceHttpResponseChunkResult {
|
|
4392
|
+
/**
|
|
4393
|
+
* True when the chunk was matched to a pending request; false when unknown.
|
|
4394
|
+
*/
|
|
4395
|
+
accepted: boolean;
|
|
4396
|
+
}
|
|
4397
|
+
/**
|
|
4398
|
+
* Response head.
|
|
4399
|
+
*
|
|
4400
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
4401
|
+
* via the `definition` "LlmInferenceHttpResponseStartRequest".
|
|
4402
|
+
*/
|
|
4403
|
+
/** @experimental */
|
|
4404
|
+
export interface LlmInferenceHttpResponseStartRequest {
|
|
4405
|
+
/**
|
|
4406
|
+
* Matches the requestId from the originating httpRequestStart frame.
|
|
4407
|
+
*/
|
|
4408
|
+
requestId: string;
|
|
4409
|
+
/**
|
|
4410
|
+
* HTTP status code.
|
|
4093
4411
|
*/
|
|
4094
|
-
|
|
4412
|
+
status: number;
|
|
4095
4413
|
/**
|
|
4096
|
-
*
|
|
4414
|
+
* Optional HTTP status reason phrase.
|
|
4097
4415
|
*/
|
|
4098
|
-
|
|
4416
|
+
statusText?: string;
|
|
4417
|
+
headers: LlmInferenceHeaders;
|
|
4418
|
+
}
|
|
4419
|
+
/**
|
|
4420
|
+
* Whether the start frame was accepted.
|
|
4421
|
+
*
|
|
4422
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
4423
|
+
* via the `definition` "LlmInferenceHttpResponseStartResult".
|
|
4424
|
+
*/
|
|
4425
|
+
/** @experimental */
|
|
4426
|
+
export interface LlmInferenceHttpResponseStartResult {
|
|
4099
4427
|
/**
|
|
4100
|
-
*
|
|
4428
|
+
* True when the response start was matched to a pending request; false when unknown.
|
|
4101
4429
|
*/
|
|
4102
|
-
|
|
4430
|
+
accepted: boolean;
|
|
4431
|
+
}
|
|
4432
|
+
/**
|
|
4433
|
+
* Indicates whether the calling client was registered as the LLM inference provider.
|
|
4434
|
+
*
|
|
4435
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
4436
|
+
* via the `definition` "LlmInferenceSetProviderResult".
|
|
4437
|
+
*/
|
|
4438
|
+
/** @experimental */
|
|
4439
|
+
export interface LlmInferenceSetProviderResult {
|
|
4103
4440
|
/**
|
|
4104
|
-
*
|
|
4441
|
+
* Whether the provider was set successfully
|
|
4105
4442
|
*/
|
|
4106
|
-
|
|
4443
|
+
success: boolean;
|
|
4107
4444
|
}
|
|
4108
4445
|
/**
|
|
4109
4446
|
* Schema for the `LocalSessionMetadataValue` type.
|
|
@@ -4746,7 +5083,6 @@ export interface McpServerAuthConfigRedirectPort {
|
|
|
4746
5083
|
* Fixed port for the OAuth redirect callback server.
|
|
4747
5084
|
*/
|
|
4748
5085
|
redirectPort?: number;
|
|
4749
|
-
[k: string]: unknown | undefined;
|
|
4750
5086
|
}
|
|
4751
5087
|
/**
|
|
4752
5088
|
* Remote MCP server configuration accessed over HTTP or SSE.
|
|
@@ -4937,7 +5273,9 @@ export interface McpExecuteSamplingParams {
|
|
|
4937
5273
|
/**
|
|
4938
5274
|
* The original MCP JSON-RPC request ID (string or number). Used by the runtime to correlate the inference with the originating MCP request for telemetry; this is distinct from `requestId` (which is the schema-level cancellation handle).
|
|
4939
5275
|
*/
|
|
4940
|
-
mcpRequestId:
|
|
5276
|
+
mcpRequestId: {
|
|
5277
|
+
[k: string]: unknown | undefined;
|
|
5278
|
+
};
|
|
4941
5279
|
request: McpExecuteSamplingRequest;
|
|
4942
5280
|
}
|
|
4943
5281
|
/**
|
|
@@ -5126,7 +5464,34 @@ export interface McpTools {
|
|
|
5126
5464
|
description?: string;
|
|
5127
5465
|
}
|
|
5128
5466
|
/**
|
|
5129
|
-
*
|
|
5467
|
+
* Pending MCP OAuth request ID and host-provided token or cancellation response.
|
|
5468
|
+
*
|
|
5469
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
5470
|
+
* via the `definition` "McpOauthHandlePendingRequest".
|
|
5471
|
+
*/
|
|
5472
|
+
/** @experimental */
|
|
5473
|
+
export interface McpOauthHandlePendingRequest {
|
|
5474
|
+
/**
|
|
5475
|
+
* OAuth request identifier from the mcp.oauth_required event
|
|
5476
|
+
*/
|
|
5477
|
+
requestId: string;
|
|
5478
|
+
result: McpOauthPendingRequestResponse;
|
|
5479
|
+
}
|
|
5480
|
+
/**
|
|
5481
|
+
* Indicates whether the pending MCP OAuth response was accepted.
|
|
5482
|
+
*
|
|
5483
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
5484
|
+
* via the `definition` "McpOauthHandlePendingResult".
|
|
5485
|
+
*/
|
|
5486
|
+
/** @experimental */
|
|
5487
|
+
export interface McpOauthHandlePendingResult {
|
|
5488
|
+
/**
|
|
5489
|
+
* Whether the response was accepted. False if the request was unknown, timed out, or already resolved.
|
|
5490
|
+
*/
|
|
5491
|
+
success: boolean;
|
|
5492
|
+
}
|
|
5493
|
+
/**
|
|
5494
|
+
* Remote MCP server name and optional overrides controlling reauthentication, OAuth client display name, callback success-page copy, and static OAuth client selection.
|
|
5130
5495
|
*
|
|
5131
5496
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
5132
5497
|
* via the `definition` "McpOauthLoginRequest".
|
|
@@ -5149,6 +5514,19 @@ export interface McpOauthLoginRequest {
|
|
|
5149
5514
|
* Optional override for the body text shown on the OAuth loopback callback success page. When omitted, the runtime applies a neutral fallback; callers driving interactive auth should pass surface-specific copy telling the user where to return.
|
|
5150
5515
|
*/
|
|
5151
5516
|
callbackSuccessMessage?: string;
|
|
5517
|
+
/**
|
|
5518
|
+
* Optional OAuth client ID override for this login. When set, the runtime uses this pre-registered static client instead of dynamic client registration.
|
|
5519
|
+
*/
|
|
5520
|
+
clientId?: string;
|
|
5521
|
+
/**
|
|
5522
|
+
* Optional OAuth client secret override for this login. The runtime treats this as an ephemeral host-owned secret, uses it for this authentication attempt and does not persist it.
|
|
5523
|
+
*/
|
|
5524
|
+
clientSecret?: string;
|
|
5525
|
+
/**
|
|
5526
|
+
* Optional override indicating whether the static OAuth client is public. When false, the runtime treats it as confidential and uses the per-login clientSecret if provided, otherwise retrieving the client secret from the MCP OAuth secret store.
|
|
5527
|
+
*/
|
|
5528
|
+
publicClient?: boolean;
|
|
5529
|
+
grantType?: McpOauthLoginGrantType;
|
|
5152
5530
|
}
|
|
5153
5531
|
/**
|
|
5154
5532
|
* OAuth authorization URL the caller should open, or empty when cached tokens already authenticated the server.
|
|
@@ -5646,17 +6024,31 @@ export interface ModelBillingTokenPrices {
|
|
|
5646
6024
|
*/
|
|
5647
6025
|
outputPrice?: number;
|
|
5648
6026
|
/**
|
|
5649
|
-
*
|
|
6027
|
+
* @deprecated
|
|
6028
|
+
* Use cacheReadPrice instead. AI Credits cost per billing batch of cached tokens
|
|
5650
6029
|
*/
|
|
5651
6030
|
cachePrice?: number;
|
|
6031
|
+
/**
|
|
6032
|
+
* AI Credits cost per billing batch of cached (read) tokens
|
|
6033
|
+
*/
|
|
6034
|
+
cacheReadPrice?: number;
|
|
6035
|
+
/**
|
|
6036
|
+
* AI Credits cost per billing batch of cache-write (cache creation) tokens.
|
|
6037
|
+
*/
|
|
6038
|
+
cacheWritePrice?: number;
|
|
5652
6039
|
/**
|
|
5653
6040
|
* Number of tokens per standard billing batch
|
|
5654
6041
|
*/
|
|
5655
6042
|
batchSize?: number;
|
|
5656
6043
|
/**
|
|
5657
|
-
*
|
|
6044
|
+
* @deprecated
|
|
6045
|
+
* Use maxPromptTokens instead. Prompt token budget for the default tier. The total context window is this value plus the model's max_output_tokens.
|
|
5658
6046
|
*/
|
|
5659
6047
|
contextMax?: number;
|
|
6048
|
+
/**
|
|
6049
|
+
* Prompt token budget for the default tier. The total context window is this value plus the model's max_output_tokens.
|
|
6050
|
+
*/
|
|
6051
|
+
maxPromptTokens?: number;
|
|
5660
6052
|
longContext?: ModelBillingTokenPricesLongContext;
|
|
5661
6053
|
}
|
|
5662
6054
|
/**
|
|
@@ -5675,13 +6067,27 @@ export interface ModelBillingTokenPricesLongContext {
|
|
|
5675
6067
|
*/
|
|
5676
6068
|
outputPrice?: number;
|
|
5677
6069
|
/**
|
|
5678
|
-
*
|
|
6070
|
+
* @deprecated
|
|
6071
|
+
* Use cacheReadPrice instead. AI Credits cost per billing batch of cached tokens
|
|
5679
6072
|
*/
|
|
5680
6073
|
cachePrice?: number;
|
|
5681
6074
|
/**
|
|
5682
|
-
*
|
|
6075
|
+
* AI Credits cost per billing batch of cached (read) tokens
|
|
6076
|
+
*/
|
|
6077
|
+
cacheReadPrice?: number;
|
|
6078
|
+
/**
|
|
6079
|
+
* AI Credits cost per billing batch of cache-write (cache creation) tokens.
|
|
6080
|
+
*/
|
|
6081
|
+
cacheWritePrice?: number;
|
|
6082
|
+
/**
|
|
6083
|
+
* @deprecated
|
|
6084
|
+
* Use maxPromptTokens instead. Prompt token budget for the long context tier. The total context window is this value plus the model's max_output_tokens.
|
|
5683
6085
|
*/
|
|
5684
6086
|
contextMax?: number;
|
|
6087
|
+
/**
|
|
6088
|
+
* Prompt token budget for the long context tier. The total context window is this value plus the model's max_output_tokens.
|
|
6089
|
+
*/
|
|
6090
|
+
maxPromptTokens?: number;
|
|
5685
6091
|
}
|
|
5686
6092
|
/**
|
|
5687
6093
|
* Optional capability overrides (vision, tool_calls, reasoning, etc.).
|
|
@@ -5868,6 +6274,7 @@ export interface NamedProviderConfig {
|
|
|
5868
6274
|
name: string;
|
|
5869
6275
|
type?: ProviderConfigType;
|
|
5870
6276
|
wireApi?: ProviderConfigWireApi;
|
|
6277
|
+
transport?: ProviderConfigTransport;
|
|
5871
6278
|
/**
|
|
5872
6279
|
* API endpoint URL.
|
|
5873
6280
|
*/
|
|
@@ -5887,6 +6294,10 @@ export interface NamedProviderConfig {
|
|
|
5887
6294
|
headers?: {
|
|
5888
6295
|
[k: string]: string | undefined;
|
|
5889
6296
|
};
|
|
6297
|
+
/**
|
|
6298
|
+
* When true, the SDK client supplies bearer tokens on demand: the runtime calls the client-session `providerToken.getToken` callback before each request and applies the returned token as an `Authorization: Bearer <token>` header. This is the bearer/OAuth scheme used by Azure AD / managed-identity tokens and provider OAuth access tokens (including Anthropic's), not a provider-specific API-key header such as Anthropic's `x-api-key`. The token-acquiring function itself stays on the SDK side and is never serialized; only this flag crosses the wire. When set alongside `apiKey`/`bearerToken`, the callback takes precedence: the runtime applies the token returned by `providerToken.getToken` as the `Authorization: Bearer` header for each request and does not send the static credential.
|
|
6299
|
+
*/
|
|
6300
|
+
hasBearerTokenProvider?: boolean;
|
|
5890
6301
|
}
|
|
5891
6302
|
/**
|
|
5892
6303
|
* Azure-specific provider options.
|
|
@@ -5962,9 +6373,8 @@ export interface NameSetRequest {
|
|
|
5962
6373
|
/** @experimental */
|
|
5963
6374
|
export interface OptionsUpdateAdditionalContentExclusionPolicy {
|
|
5964
6375
|
rules: OptionsUpdateAdditionalContentExclusionPolicyRule[];
|
|
5965
|
-
last_updated_at:
|
|
6376
|
+
last_updated_at: unknown;
|
|
5966
6377
|
scope: OptionsUpdateAdditionalContentExclusionPolicyScope;
|
|
5967
|
-
[k: string]: unknown | undefined;
|
|
5968
6378
|
}
|
|
5969
6379
|
/**
|
|
5970
6380
|
* Schema for the `OptionsUpdateAdditionalContentExclusionPolicyRule` type.
|
|
@@ -5978,7 +6388,6 @@ export interface OptionsUpdateAdditionalContentExclusionPolicyRule {
|
|
|
5978
6388
|
ifAnyMatch?: string[];
|
|
5979
6389
|
ifNoneMatch?: string[];
|
|
5980
6390
|
source: OptionsUpdateAdditionalContentExclusionPolicyRuleSource;
|
|
5981
|
-
[k: string]: unknown | undefined;
|
|
5982
6391
|
}
|
|
5983
6392
|
/**
|
|
5984
6393
|
* Schema for the `OptionsUpdateAdditionalContentExclusionPolicyRuleSource` type.
|
|
@@ -6974,9 +7383,8 @@ export interface PermissionRulesSet {
|
|
|
6974
7383
|
/** @experimental */
|
|
6975
7384
|
export interface PermissionsConfigureAdditionalContentExclusionPolicy {
|
|
6976
7385
|
rules: PermissionsConfigureAdditionalContentExclusionPolicyRule[];
|
|
6977
|
-
last_updated_at:
|
|
7386
|
+
last_updated_at: unknown;
|
|
6978
7387
|
scope: PermissionsConfigureAdditionalContentExclusionPolicyScope;
|
|
6979
|
-
[k: string]: unknown | undefined;
|
|
6980
7388
|
}
|
|
6981
7389
|
/**
|
|
6982
7390
|
* Schema for the `PermissionsConfigureAdditionalContentExclusionPolicyRule` type.
|
|
@@ -6990,7 +7398,6 @@ export interface PermissionsConfigureAdditionalContentExclusionPolicyRule {
|
|
|
6990
7398
|
ifAnyMatch?: string[];
|
|
6991
7399
|
ifNoneMatch?: string[];
|
|
6992
7400
|
source: PermissionsConfigureAdditionalContentExclusionPolicyRuleSource;
|
|
6993
|
-
[k: string]: unknown | undefined;
|
|
6994
7401
|
}
|
|
6995
7402
|
/**
|
|
6996
7403
|
* Schema for the `PermissionsConfigureAdditionalContentExclusionPolicyRuleSource` type.
|
|
@@ -7751,6 +8158,78 @@ export interface SessionsPollSpawnedSessionsEvent {
|
|
|
7751
8158
|
*/
|
|
7752
8159
|
sessionId: string;
|
|
7753
8160
|
}
|
|
8161
|
+
/**
|
|
8162
|
+
* BYOK providers and/or models to add to the session's registry at runtime. Both fields are optional; provide providers, models, or both.
|
|
8163
|
+
*
|
|
8164
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
8165
|
+
* via the `definition` "ProviderAddRequest".
|
|
8166
|
+
*/
|
|
8167
|
+
/** @experimental */
|
|
8168
|
+
export interface ProviderAddRequest {
|
|
8169
|
+
/**
|
|
8170
|
+
* Named BYOK provider connections to register, additive to any providers already in the registry. Each name must be unique across the registry and must not contain '/'.
|
|
8171
|
+
*/
|
|
8172
|
+
providers?: NamedProviderConfig[];
|
|
8173
|
+
/**
|
|
8174
|
+
* BYOK model definitions to register. Each must reference a provider that is already registered or included in this same call. Selection ids (`provider/id`) must be unique across the registry.
|
|
8175
|
+
*/
|
|
8176
|
+
models?: ProviderModelConfig[];
|
|
8177
|
+
}
|
|
8178
|
+
/**
|
|
8179
|
+
* A BYOK model definition referencing a named provider.
|
|
8180
|
+
*
|
|
8181
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
8182
|
+
* via the `definition` "ProviderModelConfig".
|
|
8183
|
+
*/
|
|
8184
|
+
/** @experimental */
|
|
8185
|
+
export interface ProviderModelConfig {
|
|
8186
|
+
/**
|
|
8187
|
+
* Provider-local model id, unique within its provider. The session-wide selection id (shown in the model list and passed to switchTo) is the provider-qualified `provider/id`.
|
|
8188
|
+
*/
|
|
8189
|
+
id: string;
|
|
8190
|
+
/**
|
|
8191
|
+
* Name of the NamedProviderConfig that serves this model.
|
|
8192
|
+
*/
|
|
8193
|
+
provider: string;
|
|
8194
|
+
/**
|
|
8195
|
+
* The model name sent to the provider API for inference. Defaults to `id`.
|
|
8196
|
+
*/
|
|
8197
|
+
wireModel?: string;
|
|
8198
|
+
/**
|
|
8199
|
+
* Well-known base model id used for behavior/capability/config lookup. Defaults to `id`.
|
|
8200
|
+
*/
|
|
8201
|
+
modelId?: string;
|
|
8202
|
+
/**
|
|
8203
|
+
* Display name for model pickers. Defaults to the provider-qualified selection id (`provider/id`).
|
|
8204
|
+
*/
|
|
8205
|
+
name?: string;
|
|
8206
|
+
/**
|
|
8207
|
+
* Maximum prompt/input tokens for the model.
|
|
8208
|
+
*/
|
|
8209
|
+
maxPromptTokens?: number;
|
|
8210
|
+
/**
|
|
8211
|
+
* Maximum context window tokens for the model.
|
|
8212
|
+
*/
|
|
8213
|
+
maxContextWindowTokens?: number;
|
|
8214
|
+
/**
|
|
8215
|
+
* Maximum output tokens for the model.
|
|
8216
|
+
*/
|
|
8217
|
+
maxOutputTokens?: number;
|
|
8218
|
+
capabilities?: ModelCapabilitiesOverride;
|
|
8219
|
+
}
|
|
8220
|
+
/**
|
|
8221
|
+
* The selectable model entries synthesized for the models added by this call.
|
|
8222
|
+
*
|
|
8223
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
8224
|
+
* via the `definition` "ProviderAddResult".
|
|
8225
|
+
*/
|
|
8226
|
+
/** @experimental */
|
|
8227
|
+
export interface ProviderAddResult {
|
|
8228
|
+
/**
|
|
8229
|
+
* Synthesized selectable model entries for the newly added BYOK models, each under its provider-qualified selection id (`provider/id`). Empty when only providers were added.
|
|
8230
|
+
*/
|
|
8231
|
+
models: unknown[];
|
|
8232
|
+
}
|
|
7754
8233
|
/**
|
|
7755
8234
|
* Custom model-provider configuration (BYOK).
|
|
7756
8235
|
*
|
|
@@ -7761,6 +8240,7 @@ export interface SessionsPollSpawnedSessionsEvent {
|
|
|
7761
8240
|
export interface ProviderConfig {
|
|
7762
8241
|
type?: ProviderConfigType;
|
|
7763
8242
|
wireApi?: ProviderConfigWireApi;
|
|
8243
|
+
transport?: ProviderConfigTransport;
|
|
7764
8244
|
/**
|
|
7765
8245
|
* API endpoint URL.
|
|
7766
8246
|
*/
|
|
@@ -7800,6 +8280,10 @@ export interface ProviderConfig {
|
|
|
7800
8280
|
headers?: {
|
|
7801
8281
|
[k: string]: string | undefined;
|
|
7802
8282
|
};
|
|
8283
|
+
/**
|
|
8284
|
+
* When true, the SDK client supplies bearer tokens on demand: the runtime calls the client-session `providerToken.getToken` callback before each request and applies the returned token as an `Authorization: Bearer <token>` header. This is the bearer/OAuth scheme used by Azure AD / managed-identity tokens and provider OAuth access tokens (including Anthropic's), not a provider-specific API-key header such as Anthropic's `x-api-key`. The token-acquiring function itself stays on the SDK side and is never serialized; only this flag crosses the wire. When set alongside `apiKey`/`bearerToken`, the callback takes precedence: the runtime applies the token returned by `providerToken.getToken` as the `Authorization: Bearer` header for each request and does not send the static credential.
|
|
8285
|
+
*/
|
|
8286
|
+
hasBearerTokenProvider?: boolean;
|
|
7803
8287
|
}
|
|
7804
8288
|
/**
|
|
7805
8289
|
* A snapshot of the provider endpoint the session is currently configured to talk to.
|
|
@@ -7811,6 +8295,7 @@ export interface ProviderConfig {
|
|
|
7811
8295
|
export interface ProviderEndpoint {
|
|
7812
8296
|
type: ProviderEndpointType;
|
|
7813
8297
|
wireApi?: ProviderEndpointWireApi;
|
|
8298
|
+
transport?: ProviderEndpointTransport;
|
|
7814
8299
|
/**
|
|
7815
8300
|
* Base URL to pass to the LLM client library.
|
|
7816
8301
|
*/
|
|
@@ -7866,46 +8351,34 @@ export interface ProviderGetEndpointRequest {
|
|
|
7866
8351
|
modelId?: string;
|
|
7867
8352
|
}
|
|
7868
8353
|
/**
|
|
7869
|
-
*
|
|
8354
|
+
* Asks the SDK client to acquire a bearer token for a BYOK provider whose config set `hasBearerTokenProvider: true`. Issued by the runtime before each outbound model request; the runtime does no caching, so this is sent once per request.
|
|
7870
8355
|
*
|
|
7871
8356
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
7872
|
-
* via the `definition` "
|
|
8357
|
+
* via the `definition` "ProviderTokenAcquireRequest".
|
|
7873
8358
|
*/
|
|
7874
8359
|
/** @experimental */
|
|
7875
|
-
export interface
|
|
7876
|
-
/**
|
|
7877
|
-
* Provider-local model id, unique within its provider. The session-wide selection id (shown in the model list and passed to switchTo) is the provider-qualified `provider/id`.
|
|
7878
|
-
*/
|
|
7879
|
-
id: string;
|
|
7880
|
-
/**
|
|
7881
|
-
* Name of the NamedProviderConfig that serves this model.
|
|
7882
|
-
*/
|
|
7883
|
-
provider: string;
|
|
7884
|
-
/**
|
|
7885
|
-
* The model name sent to the provider API for inference. Defaults to `id`.
|
|
7886
|
-
*/
|
|
7887
|
-
wireModel?: string;
|
|
7888
|
-
/**
|
|
7889
|
-
* Well-known base model id used for behavior/capability/config lookup. Defaults to `id`.
|
|
7890
|
-
*/
|
|
7891
|
-
modelId?: string;
|
|
7892
|
-
/**
|
|
7893
|
-
* Display name for model pickers. Defaults to the provider-qualified selection id (`provider/id`).
|
|
7894
|
-
*/
|
|
7895
|
-
name?: string;
|
|
8360
|
+
export interface ProviderTokenAcquireRequest {
|
|
7896
8361
|
/**
|
|
7897
|
-
*
|
|
8362
|
+
* Target session identifier
|
|
7898
8363
|
*/
|
|
7899
|
-
|
|
8364
|
+
sessionId: string;
|
|
7900
8365
|
/**
|
|
7901
|
-
*
|
|
8366
|
+
* Name of the BYOK provider needing a token. For the legacy whole-session `provider` this is the implicit provider name; for named providers it is `NamedProviderConfig.name`.
|
|
7902
8367
|
*/
|
|
7903
|
-
|
|
8368
|
+
providerName: string;
|
|
8369
|
+
}
|
|
8370
|
+
/**
|
|
8371
|
+
* A bearer token supplied by the SDK client for a BYOK provider. The runtime sets it as `Authorization: Bearer <token>` on the outbound request and does no caching; the SDK consumer owns token caching and refresh.
|
|
8372
|
+
*
|
|
8373
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
8374
|
+
* via the `definition` "ProviderTokenAcquireResult".
|
|
8375
|
+
*/
|
|
8376
|
+
/** @experimental */
|
|
8377
|
+
export interface ProviderTokenAcquireResult {
|
|
7904
8378
|
/**
|
|
7905
|
-
*
|
|
8379
|
+
* The bearer token value (without the `Bearer ` prefix).
|
|
7906
8380
|
*/
|
|
7907
|
-
|
|
7908
|
-
capabilities?: ModelCapabilitiesOverride;
|
|
8381
|
+
token: string;
|
|
7909
8382
|
}
|
|
7910
8383
|
/**
|
|
7911
8384
|
* File attachment
|
|
@@ -8520,12 +8993,6 @@ export interface SandboxConfig {
|
|
|
8520
8993
|
*/
|
|
8521
8994
|
enabled: boolean;
|
|
8522
8995
|
userPolicy?: SandboxConfigUserPolicy;
|
|
8523
|
-
/**
|
|
8524
|
-
* Raw `ContainerConfig` (per `@microsoft/mxc-sdk`) passed directly to `spawnSandboxFromConfig`, bypassing policy merging.
|
|
8525
|
-
*/
|
|
8526
|
-
config?: {
|
|
8527
|
-
[k: string]: unknown | undefined;
|
|
8528
|
-
};
|
|
8529
8996
|
/**
|
|
8530
8997
|
* Whether to auto-add the current working directory to readwritePaths. Default: true.
|
|
8531
8998
|
*/
|
|
@@ -8541,6 +9008,7 @@ export interface SandboxConfig {
|
|
|
8541
9008
|
export interface SandboxConfigUserPolicy {
|
|
8542
9009
|
filesystem?: SandboxConfigUserPolicyFilesystem;
|
|
8543
9010
|
network?: SandboxConfigUserPolicyNetwork;
|
|
9011
|
+
seatbelt?: SandboxConfigUserPolicySeatbelt;
|
|
8544
9012
|
experimental?: SandboxConfigUserPolicyExperimental;
|
|
8545
9013
|
}
|
|
8546
9014
|
/**
|
|
@@ -8593,6 +9061,19 @@ export interface SandboxConfigUserPolicyNetwork {
|
|
|
8593
9061
|
*/
|
|
8594
9062
|
blockedHosts?: string[];
|
|
8595
9063
|
}
|
|
9064
|
+
/**
|
|
9065
|
+
* macOS seatbelt-specific options.
|
|
9066
|
+
*
|
|
9067
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
9068
|
+
* via the `definition` "SandboxConfigUserPolicySeatbelt".
|
|
9069
|
+
*/
|
|
9070
|
+
/** @experimental */
|
|
9071
|
+
export interface SandboxConfigUserPolicySeatbelt {
|
|
9072
|
+
/**
|
|
9073
|
+
* Whether the macOS seatbelt profile may access the keychain.
|
|
9074
|
+
*/
|
|
9075
|
+
keychainAccess?: boolean;
|
|
9076
|
+
}
|
|
8596
9077
|
/**
|
|
8597
9078
|
* Platform-specific experimental policy fields.
|
|
8598
9079
|
*
|
|
@@ -8652,6 +9133,10 @@ export interface ScheduleEntry {
|
|
|
8652
9133
|
* Whether the schedule re-arms after each tick (`/every`) or fires once (`/after`).
|
|
8653
9134
|
*/
|
|
8654
9135
|
recurring: boolean;
|
|
9136
|
+
/**
|
|
9137
|
+
* True for a self-paced (`dynamic`) schedule: no fixed cadence; the model arms each next run via the `manage_schedule` `wakeup` action. `nextRunAt` is model-controlled.
|
|
9138
|
+
*/
|
|
9139
|
+
selfPaced?: boolean;
|
|
8655
9140
|
/**
|
|
8656
9141
|
* Display-only label for the prompt as shown in the UI (e.g. `/skill-name` for a skill-invocation schedule). The actual enqueued prompt is `prompt`.
|
|
8657
9142
|
*/
|
|
@@ -8862,6 +9347,10 @@ export interface ServerSkill {
|
|
|
8862
9347
|
* The project path this skill belongs to (only for project/inherited skills)
|
|
8863
9348
|
*/
|
|
8864
9349
|
projectPath?: string;
|
|
9350
|
+
/**
|
|
9351
|
+
* Optional freeform hint describing the skill's expected arguments, from the `argument-hint` frontmatter field
|
|
9352
|
+
*/
|
|
9353
|
+
argumentHint?: string;
|
|
8865
9354
|
}
|
|
8866
9355
|
/**
|
|
8867
9356
|
* Skills discovered across global and project sources.
|
|
@@ -9273,7 +9762,7 @@ export interface SessionFsSqliteQueryRequest {
|
|
|
9273
9762
|
* Optional named bind parameters
|
|
9274
9763
|
*/
|
|
9275
9764
|
params?: {
|
|
9276
|
-
[k: string]:
|
|
9765
|
+
[k: string]: unknown | undefined;
|
|
9277
9766
|
};
|
|
9278
9767
|
}
|
|
9279
9768
|
/**
|
|
@@ -9642,6 +10131,7 @@ export interface SessionOpenOptions {
|
|
|
9642
10131
|
isExperimentalMode?: boolean;
|
|
9643
10132
|
authInfo?: AuthInfo;
|
|
9644
10133
|
provider?: ProviderConfig;
|
|
10134
|
+
capi?: CapiSessionOptions;
|
|
9645
10135
|
/**
|
|
9646
10136
|
* Named BYOK provider connections, additive to CAPI auth. Combining with `provider` is rejected.
|
|
9647
10137
|
*
|
|
@@ -9741,6 +10231,12 @@ export interface SessionOpenOptions {
|
|
|
9741
10231
|
* Whether model responses stream as delta events.
|
|
9742
10232
|
*/
|
|
9743
10233
|
enableStreaming?: boolean;
|
|
10234
|
+
/**
|
|
10235
|
+
* Experimental: enable native model citations (Anthropic models today), normalized onto the `assistant.message` event. Off by default; may change or be removed while the citations surface is experimental.
|
|
10236
|
+
*
|
|
10237
|
+
* @experimental
|
|
10238
|
+
*/
|
|
10239
|
+
enableCitations?: boolean;
|
|
9744
10240
|
/**
|
|
9745
10241
|
* Override URL for the Copilot API endpoint.
|
|
9746
10242
|
*/
|
|
@@ -9799,9 +10295,8 @@ export interface SessionOpenOptions {
|
|
|
9799
10295
|
/** @experimental */
|
|
9800
10296
|
export interface SessionOpenOptionsAdditionalContentExclusionPolicy {
|
|
9801
10297
|
rules: SessionOpenOptionsAdditionalContentExclusionPolicyRule[];
|
|
9802
|
-
last_updated_at:
|
|
10298
|
+
last_updated_at: unknown;
|
|
9803
10299
|
scope: SessionOpenOptionsAdditionalContentExclusionPolicyScope;
|
|
9804
|
-
[k: string]: unknown | undefined;
|
|
9805
10300
|
}
|
|
9806
10301
|
/**
|
|
9807
10302
|
* Schema for the `SessionOpenOptionsAdditionalContentExclusionPolicyRule` type.
|
|
@@ -9815,7 +10310,6 @@ export interface SessionOpenOptionsAdditionalContentExclusionPolicyRule {
|
|
|
9815
10310
|
ifAnyMatch?: string[];
|
|
9816
10311
|
ifNoneMatch?: string[];
|
|
9817
10312
|
source: SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource;
|
|
9818
|
-
[k: string]: unknown | undefined;
|
|
9819
10313
|
}
|
|
9820
10314
|
/**
|
|
9821
10315
|
* Schema for the `SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource` type.
|
|
@@ -10609,6 +11103,7 @@ export interface SessionUpdateOptionsParams {
|
|
|
10609
11103
|
*/
|
|
10610
11104
|
isExperimentalMode?: boolean;
|
|
10611
11105
|
provider?: ProviderConfig;
|
|
11106
|
+
capi?: CapiSessionOptions;
|
|
10612
11107
|
/**
|
|
10613
11108
|
* Absolute working-directory path for shell tools.
|
|
10614
11109
|
*/
|
|
@@ -10907,6 +11402,10 @@ export interface Skill {
|
|
|
10907
11402
|
* Name of the plugin that provides the skill, when source is 'plugin'
|
|
10908
11403
|
*/
|
|
10909
11404
|
pluginName?: string;
|
|
11405
|
+
/**
|
|
11406
|
+
* Optional freeform hint describing the skill's expected arguments, from the `argument-hint` frontmatter field
|
|
11407
|
+
*/
|
|
11408
|
+
argumentHint?: string;
|
|
10910
11409
|
}
|
|
10911
11410
|
/**
|
|
10912
11411
|
* Schema for the `SkillDiscoveryPath` type.
|
|
@@ -12835,6 +13334,34 @@ export declare function createServerRpc(connection: MessageConnection): {
|
|
|
12835
13334
|
* @returns Quota usage snapshots for the resolved user, keyed by quota type.
|
|
12836
13335
|
*/
|
|
12837
13336
|
getQuota: (params: AccountGetQuotaRequest) => Promise<AccountGetQuotaResult>;
|
|
13337
|
+
/**
|
|
13338
|
+
* Gets the currently active authentication credentials from the global auth manager.
|
|
13339
|
+
*
|
|
13340
|
+
* @returns Current authentication state
|
|
13341
|
+
*/
|
|
13342
|
+
getCurrentAuth: () => Promise<AccountGetCurrentAuthResult>;
|
|
13343
|
+
/**
|
|
13344
|
+
* Gets all authenticated users available for account switching.
|
|
13345
|
+
*
|
|
13346
|
+
* @returns List of all authenticated users
|
|
13347
|
+
*/
|
|
13348
|
+
getAllUsers: () => Promise<AccountGetAllUsersResult>;
|
|
13349
|
+
/**
|
|
13350
|
+
* Stores authentication credentials after successful login (e.g., device code flow).
|
|
13351
|
+
*
|
|
13352
|
+
* @param params Credentials to store after successful authentication
|
|
13353
|
+
*
|
|
13354
|
+
* @returns Result of a successful login; throws on failure
|
|
13355
|
+
*/
|
|
13356
|
+
login: (params: AccountLoginRequest) => Promise<AccountLoginResult>;
|
|
13357
|
+
/**
|
|
13358
|
+
* Removes user authentication from keychain and persisted state.
|
|
13359
|
+
*
|
|
13360
|
+
* @param params User to log out
|
|
13361
|
+
*
|
|
13362
|
+
* @returns Logout result indicating if more users remain
|
|
13363
|
+
*/
|
|
13364
|
+
logout: (params: AccountLogoutRequest) => Promise<AccountLogoutResult>;
|
|
12838
13365
|
};
|
|
12839
13366
|
secrets: {
|
|
12840
13367
|
/**
|
|
@@ -13079,6 +13606,31 @@ export declare function createServerRpc(connection: MessageConnection): {
|
|
|
13079
13606
|
setProvider: (params: SessionFsSetProviderRequest) => Promise<SessionFsSetProviderResult>;
|
|
13080
13607
|
};
|
|
13081
13608
|
/** @experimental */
|
|
13609
|
+
llmInference: {
|
|
13610
|
+
/**
|
|
13611
|
+
* Registers an SDK client as the LLM inference callback provider.
|
|
13612
|
+
*
|
|
13613
|
+
* @returns Indicates whether the calling client was registered as the LLM inference provider.
|
|
13614
|
+
*/
|
|
13615
|
+
setProvider: () => Promise<LlmInferenceSetProviderResult>;
|
|
13616
|
+
/**
|
|
13617
|
+
* Delivers the response head (status + headers) for an in-flight request, correlated by the requestId the runtime supplied in httpRequestStart. Must be called exactly once per request before any httpResponseChunk frames.
|
|
13618
|
+
*
|
|
13619
|
+
* @param params Response head.
|
|
13620
|
+
*
|
|
13621
|
+
* @returns Whether the start frame was accepted.
|
|
13622
|
+
*/
|
|
13623
|
+
httpResponseStart: (params: LlmInferenceHttpResponseStartRequest) => Promise<LlmInferenceHttpResponseStartResult>;
|
|
13624
|
+
/**
|
|
13625
|
+
* Delivers a body byte range (or a terminal transport error) for an in-flight response, correlated by requestId. Set `end` true on the last chunk. When `error` is set the response terminates with a transport-level failure and the runtime raises an APIConnectionError.
|
|
13626
|
+
*
|
|
13627
|
+
* @param params A response body chunk or terminal error.
|
|
13628
|
+
*
|
|
13629
|
+
* @returns Whether the chunk was accepted.
|
|
13630
|
+
*/
|
|
13631
|
+
httpResponseChunk: (params: LlmInferenceHttpResponseChunkRequest) => Promise<LlmInferenceHttpResponseChunkResult>;
|
|
13632
|
+
};
|
|
13633
|
+
/** @experimental */
|
|
13082
13634
|
sessions: {
|
|
13083
13635
|
/**
|
|
13084
13636
|
* Creates or resumes a local session and returns the opened session ID.
|
|
@@ -13776,10 +14328,18 @@ export declare function createSessionRpc(connection: MessageConnection, sessionI
|
|
|
13776
14328
|
isServerRunning: (params: McpIsServerRunningRequest) => Promise<McpIsServerRunningResult>;
|
|
13777
14329
|
/** @experimental */
|
|
13778
14330
|
oauth: {
|
|
14331
|
+
/**
|
|
14332
|
+
* Resolves a pending MCP OAuth request with a host-provided token or cancellation. The pending request is emitted as mcp.oauth_required with the data necessary to authorize the request.
|
|
14333
|
+
*
|
|
14334
|
+
* @param params Pending MCP OAuth request ID and host-provided token or cancellation response.
|
|
14335
|
+
*
|
|
14336
|
+
* @returns Indicates whether the pending MCP OAuth response was accepted.
|
|
14337
|
+
*/
|
|
14338
|
+
handlePendingRequest: (params: McpOauthHandlePendingRequest) => Promise<McpOauthHandlePendingResult>;
|
|
13779
14339
|
/**
|
|
13780
14340
|
* Starts OAuth authentication for a remote MCP server.
|
|
13781
14341
|
*
|
|
13782
|
-
* @param params Remote MCP server name and optional overrides controlling reauthentication, OAuth client display name,
|
|
14342
|
+
* @param params Remote MCP server name and optional overrides controlling reauthentication, OAuth client display name, callback success-page copy, and static OAuth client selection.
|
|
13783
14343
|
*
|
|
13784
14344
|
* @returns OAuth authorization URL the caller should open, or empty when cached tokens already authenticated the server.
|
|
13785
14345
|
*/
|
|
@@ -13858,6 +14418,14 @@ export declare function createSessionRpc(connection: MessageConnection, sessionI
|
|
|
13858
14418
|
* @returns A snapshot of the provider endpoint the session is currently configured to talk to.
|
|
13859
14419
|
*/
|
|
13860
14420
|
getEndpoint: (params?: ProviderGetEndpointRequest) => Promise<ProviderEndpoint>;
|
|
14421
|
+
/**
|
|
14422
|
+
* Adds BYOK providers and/or models to the session's registry at runtime, extending the additive registry built from the session's `providers`/`models` options. Both fields are optional, so a call may add providers only, models only, or both. Within a single call providers are registered before models, so a model may reference a provider added in the same call; across calls a model may reference any provider already registered (from session creation or a prior add). A model whose referenced provider is not registered by the end of the call is rejected. Newly added models become selectable via `model.list` / `model.switchTo` and are inherited by sub-agents spawned afterwards.
|
|
14423
|
+
*
|
|
14424
|
+
* @param params BYOK providers and/or models to add to the session's registry at runtime. Both fields are optional; provide providers, models, or both.
|
|
14425
|
+
*
|
|
14426
|
+
* @returns The selectable model entries synthesized for the models added by this call.
|
|
14427
|
+
*/
|
|
14428
|
+
add: (params: ProviderAddRequest) => Promise<ProviderAddResult>;
|
|
13861
14429
|
};
|
|
13862
14430
|
/** @experimental */
|
|
13863
14431
|
options: {
|
|
@@ -14492,6 +15060,18 @@ export declare function createSessionRpc(connection: MessageConnection, sessionI
|
|
|
14492
15060
|
stop: (params: ScheduleStopRequest) => Promise<ScheduleStopResult>;
|
|
14493
15061
|
};
|
|
14494
15062
|
};
|
|
15063
|
+
/** Handler for `providerToken` client session API methods. */
|
|
15064
|
+
/** @experimental */
|
|
15065
|
+
export interface ProviderTokenHandler {
|
|
15066
|
+
/**
|
|
15067
|
+
* Asks the SDK client to get a bearer token for a BYOK provider whose config set `hasBearerTokenProvider: true`. Session-scoped: the runtime calls it back on the connection that most recently supplied that provider's config for the session (the creating connection, or a resuming connection if the session was resumed — distinct providers may be owned by different connections), passing the provider name, and uses the returned token as the Authorization header for the outbound model request. The runtime does no caching — it calls this once per outbound request; the SDK consumer owns token acquisition, caching, and refresh.
|
|
15068
|
+
*
|
|
15069
|
+
* @param params Asks the SDK client to acquire a bearer token for a BYOK provider whose config set `hasBearerTokenProvider: true`. Issued by the runtime before each outbound model request; the runtime does no caching, so this is sent once per request.
|
|
15070
|
+
*
|
|
15071
|
+
* @returns A bearer token supplied by the SDK client for a BYOK provider. The runtime sets it as `Authorization: Bearer <token>` on the outbound request and does no caching; the SDK consumer owns token caching and refresh.
|
|
15072
|
+
*/
|
|
15073
|
+
getToken(params: ProviderTokenAcquireRequest): Promise<ProviderTokenAcquireResult>;
|
|
15074
|
+
}
|
|
14495
15075
|
/** Handler for `sessionFs` client session API methods. */
|
|
14496
15076
|
/** @experimental */
|
|
14497
15077
|
export interface SessionFsHandler {
|
|
@@ -14620,6 +15200,7 @@ export interface CanvasHandler {
|
|
|
14620
15200
|
}
|
|
14621
15201
|
/** All client session API handler groups. */
|
|
14622
15202
|
export interface ClientSessionApiHandlers {
|
|
15203
|
+
providerToken?: ProviderTokenHandler;
|
|
14623
15204
|
sessionFs?: SessionFsHandler;
|
|
14624
15205
|
canvas?: CanvasHandler;
|
|
14625
15206
|
}
|
|
@@ -14630,3 +15211,35 @@ export interface ClientSessionApiHandlers {
|
|
|
14630
15211
|
* function uses `getHandlers` to resolve the session's handlers.
|
|
14631
15212
|
*/
|
|
14632
15213
|
export declare function registerClientSessionApiHandlers(connection: MessageConnection, getHandlers: (sessionId: string) => ClientSessionApiHandlers): void;
|
|
15214
|
+
/** Handler for `llmInference` client global API methods. */
|
|
15215
|
+
/** @experimental */
|
|
15216
|
+
export interface LlmInferenceHandler {
|
|
15217
|
+
/**
|
|
15218
|
+
* Announces an outbound model-layer HTTP request the runtime wants the SDK client to service. Carries the request head only; the body always follows as one or more httpRequestChunk frames keyed by the same requestId, even when the body is empty (a single chunk with end=true).
|
|
15219
|
+
*
|
|
15220
|
+
* @param params The head of an outbound model-layer HTTP request.
|
|
15221
|
+
*
|
|
15222
|
+
* @returns Acknowledgement. Returning successfully simply means the SDK accepted the start frame; it does not imply the request will succeed.
|
|
15223
|
+
*/
|
|
15224
|
+
httpRequestStart(params: LlmInferenceHttpRequestStartRequest): Promise<LlmInferenceHttpRequestStartResult>;
|
|
15225
|
+
/**
|
|
15226
|
+
* Delivers a body byte range (or a cancellation signal) for a request previously announced via httpRequestStart, correlated by requestId. The runtime fires at least one chunk per request — when there is no body, a single chunk with empty data and end=true. Mid-stream the runtime may send a chunk with cancel=true to abort the request; the SDK then stops issuing httpResponseChunk frames and may emit a terminal httpResponseChunk with error set.
|
|
15227
|
+
*
|
|
15228
|
+
* @param params A request body chunk or cancellation signal.
|
|
15229
|
+
*
|
|
15230
|
+
* @returns Acknowledgement. The SDK is free to ignore the ack and treat chunk delivery as fire-and-forget.
|
|
15231
|
+
*/
|
|
15232
|
+
httpRequestChunk(params: LlmInferenceHttpRequestChunkRequest): Promise<LlmInferenceHttpRequestChunkResult>;
|
|
15233
|
+
}
|
|
15234
|
+
/** All client global API handler groups. */
|
|
15235
|
+
export interface ClientGlobalApiHandlers {
|
|
15236
|
+
llmInference?: LlmInferenceHandler;
|
|
15237
|
+
}
|
|
15238
|
+
/**
|
|
15239
|
+
* Register client global API handlers on a JSON-RPC connection.
|
|
15240
|
+
* The server calls these methods to delegate work to the client.
|
|
15241
|
+
* Unlike session-scoped client APIs, these methods carry no implicit
|
|
15242
|
+
* `sessionId` dispatch key — a single set of handlers serves the entire
|
|
15243
|
+
* connection.
|
|
15244
|
+
*/
|
|
15245
|
+
export declare function registerClientGlobalApiHandlers(connection: MessageConnection, handlers: ClientGlobalApiHandlers): void;
|