@github/copilot-sdk 1.0.3 → 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 +133 -24
- package/dist/cjs/copilotRequestHandler.js +629 -0
- package/dist/cjs/generated/rpc.js +58 -3
- 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 +134 -24
- package/dist/copilotRequestHandler.d.ts +82 -0
- package/dist/copilotRequestHandler.js +601 -0
- package/dist/generated/rpc.d.ts +872 -570
- package/dist/generated/rpc.js +57 -3
- package/dist/generated/session-events.d.ts +271 -14
- 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 +124 -2
- 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
|
*
|
|
@@ -479,6 +466,7 @@ export type InstructionSourceLocation =
|
|
|
479
466
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
480
467
|
* via the `definition` "LlmInferenceHttpRequestStartTransport".
|
|
481
468
|
*/
|
|
469
|
+
/** @experimental */
|
|
482
470
|
export type LlmInferenceHttpRequestStartTransport =
|
|
483
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. */
|
|
484
472
|
"http"
|
|
@@ -693,6 +681,18 @@ export type McpOauthPendingRequestResponse = {
|
|
|
693
681
|
} | {
|
|
694
682
|
kind: "cancelled";
|
|
695
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";
|
|
696
696
|
/**
|
|
697
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.
|
|
698
698
|
*
|
|
@@ -873,6 +873,18 @@ export type ProviderConfigWireApi =
|
|
|
873
873
|
"completions"
|
|
874
874
|
/** OpenAI Responses API wire format. */
|
|
875
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";
|
|
876
888
|
/**
|
|
877
889
|
* Allowed values for the `OptionsUpdateAdditionalContentExclusionPolicyScope` enumeration.
|
|
878
890
|
*
|
|
@@ -1061,6 +1073,18 @@ export type ProviderEndpointWireApi =
|
|
|
1061
1073
|
"completions"
|
|
1062
1074
|
/** Newer responses request shape. */
|
|
1063
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";
|
|
1064
1088
|
/**
|
|
1065
1089
|
* Schema for the `PushAttachment` type.
|
|
1066
1090
|
*
|
|
@@ -1676,7 +1700,9 @@ export type WorkspaceDiffMode =
|
|
|
1676
1700
|
/** Return staged, unstaged, and untracked working tree changes. */
|
|
1677
1701
|
"unstaged"
|
|
1678
1702
|
/** Return changes compared with the default branch. */
|
|
1679
|
-
| "branch"
|
|
1703
|
+
| "branch"
|
|
1704
|
+
/** Return the cumulative diff of files Copilot changed this session (used in non-git workspaces). */
|
|
1705
|
+
| "session";
|
|
1680
1706
|
/**
|
|
1681
1707
|
* Allowed values for the `WorkspacesWorkspaceDetailsHostType` enumeration.
|
|
1682
1708
|
*
|
|
@@ -1689,6 +1715,13 @@ export type WorkspacesWorkspaceDetailsHostType =
|
|
|
1689
1715
|
"github"
|
|
1690
1716
|
/** Workspace repository is hosted on Azure DevOps. */
|
|
1691
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[];
|
|
1692
1725
|
/**
|
|
1693
1726
|
* Parameters for aborting the current turn
|
|
1694
1727
|
*
|
|
@@ -1716,793 +1749,859 @@ export interface AbortResult {
|
|
|
1716
1749
|
*/
|
|
1717
1750
|
error?: string;
|
|
1718
1751
|
}
|
|
1719
|
-
export interface AccountGetQuotaRequest {
|
|
1720
|
-
/**
|
|
1721
|
-
* GitHub token for per-user quota lookup. When provided, resolves this token to determine the user's quota instead of using the global auth.
|
|
1722
|
-
*/
|
|
1723
|
-
gitHubToken?: string;
|
|
1724
|
-
}
|
|
1725
1752
|
/**
|
|
1726
|
-
*
|
|
1753
|
+
* Schema for the `AccountAllUsers` type.
|
|
1727
1754
|
*
|
|
1728
1755
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
1729
|
-
* via the `definition` "
|
|
1756
|
+
* via the `definition` "AccountAllUsers".
|
|
1730
1757
|
*/
|
|
1731
|
-
export interface
|
|
1758
|
+
export interface AccountAllUsers {
|
|
1759
|
+
authInfo: AuthInfo;
|
|
1732
1760
|
/**
|
|
1733
|
-
*
|
|
1761
|
+
* Associated token, if available
|
|
1734
1762
|
*/
|
|
1735
|
-
|
|
1736
|
-
[k: string]: AccountQuotaSnapshot | undefined;
|
|
1737
|
-
};
|
|
1763
|
+
token?: string;
|
|
1738
1764
|
}
|
|
1739
1765
|
/**
|
|
1740
|
-
* Schema for the `
|
|
1766
|
+
* Schema for the `HMACAuthInfo` type.
|
|
1741
1767
|
*
|
|
1742
1768
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
1743
|
-
* via the `definition` "
|
|
1769
|
+
* via the `definition` "HMACAuthInfo".
|
|
1744
1770
|
*/
|
|
1745
|
-
export interface
|
|
1746
|
-
/**
|
|
1747
|
-
* Whether the user has an unlimited usage entitlement
|
|
1748
|
-
*/
|
|
1749
|
-
isUnlimitedEntitlement: boolean;
|
|
1750
|
-
/**
|
|
1751
|
-
* Number of requests included in the entitlement, or -1 for unlimited entitlements
|
|
1752
|
-
*/
|
|
1753
|
-
entitlementRequests: number;
|
|
1754
|
-
/**
|
|
1755
|
-
* Number of requests used so far this period
|
|
1756
|
-
*/
|
|
1757
|
-
usedRequests: number;
|
|
1758
|
-
/**
|
|
1759
|
-
* Whether usage is still permitted after quota exhaustion
|
|
1760
|
-
*/
|
|
1761
|
-
usageAllowedWithExhaustedQuota: boolean;
|
|
1762
|
-
/**
|
|
1763
|
-
* Percentage of entitlement remaining
|
|
1764
|
-
*/
|
|
1765
|
-
remainingPercentage: number;
|
|
1771
|
+
export interface HMACAuthInfo {
|
|
1766
1772
|
/**
|
|
1767
|
-
*
|
|
1773
|
+
* HMAC-based authentication used by GitHub-internal services.
|
|
1768
1774
|
*/
|
|
1769
|
-
|
|
1775
|
+
type: "hmac";
|
|
1770
1776
|
/**
|
|
1771
|
-
*
|
|
1777
|
+
* Authentication host. HMAC auth always targets the public GitHub host.
|
|
1772
1778
|
*/
|
|
1773
|
-
|
|
1779
|
+
host: "https://github.com";
|
|
1774
1780
|
/**
|
|
1775
|
-
*
|
|
1781
|
+
* HMAC secret used to sign requests.
|
|
1776
1782
|
*/
|
|
1777
|
-
|
|
1783
|
+
hmac: string;
|
|
1784
|
+
copilotUser?: CopilotUserResponse;
|
|
1778
1785
|
}
|
|
1779
1786
|
/**
|
|
1780
|
-
*
|
|
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.
|
|
1781
1788
|
*
|
|
1782
1789
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
1783
|
-
* via the `definition` "
|
|
1790
|
+
* via the `definition` "CopilotUserResponse".
|
|
1784
1791
|
*/
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
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;
|
|
1800
1835
|
}
|
|
1801
1836
|
/**
|
|
1802
|
-
*
|
|
1837
|
+
* Schema for the `CopilotUserResponseEndpoints` type.
|
|
1803
1838
|
*
|
|
1804
1839
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
1805
|
-
* via the `definition` "
|
|
1840
|
+
* via the `definition` "CopilotUserResponseEndpoints".
|
|
1806
1841
|
*/
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
paths: AgentDiscoveryPath[];
|
|
1842
|
+
export interface CopilotUserResponseEndpoints {
|
|
1843
|
+
api?: string;
|
|
1844
|
+
"origin-tracker"?: string;
|
|
1845
|
+
proxy?: string;
|
|
1846
|
+
telemetry?: string;
|
|
1813
1847
|
}
|
|
1814
1848
|
/**
|
|
1815
|
-
*
|
|
1849
|
+
* Schema for the `CopilotUserResponseQuotaSnapshots` type.
|
|
1816
1850
|
*
|
|
1817
1851
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
1818
|
-
* via the `definition` "
|
|
1852
|
+
* via the `definition` "CopilotUserResponseQuotaSnapshots".
|
|
1819
1853
|
*/
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
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;
|
|
1826
1872
|
}
|
|
1827
1873
|
/**
|
|
1828
|
-
* Schema for the `
|
|
1874
|
+
* Schema for the `CopilotUserResponseQuotaSnapshotsChat` type.
|
|
1829
1875
|
*
|
|
1830
1876
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
1831
|
-
* via the `definition` "
|
|
1877
|
+
* via the `definition` "CopilotUserResponseQuotaSnapshotsChat".
|
|
1832
1878
|
*/
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
*/
|
|
1850
|
-
path?: string;
|
|
1851
|
-
/**
|
|
1852
|
-
* 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.
|
|
1853
|
-
*/
|
|
1854
|
-
id: string;
|
|
1855
|
-
source?: AgentInfoSource;
|
|
1856
|
-
/**
|
|
1857
|
-
* Whether the agent can be selected directly by the user. Agents marked `false` are subagent-only.
|
|
1858
|
-
*/
|
|
1859
|
-
userInvocable?: boolean;
|
|
1860
|
-
/**
|
|
1861
|
-
* Allowed tool names for this agent. Empty array means none; omitted means inherit defaults.
|
|
1862
|
-
*/
|
|
1863
|
-
tools?: string[];
|
|
1864
|
-
/**
|
|
1865
|
-
* Preferred model id for this agent. When omitted, inherits the outer agent's model.
|
|
1866
|
-
*/
|
|
1867
|
-
model?: string;
|
|
1868
|
-
/**
|
|
1869
|
-
* MCP server configurations attached to this agent, keyed by server name. Server config shape mirrors the MCP `mcpServers` schema.
|
|
1870
|
-
*
|
|
1871
|
-
* @experimental
|
|
1872
|
-
*/
|
|
1873
|
-
mcpServers?: {
|
|
1874
|
-
[k: string]: unknown | undefined;
|
|
1875
|
-
};
|
|
1876
|
-
/**
|
|
1877
|
-
* Skill names preloaded into this agent's context. Omitted means none.
|
|
1878
|
-
*/
|
|
1879
|
-
skills?: string[];
|
|
1880
|
-
}
|
|
1881
|
-
/**
|
|
1882
|
-
* Custom agents available to the session.
|
|
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;
|
|
1892
|
+
}
|
|
1893
|
+
/**
|
|
1894
|
+
* Schema for the `CopilotUserResponseQuotaSnapshotsCompletions` type.
|
|
1883
1895
|
*
|
|
1884
1896
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
1885
|
-
* via the `definition` "
|
|
1897
|
+
* via the `definition` "CopilotUserResponseQuotaSnapshotsCompletions".
|
|
1886
1898
|
*/
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
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;
|
|
1893
1912
|
}
|
|
1894
1913
|
/**
|
|
1895
|
-
*
|
|
1914
|
+
* Schema for the `CopilotUserResponseQuotaSnapshotsPremiumInteractions` type.
|
|
1896
1915
|
*
|
|
1897
1916
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
1898
|
-
* via the `definition` "
|
|
1917
|
+
* via the `definition` "CopilotUserResponseQuotaSnapshotsPremiumInteractions".
|
|
1899
1918
|
*/
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
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 {
|
|
1907
1940
|
/**
|
|
1908
|
-
*
|
|
1941
|
+
* Personal access token (PAT) or server-to-server token sourced from an environment variable.
|
|
1909
1942
|
*/
|
|
1910
|
-
|
|
1943
|
+
type: "env";
|
|
1911
1944
|
/**
|
|
1912
|
-
*
|
|
1945
|
+
* Authentication host (e.g. https://github.com or a GHES host).
|
|
1913
1946
|
*/
|
|
1914
1947
|
host: string;
|
|
1915
1948
|
/**
|
|
1916
|
-
*
|
|
1917
|
-
*/
|
|
1918
|
-
port: number;
|
|
1919
|
-
/**
|
|
1920
|
-
* Session ID of the foreground session for this entry
|
|
1921
|
-
*/
|
|
1922
|
-
sessionId?: string;
|
|
1923
|
-
/**
|
|
1924
|
-
* Friendly session name (when set)
|
|
1925
|
-
*/
|
|
1926
|
-
sessionName?: string;
|
|
1927
|
-
/**
|
|
1928
|
-
* Working directory of the session (when known)
|
|
1929
|
-
*/
|
|
1930
|
-
cwd?: string;
|
|
1931
|
-
/**
|
|
1932
|
-
* Git branch of the session (when known)
|
|
1933
|
-
*/
|
|
1934
|
-
branch?: string;
|
|
1935
|
-
/**
|
|
1936
|
-
* Model identifier currently selected for the session
|
|
1937
|
-
*/
|
|
1938
|
-
model?: string;
|
|
1939
|
-
status?: AgentRegistryLiveTargetEntryStatus;
|
|
1940
|
-
attentionKind?: AgentRegistryLiveTargetEntryAttentionKind;
|
|
1941
|
-
/**
|
|
1942
|
-
* Monotonic per-publisher revision counter incremented on every status update. Lets watchers detect transient flips.
|
|
1943
|
-
*/
|
|
1944
|
-
statusRevision?: number;
|
|
1945
|
-
lastTerminalEvent?: AgentRegistryLiveTargetEntryLastTerminalEvent;
|
|
1946
|
-
/**
|
|
1947
|
-
* ISO 8601 timestamp captured at registration
|
|
1949
|
+
* User login associated with the token. Undefined for server-to-server tokens (those starting with `ghs_`).
|
|
1948
1950
|
*/
|
|
1949
|
-
|
|
1951
|
+
login?: string;
|
|
1950
1952
|
/**
|
|
1951
|
-
*
|
|
1953
|
+
* The token value itself. Treat as a secret.
|
|
1952
1954
|
*/
|
|
1953
|
-
|
|
1955
|
+
token: string;
|
|
1954
1956
|
/**
|
|
1955
|
-
*
|
|
1957
|
+
* Name of the environment variable the token was sourced from.
|
|
1956
1958
|
*/
|
|
1957
|
-
|
|
1959
|
+
envVar: string;
|
|
1960
|
+
copilotUser?: CopilotUserResponse;
|
|
1958
1961
|
}
|
|
1959
1962
|
/**
|
|
1960
|
-
*
|
|
1963
|
+
* Schema for the `TokenAuthInfo` type.
|
|
1961
1964
|
*
|
|
1962
1965
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
1963
|
-
* via the `definition` "
|
|
1966
|
+
* via the `definition` "TokenAuthInfo".
|
|
1964
1967
|
*/
|
|
1965
|
-
|
|
1966
|
-
export interface AgentRegistryLogCapture {
|
|
1968
|
+
export interface TokenAuthInfo {
|
|
1967
1969
|
/**
|
|
1968
|
-
*
|
|
1970
|
+
* SDK-side token authentication; the host configured the token directly via the SDK.
|
|
1969
1971
|
*/
|
|
1970
|
-
|
|
1972
|
+
type: "token";
|
|
1971
1973
|
/**
|
|
1972
|
-
*
|
|
1974
|
+
* Authentication host.
|
|
1973
1975
|
*/
|
|
1974
|
-
|
|
1976
|
+
host: string;
|
|
1975
1977
|
/**
|
|
1976
|
-
*
|
|
1978
|
+
* The token value itself. Treat as a secret.
|
|
1977
1979
|
*/
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
+
token: string;
|
|
1981
|
+
copilotUser?: CopilotUserResponse;
|
|
1980
1982
|
}
|
|
1981
1983
|
/**
|
|
1982
|
-
*
|
|
1984
|
+
* Schema for the `CopilotApiTokenAuthInfo` type.
|
|
1983
1985
|
*
|
|
1984
1986
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
1985
|
-
* via the `definition` "
|
|
1987
|
+
* via the `definition` "CopilotApiTokenAuthInfo".
|
|
1986
1988
|
*/
|
|
1987
|
-
|
|
1988
|
-
export interface AgentRegistrySpawnError {
|
|
1989
|
-
/**
|
|
1990
|
-
* Discriminator: child_process.spawn itself failed
|
|
1991
|
-
*/
|
|
1992
|
-
kind: "spawn-error";
|
|
1989
|
+
export interface CopilotApiTokenAuthInfo {
|
|
1993
1990
|
/**
|
|
1994
|
-
*
|
|
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.
|
|
1995
1992
|
*/
|
|
1996
|
-
|
|
1993
|
+
type: "copilot-api-token";
|
|
1997
1994
|
/**
|
|
1998
|
-
*
|
|
1995
|
+
* Authentication host (always the public GitHub host).
|
|
1999
1996
|
*/
|
|
2000
|
-
|
|
1997
|
+
host: "https://github.com";
|
|
1998
|
+
copilotUser?: CopilotUserResponse;
|
|
2001
1999
|
}
|
|
2002
2000
|
/**
|
|
2003
|
-
*
|
|
2001
|
+
* Schema for the `UserAuthInfo` type.
|
|
2004
2002
|
*
|
|
2005
2003
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
2006
|
-
* via the `definition` "
|
|
2004
|
+
* via the `definition` "UserAuthInfo".
|
|
2007
2005
|
*/
|
|
2008
|
-
|
|
2009
|
-
export interface AgentRegistrySpawnRegistryTimeout {
|
|
2006
|
+
export interface UserAuthInfo {
|
|
2010
2007
|
/**
|
|
2011
|
-
*
|
|
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.
|
|
2012
2009
|
*/
|
|
2013
|
-
|
|
2010
|
+
type: "user";
|
|
2014
2011
|
/**
|
|
2015
|
-
*
|
|
2012
|
+
* Authentication host.
|
|
2016
2013
|
*/
|
|
2017
|
-
|
|
2018
|
-
|
|
2014
|
+
host: string;
|
|
2015
|
+
/**
|
|
2016
|
+
* OAuth user login.
|
|
2017
|
+
*/
|
|
2018
|
+
login: string;
|
|
2019
|
+
copilotUser?: CopilotUserResponse;
|
|
2019
2020
|
}
|
|
2020
2021
|
/**
|
|
2021
|
-
*
|
|
2022
|
+
* Schema for the `GhCliAuthInfo` type.
|
|
2022
2023
|
*
|
|
2023
2024
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
2024
|
-
* via the `definition` "
|
|
2025
|
+
* via the `definition` "GhCliAuthInfo".
|
|
2025
2026
|
*/
|
|
2026
|
-
|
|
2027
|
-
export interface AgentRegistrySpawnRequest {
|
|
2028
|
-
/**
|
|
2029
|
-
* Working directory for the spawned child (must be an existing directory)
|
|
2030
|
-
*/
|
|
2031
|
-
cwd: string;
|
|
2027
|
+
export interface GhCliAuthInfo {
|
|
2032
2028
|
/**
|
|
2033
|
-
*
|
|
2029
|
+
* Authentication via the `gh` CLI's saved credentials.
|
|
2034
2030
|
*/
|
|
2035
|
-
|
|
2031
|
+
type: "gh-cli";
|
|
2036
2032
|
/**
|
|
2037
|
-
*
|
|
2033
|
+
* Authentication host.
|
|
2038
2034
|
*/
|
|
2039
|
-
|
|
2035
|
+
host: string;
|
|
2040
2036
|
/**
|
|
2041
|
-
*
|
|
2037
|
+
* User login as reported by `gh auth status`.
|
|
2042
2038
|
*/
|
|
2043
|
-
|
|
2044
|
-
permissionMode?: AgentRegistrySpawnPermissionMode;
|
|
2039
|
+
login: string;
|
|
2045
2040
|
/**
|
|
2046
|
-
*
|
|
2041
|
+
* The token returned by `gh auth token`. Treat as a secret.
|
|
2047
2042
|
*/
|
|
2048
|
-
|
|
2043
|
+
token: string;
|
|
2044
|
+
copilotUser?: CopilotUserResponse;
|
|
2049
2045
|
}
|
|
2050
2046
|
/**
|
|
2051
|
-
*
|
|
2047
|
+
* Schema for the `ApiKeyAuthInfo` type.
|
|
2052
2048
|
*
|
|
2053
2049
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
2054
|
-
* via the `definition` "
|
|
2050
|
+
* via the `definition` "ApiKeyAuthInfo".
|
|
2055
2051
|
*/
|
|
2056
|
-
|
|
2057
|
-
export interface AgentRegistrySpawnSpawned {
|
|
2052
|
+
export interface ApiKeyAuthInfo {
|
|
2058
2053
|
/**
|
|
2059
|
-
*
|
|
2054
|
+
* API-key authentication for non-GitHub LLM providers (e.g. when running BYOM-style).
|
|
2060
2055
|
*/
|
|
2061
|
-
|
|
2062
|
-
entry: AgentRegistryLiveTargetEntry;
|
|
2056
|
+
type: "api-key";
|
|
2063
2057
|
/**
|
|
2064
|
-
*
|
|
2058
|
+
* The API key. Treat as a secret.
|
|
2065
2059
|
*/
|
|
2066
|
-
|
|
2060
|
+
apiKey: string;
|
|
2067
2061
|
/**
|
|
2068
|
-
*
|
|
2062
|
+
* Authentication host.
|
|
2069
2063
|
*/
|
|
2070
|
-
|
|
2071
|
-
|
|
2064
|
+
host: string;
|
|
2065
|
+
copilotUser?: CopilotUserResponse;
|
|
2072
2066
|
}
|
|
2073
2067
|
/**
|
|
2074
|
-
*
|
|
2068
|
+
* Current authentication state
|
|
2075
2069
|
*
|
|
2076
2070
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
2077
|
-
* via the `definition` "
|
|
2071
|
+
* via the `definition` "AccountGetCurrentAuthResult".
|
|
2078
2072
|
*/
|
|
2079
|
-
|
|
2080
|
-
|
|
2073
|
+
export interface AccountGetCurrentAuthResult {
|
|
2074
|
+
authInfo?: AuthInfo;
|
|
2081
2075
|
/**
|
|
2082
|
-
*
|
|
2076
|
+
* Authentication errors from the last auth attempt, if any
|
|
2083
2077
|
*/
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2078
|
+
authErrors?: string[];
|
|
2079
|
+
}
|
|
2080
|
+
export interface AccountGetQuotaRequest {
|
|
2087
2081
|
/**
|
|
2088
|
-
*
|
|
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.
|
|
2089
2083
|
*/
|
|
2090
|
-
|
|
2084
|
+
gitHubToken?: string;
|
|
2091
2085
|
}
|
|
2092
2086
|
/**
|
|
2093
|
-
*
|
|
2087
|
+
* Quota usage snapshots for the resolved user, keyed by quota type.
|
|
2094
2088
|
*
|
|
2095
2089
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
2096
|
-
* via the `definition` "
|
|
2090
|
+
* via the `definition` "AccountGetQuotaResult".
|
|
2097
2091
|
*/
|
|
2098
|
-
|
|
2099
|
-
export interface AgentReloadResult {
|
|
2092
|
+
export interface AccountGetQuotaResult {
|
|
2100
2093
|
/**
|
|
2101
|
-
*
|
|
2094
|
+
* Quota snapshots keyed by type (e.g., chat, completions, premium_interactions)
|
|
2102
2095
|
*/
|
|
2103
|
-
|
|
2096
|
+
quotaSnapshots: {
|
|
2097
|
+
[k: string]: AccountQuotaSnapshot | undefined;
|
|
2098
|
+
};
|
|
2104
2099
|
}
|
|
2105
2100
|
/**
|
|
2106
|
-
*
|
|
2101
|
+
* Schema for the `AccountQuotaSnapshot` type.
|
|
2107
2102
|
*
|
|
2108
2103
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
2109
|
-
* via the `definition` "
|
|
2104
|
+
* via the `definition` "AccountQuotaSnapshot".
|
|
2110
2105
|
*/
|
|
2111
|
-
|
|
2112
|
-
export interface AgentsDiscoverRequest {
|
|
2106
|
+
export interface AccountQuotaSnapshot {
|
|
2113
2107
|
/**
|
|
2114
|
-
*
|
|
2108
|
+
* Whether the user has an unlimited usage entitlement
|
|
2115
2109
|
*/
|
|
2116
|
-
|
|
2110
|
+
isUnlimitedEntitlement: boolean;
|
|
2117
2111
|
/**
|
|
2118
|
-
*
|
|
2112
|
+
* Number of requests included in the entitlement, or -1 for unlimited entitlements
|
|
2119
2113
|
*/
|
|
2120
|
-
|
|
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;
|
|
2121
2139
|
}
|
|
2122
2140
|
/**
|
|
2123
|
-
*
|
|
2141
|
+
* Credentials to store after successful authentication
|
|
2124
2142
|
*
|
|
2125
2143
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
2126
|
-
* via the `definition` "
|
|
2144
|
+
* via the `definition` "AccountLoginRequest".
|
|
2127
2145
|
*/
|
|
2128
|
-
|
|
2129
|
-
export interface AgentSelectRequest {
|
|
2146
|
+
export interface AccountLoginRequest {
|
|
2130
2147
|
/**
|
|
2131
|
-
*
|
|
2148
|
+
* GitHub host URL
|
|
2132
2149
|
*/
|
|
2133
|
-
|
|
2150
|
+
host: string;
|
|
2151
|
+
/**
|
|
2152
|
+
* User login/username
|
|
2153
|
+
*/
|
|
2154
|
+
login: string;
|
|
2155
|
+
/**
|
|
2156
|
+
* GitHub authentication token
|
|
2157
|
+
*/
|
|
2158
|
+
token: string;
|
|
2134
2159
|
}
|
|
2135
2160
|
/**
|
|
2136
|
-
*
|
|
2161
|
+
* Result of a successful login; throws on failure
|
|
2137
2162
|
*
|
|
2138
2163
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
2139
|
-
* via the `definition` "
|
|
2164
|
+
* via the `definition` "AccountLoginResult".
|
|
2140
2165
|
*/
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
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;
|
|
2144
2171
|
}
|
|
2145
2172
|
/**
|
|
2146
|
-
*
|
|
2173
|
+
* User to log out
|
|
2147
2174
|
*
|
|
2148
2175
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
2149
|
-
* via the `definition` "
|
|
2176
|
+
* via the `definition` "AccountLogoutRequest".
|
|
2150
2177
|
*/
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
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 {
|
|
2157
2188
|
/**
|
|
2158
|
-
*
|
|
2189
|
+
* Whether other authenticated users remain after logout
|
|
2159
2190
|
*/
|
|
2160
|
-
|
|
2191
|
+
hasMoreUsers: boolean;
|
|
2161
2192
|
}
|
|
2162
2193
|
/**
|
|
2163
|
-
*
|
|
2194
|
+
* Schema for the `AgentDiscoveryPath` type.
|
|
2164
2195
|
*
|
|
2165
2196
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
2166
|
-
* via the `definition` "
|
|
2197
|
+
* via the `definition` "AgentDiscoveryPath".
|
|
2167
2198
|
*/
|
|
2168
2199
|
/** @experimental */
|
|
2169
|
-
export interface
|
|
2200
|
+
export interface AgentDiscoveryPath {
|
|
2170
2201
|
/**
|
|
2171
|
-
*
|
|
2202
|
+
* Absolute path of the search/create directory (may not exist on disk yet)
|
|
2172
2203
|
*/
|
|
2173
|
-
|
|
2204
|
+
path: string;
|
|
2205
|
+
scope: AgentDiscoveryPathScope;
|
|
2174
2206
|
/**
|
|
2175
|
-
*
|
|
2207
|
+
* Whether this is the canonical directory to create a new agent in its tier. At most one entry per tier is preferred.
|
|
2176
2208
|
*/
|
|
2177
|
-
|
|
2209
|
+
preferredForCreation: boolean;
|
|
2210
|
+
/**
|
|
2211
|
+
* The input project path this directory was derived from (only for project scope)
|
|
2212
|
+
*/
|
|
2213
|
+
projectPath?: string;
|
|
2178
2214
|
}
|
|
2179
2215
|
/**
|
|
2180
|
-
*
|
|
2216
|
+
* Canonical locations where custom agents can be created so the runtime will recognize them.
|
|
2181
2217
|
*
|
|
2182
2218
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
2183
|
-
* via the `definition` "
|
|
2219
|
+
* via the `definition` "AgentDiscoveryPathList".
|
|
2184
2220
|
*/
|
|
2185
2221
|
/** @experimental */
|
|
2186
|
-
export interface
|
|
2222
|
+
export interface AgentDiscoveryPathList {
|
|
2187
2223
|
/**
|
|
2188
|
-
*
|
|
2224
|
+
* Canonical agent create/discovery directories, in priority order
|
|
2189
2225
|
*/
|
|
2190
|
-
|
|
2226
|
+
paths: AgentDiscoveryPath[];
|
|
2191
2227
|
}
|
|
2192
2228
|
/**
|
|
2193
|
-
*
|
|
2229
|
+
* The currently selected custom agent, or null when using the default agent.
|
|
2194
2230
|
*
|
|
2195
2231
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
2196
|
-
* via the `definition` "
|
|
2232
|
+
* via the `definition` "AgentGetCurrentResult".
|
|
2197
2233
|
*/
|
|
2198
2234
|
/** @experimental */
|
|
2199
|
-
export interface
|
|
2200
|
-
/**
|
|
2201
|
-
* API-key authentication for non-GitHub LLM providers (e.g. when running BYOM-style).
|
|
2202
|
-
*/
|
|
2203
|
-
type: "api-key";
|
|
2204
|
-
/**
|
|
2205
|
-
* The API key. Treat as a secret.
|
|
2206
|
-
*/
|
|
2207
|
-
apiKey: string;
|
|
2235
|
+
export interface AgentGetCurrentResult {
|
|
2208
2236
|
/**
|
|
2209
|
-
*
|
|
2237
|
+
* Currently selected custom agent, or null if using the default agent
|
|
2210
2238
|
*/
|
|
2211
|
-
|
|
2212
|
-
copilotUser?: CopilotUserResponse;
|
|
2239
|
+
agent?: AgentInfo | null;
|
|
2213
2240
|
}
|
|
2214
2241
|
/**
|
|
2215
|
-
*
|
|
2242
|
+
* Schema for the `AgentInfo` type.
|
|
2216
2243
|
*
|
|
2217
2244
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
2218
|
-
* via the `definition` "
|
|
2245
|
+
* via the `definition` "AgentInfo".
|
|
2219
2246
|
*/
|
|
2220
2247
|
/** @experimental */
|
|
2221
|
-
export interface
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
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?: {
|
|
2246
2288
|
[k: string]: unknown | undefined;
|
|
2247
|
-
} | boolean) | null;
|
|
2248
|
-
quota_reset_date?: string;
|
|
2249
|
-
quota_snapshots?: CopilotUserResponseQuotaSnapshots;
|
|
2250
|
-
restricted_telemetry?: boolean;
|
|
2251
|
-
is_staff?: boolean;
|
|
2252
|
-
token_based_billing?: boolean;
|
|
2253
|
-
can_upgrade_plan?: boolean;
|
|
2254
|
-
quota_reset_date_utc?: string;
|
|
2255
|
-
limited_user_quotas?: {
|
|
2256
|
-
[k: string]: number | undefined;
|
|
2257
|
-
};
|
|
2258
|
-
limited_user_reset_date?: string;
|
|
2259
|
-
monthly_quotas?: {
|
|
2260
|
-
[k: string]: number | undefined;
|
|
2261
2289
|
};
|
|
2262
|
-
|
|
2263
|
-
|
|
2290
|
+
/**
|
|
2291
|
+
* Skill names preloaded into this agent's context. Omitted means none.
|
|
2292
|
+
*/
|
|
2293
|
+
skills?: string[];
|
|
2264
2294
|
}
|
|
2265
2295
|
/**
|
|
2266
|
-
*
|
|
2296
|
+
* Custom agents available to the session.
|
|
2267
2297
|
*
|
|
2268
2298
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
2269
|
-
* via the `definition` "
|
|
2299
|
+
* via the `definition` "AgentList".
|
|
2270
2300
|
*/
|
|
2271
2301
|
/** @experimental */
|
|
2272
|
-
export interface
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2302
|
+
export interface AgentList {
|
|
2303
|
+
/**
|
|
2304
|
+
* Available custom agents
|
|
2305
|
+
*/
|
|
2306
|
+
agents: AgentInfo[];
|
|
2277
2307
|
}
|
|
2278
2308
|
/**
|
|
2279
|
-
*
|
|
2309
|
+
* Full registry entry for the spawned child. Lets the controller call `handleLiveTargetSelected(entry)` directly without re-reading the registry (avoids a TOCTOU window).
|
|
2280
2310
|
*
|
|
2281
2311
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
2282
|
-
* via the `definition` "
|
|
2312
|
+
* via the `definition` "AgentRegistryLiveTargetEntry".
|
|
2283
2313
|
*/
|
|
2284
2314
|
/** @experimental */
|
|
2285
|
-
export interface
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
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;
|
|
2303
2372
|
}
|
|
2304
2373
|
/**
|
|
2305
|
-
*
|
|
2374
|
+
* Per-spawn log-capture outcome; populated from spawnLiveTarget.
|
|
2306
2375
|
*
|
|
2307
2376
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
2308
|
-
* via the `definition` "
|
|
2377
|
+
* via the `definition` "AgentRegistryLogCapture".
|
|
2309
2378
|
*/
|
|
2310
2379
|
/** @experimental */
|
|
2311
|
-
export interface
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
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;
|
|
2324
2394
|
}
|
|
2325
2395
|
/**
|
|
2326
|
-
*
|
|
2396
|
+
* `child_process.spawn` itself failed before the child entered the registry.
|
|
2327
2397
|
*
|
|
2328
2398
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
2329
|
-
* via the `definition` "
|
|
2399
|
+
* via the `definition` "AgentRegistrySpawnError".
|
|
2330
2400
|
*/
|
|
2331
2401
|
/** @experimental */
|
|
2332
|
-
export interface
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
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;
|
|
2345
2415
|
}
|
|
2346
2416
|
/**
|
|
2347
|
-
*
|
|
2417
|
+
* Spawn succeeded but the child did not publish a matching managed-server entry within the timeout.
|
|
2348
2418
|
*
|
|
2349
2419
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
2350
|
-
* via the `definition` "
|
|
2420
|
+
* via the `definition` "AgentRegistrySpawnRegistryTimeout".
|
|
2351
2421
|
*/
|
|
2352
2422
|
/** @experimental */
|
|
2353
|
-
export interface
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
has_quota?: boolean;
|
|
2364
|
-
quota_reset_at?: number;
|
|
2365
|
-
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;
|
|
2366
2433
|
}
|
|
2367
2434
|
/**
|
|
2368
|
-
*
|
|
2435
|
+
* Inputs to spawn a managed-server child via the controller's spawn delegate.
|
|
2369
2436
|
*
|
|
2370
2437
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
2371
|
-
* via the `definition` "
|
|
2438
|
+
* via the `definition` "AgentRegistrySpawnRequest".
|
|
2372
2439
|
*/
|
|
2373
2440
|
/** @experimental */
|
|
2374
|
-
export interface
|
|
2441
|
+
export interface AgentRegistrySpawnRequest {
|
|
2375
2442
|
/**
|
|
2376
|
-
*
|
|
2443
|
+
* Working directory for the spawned child (must be an existing directory)
|
|
2377
2444
|
*/
|
|
2378
|
-
|
|
2445
|
+
cwd: string;
|
|
2379
2446
|
/**
|
|
2380
|
-
*
|
|
2447
|
+
* Custom or built-in agent name (e.g. 'explore'). When omitted, the child uses its own default.
|
|
2381
2448
|
*/
|
|
2382
|
-
|
|
2449
|
+
agentName?: string;
|
|
2383
2450
|
/**
|
|
2384
|
-
*
|
|
2451
|
+
* Model identifier to apply to the new session
|
|
2385
2452
|
*/
|
|
2386
|
-
|
|
2387
|
-
|
|
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;
|
|
2388
2463
|
}
|
|
2389
2464
|
/**
|
|
2390
|
-
*
|
|
2465
|
+
* Managed-server child was spawned and registered successfully.
|
|
2391
2466
|
*
|
|
2392
2467
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
2393
|
-
* via the `definition` "
|
|
2468
|
+
* via the `definition` "AgentRegistrySpawnSpawned".
|
|
2394
2469
|
*/
|
|
2395
2470
|
/** @experimental */
|
|
2396
|
-
export interface
|
|
2471
|
+
export interface AgentRegistrySpawnSpawned {
|
|
2397
2472
|
/**
|
|
2398
|
-
*
|
|
2473
|
+
* Discriminator: managed-server child spawned successfully
|
|
2399
2474
|
*/
|
|
2400
|
-
|
|
2475
|
+
kind: "spawned";
|
|
2476
|
+
entry: AgentRegistryLiveTargetEntry;
|
|
2401
2477
|
/**
|
|
2402
|
-
*
|
|
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.
|
|
2403
2479
|
*/
|
|
2404
|
-
|
|
2480
|
+
initialPromptSent?: boolean;
|
|
2405
2481
|
/**
|
|
2406
|
-
*
|
|
2482
|
+
* If the delegate attempted to send the initial prompt and failed, the categorized error message.
|
|
2407
2483
|
*/
|
|
2408
|
-
|
|
2484
|
+
initialPromptError?: string;
|
|
2485
|
+
logCapture?: AgentRegistryLogCapture;
|
|
2486
|
+
}
|
|
2487
|
+
/**
|
|
2488
|
+
* Synchronous pre-validation rejected the spawn request.
|
|
2489
|
+
*
|
|
2490
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
2491
|
+
* via the `definition` "AgentRegistrySpawnValidationError".
|
|
2492
|
+
*/
|
|
2493
|
+
/** @experimental */
|
|
2494
|
+
export interface AgentRegistrySpawnValidationError {
|
|
2409
2495
|
/**
|
|
2410
|
-
*
|
|
2496
|
+
* Discriminator: synchronous pre-validation rejected the request
|
|
2411
2497
|
*/
|
|
2412
|
-
|
|
2498
|
+
kind: "validation-error";
|
|
2499
|
+
reason: AgentRegistrySpawnValidationErrorReason;
|
|
2500
|
+
field?: AgentRegistrySpawnValidationErrorField;
|
|
2413
2501
|
/**
|
|
2414
|
-
*
|
|
2502
|
+
* Human-readable explanation; safe to surface in the UI banner. Never logged to unrestricted telemetry.
|
|
2415
2503
|
*/
|
|
2416
|
-
|
|
2417
|
-
copilotUser?: CopilotUserResponse;
|
|
2504
|
+
message: string;
|
|
2418
2505
|
}
|
|
2419
2506
|
/**
|
|
2420
|
-
*
|
|
2507
|
+
* Custom agents available to the session after reloading definitions from disk.
|
|
2421
2508
|
*
|
|
2422
2509
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
2423
|
-
* via the `definition` "
|
|
2510
|
+
* via the `definition` "AgentReloadResult".
|
|
2424
2511
|
*/
|
|
2425
2512
|
/** @experimental */
|
|
2426
|
-
export interface
|
|
2513
|
+
export interface AgentReloadResult {
|
|
2427
2514
|
/**
|
|
2428
|
-
*
|
|
2515
|
+
* Reloaded custom agents
|
|
2429
2516
|
*/
|
|
2430
|
-
|
|
2517
|
+
agents: AgentInfo[];
|
|
2518
|
+
}
|
|
2519
|
+
/**
|
|
2520
|
+
* Optional project paths to include in agent discovery.
|
|
2521
|
+
*
|
|
2522
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
2523
|
+
* via the `definition` "AgentsDiscoverRequest".
|
|
2524
|
+
*/
|
|
2525
|
+
/** @experimental */
|
|
2526
|
+
export interface AgentsDiscoverRequest {
|
|
2431
2527
|
/**
|
|
2432
|
-
*
|
|
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).
|
|
2433
2529
|
*/
|
|
2434
|
-
|
|
2530
|
+
projectPaths?: string[];
|
|
2531
|
+
/**
|
|
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.
|
|
2533
|
+
*/
|
|
2534
|
+
excludeHostAgents?: boolean;
|
|
2535
|
+
}
|
|
2536
|
+
/**
|
|
2537
|
+
* Name of the custom agent to select for subsequent turns.
|
|
2538
|
+
*
|
|
2539
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
2540
|
+
* via the `definition` "AgentSelectRequest".
|
|
2541
|
+
*/
|
|
2542
|
+
/** @experimental */
|
|
2543
|
+
export interface AgentSelectRequest {
|
|
2435
2544
|
/**
|
|
2436
|
-
*
|
|
2545
|
+
* Name of the custom agent to select
|
|
2437
2546
|
*/
|
|
2438
|
-
|
|
2439
|
-
copilotUser?: CopilotUserResponse;
|
|
2547
|
+
name: string;
|
|
2440
2548
|
}
|
|
2441
2549
|
/**
|
|
2442
|
-
*
|
|
2550
|
+
* The newly selected custom agent.
|
|
2443
2551
|
*
|
|
2444
2552
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
2445
|
-
* via the `definition` "
|
|
2553
|
+
* via the `definition` "AgentSelectResult".
|
|
2446
2554
|
*/
|
|
2447
2555
|
/** @experimental */
|
|
2448
|
-
export interface
|
|
2449
|
-
|
|
2450
|
-
* 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.
|
|
2451
|
-
*/
|
|
2452
|
-
type: "copilot-api-token";
|
|
2453
|
-
/**
|
|
2454
|
-
* Authentication host (always the public GitHub host).
|
|
2455
|
-
*/
|
|
2456
|
-
host: "https://github.com";
|
|
2457
|
-
copilotUser?: CopilotUserResponse;
|
|
2556
|
+
export interface AgentSelectResult {
|
|
2557
|
+
agent: AgentInfo;
|
|
2458
2558
|
}
|
|
2459
2559
|
/**
|
|
2460
|
-
*
|
|
2560
|
+
* Optional project paths to include when enumerating agent discovery directories.
|
|
2461
2561
|
*
|
|
2462
2562
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
2463
|
-
* via the `definition` "
|
|
2563
|
+
* via the `definition` "AgentsGetDiscoveryPathsRequest".
|
|
2464
2564
|
*/
|
|
2465
2565
|
/** @experimental */
|
|
2466
|
-
export interface
|
|
2467
|
-
/**
|
|
2468
|
-
* 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.
|
|
2469
|
-
*/
|
|
2470
|
-
type: "user";
|
|
2566
|
+
export interface AgentsGetDiscoveryPathsRequest {
|
|
2471
2567
|
/**
|
|
2472
|
-
*
|
|
2568
|
+
* Optional list of project directory paths. When omitted or empty, only the user-level directory is returned.
|
|
2473
2569
|
*/
|
|
2474
|
-
|
|
2570
|
+
projectPaths?: string[];
|
|
2475
2571
|
/**
|
|
2476
|
-
*
|
|
2572
|
+
* When true, omit the host's user-level agent directory, leaving only project directories. For multitenant deployments (mirrors `discover`'s `excludeHostAgents`).
|
|
2477
2573
|
*/
|
|
2478
|
-
|
|
2479
|
-
copilotUser?: CopilotUserResponse;
|
|
2574
|
+
excludeHostAgents?: boolean;
|
|
2480
2575
|
}
|
|
2481
2576
|
/**
|
|
2482
|
-
*
|
|
2577
|
+
* Indicates whether the operation succeeded and reports the post-mutation state.
|
|
2483
2578
|
*
|
|
2484
2579
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
2485
|
-
* via the `definition` "
|
|
2580
|
+
* via the `definition` "AllowAllPermissionSetResult".
|
|
2486
2581
|
*/
|
|
2487
2582
|
/** @experimental */
|
|
2488
|
-
export interface
|
|
2489
|
-
/**
|
|
2490
|
-
* Authentication via the `gh` CLI's saved credentials.
|
|
2491
|
-
*/
|
|
2492
|
-
type: "gh-cli";
|
|
2583
|
+
export interface AllowAllPermissionSetResult {
|
|
2493
2584
|
/**
|
|
2494
|
-
*
|
|
2585
|
+
* Whether the operation succeeded
|
|
2495
2586
|
*/
|
|
2496
|
-
|
|
2587
|
+
success: boolean;
|
|
2497
2588
|
/**
|
|
2498
|
-
*
|
|
2589
|
+
* Authoritative allow-all state after the mutation
|
|
2499
2590
|
*/
|
|
2500
|
-
|
|
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 {
|
|
2501
2601
|
/**
|
|
2502
|
-
*
|
|
2602
|
+
* Whether full allow-all permissions are currently active
|
|
2503
2603
|
*/
|
|
2504
|
-
|
|
2505
|
-
copilotUser?: CopilotUserResponse;
|
|
2604
|
+
enabled: boolean;
|
|
2506
2605
|
}
|
|
2507
2606
|
/**
|
|
2508
2607
|
* Cancellation result for a user-requested shell command.
|
|
@@ -2716,11 +2815,6 @@ export interface OpenCanvasInstance {
|
|
|
2716
2815
|
input?: {
|
|
2717
2816
|
[k: string]: unknown | undefined;
|
|
2718
2817
|
};
|
|
2719
|
-
/**
|
|
2720
|
-
* Whether this snapshot came from an idempotent reopen
|
|
2721
|
-
*/
|
|
2722
|
-
reopen: boolean;
|
|
2723
|
-
availability: CanvasInstanceAvailability;
|
|
2724
2818
|
}
|
|
2725
2819
|
/**
|
|
2726
2820
|
* Canvas open parameters.
|
|
@@ -2880,6 +2974,19 @@ export interface CanvasProviderOpenResult {
|
|
|
2880
2974
|
*/
|
|
2881
2975
|
status?: string;
|
|
2882
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
|
+
}
|
|
2883
2990
|
/**
|
|
2884
2991
|
* Slash commands available in the session, after applying any include/exclude filters.
|
|
2885
2992
|
*
|
|
@@ -4159,6 +4266,7 @@ export interface LlmInferenceHeaders {
|
|
|
4159
4266
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
4160
4267
|
* via the `definition` "LlmInferenceHttpRequestChunkRequest".
|
|
4161
4268
|
*/
|
|
4269
|
+
/** @experimental */
|
|
4162
4270
|
export interface LlmInferenceHttpRequestChunkRequest {
|
|
4163
4271
|
/**
|
|
4164
4272
|
* Matches the requestId from the originating httpRequestStart frame.
|
|
@@ -4191,6 +4299,7 @@ export interface LlmInferenceHttpRequestChunkRequest {
|
|
|
4191
4299
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
4192
4300
|
* via the `definition` "LlmInferenceHttpRequestChunkResult".
|
|
4193
4301
|
*/
|
|
4302
|
+
/** @experimental */
|
|
4194
4303
|
export interface LlmInferenceHttpRequestChunkResult {
|
|
4195
4304
|
}
|
|
4196
4305
|
/**
|
|
@@ -4199,6 +4308,7 @@ export interface LlmInferenceHttpRequestChunkResult {
|
|
|
4199
4308
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
4200
4309
|
* via the `definition` "LlmInferenceHttpRequestStartRequest".
|
|
4201
4310
|
*/
|
|
4311
|
+
/** @experimental */
|
|
4202
4312
|
export interface LlmInferenceHttpRequestStartRequest {
|
|
4203
4313
|
/**
|
|
4204
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.
|
|
@@ -4225,6 +4335,7 @@ export interface LlmInferenceHttpRequestStartRequest {
|
|
|
4225
4335
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
4226
4336
|
* via the `definition` "LlmInferenceHttpRequestStartResult".
|
|
4227
4337
|
*/
|
|
4338
|
+
/** @experimental */
|
|
4228
4339
|
export interface LlmInferenceHttpRequestStartResult {
|
|
4229
4340
|
}
|
|
4230
4341
|
/**
|
|
@@ -5380,7 +5491,7 @@ export interface McpOauthHandlePendingResult {
|
|
|
5380
5491
|
success: boolean;
|
|
5381
5492
|
}
|
|
5382
5493
|
/**
|
|
5383
|
-
* Remote MCP server name and optional overrides controlling reauthentication, OAuth client display name,
|
|
5494
|
+
* Remote MCP server name and optional overrides controlling reauthentication, OAuth client display name, callback success-page copy, and static OAuth client selection.
|
|
5384
5495
|
*
|
|
5385
5496
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
5386
5497
|
* via the `definition` "McpOauthLoginRequest".
|
|
@@ -5403,6 +5514,19 @@ export interface McpOauthLoginRequest {
|
|
|
5403
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.
|
|
5404
5515
|
*/
|
|
5405
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;
|
|
5406
5530
|
}
|
|
5407
5531
|
/**
|
|
5408
5532
|
* OAuth authorization URL the caller should open, or empty when cached tokens already authenticated the server.
|
|
@@ -5900,7 +6024,8 @@ export interface ModelBillingTokenPrices {
|
|
|
5900
6024
|
*/
|
|
5901
6025
|
outputPrice?: number;
|
|
5902
6026
|
/**
|
|
5903
|
-
*
|
|
6027
|
+
* @deprecated
|
|
6028
|
+
* Use cacheReadPrice instead. AI Credits cost per billing batch of cached tokens
|
|
5904
6029
|
*/
|
|
5905
6030
|
cachePrice?: number;
|
|
5906
6031
|
/**
|
|
@@ -5916,7 +6041,8 @@ export interface ModelBillingTokenPrices {
|
|
|
5916
6041
|
*/
|
|
5917
6042
|
batchSize?: number;
|
|
5918
6043
|
/**
|
|
5919
|
-
*
|
|
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.
|
|
5920
6046
|
*/
|
|
5921
6047
|
contextMax?: number;
|
|
5922
6048
|
/**
|
|
@@ -5941,7 +6067,8 @@ export interface ModelBillingTokenPricesLongContext {
|
|
|
5941
6067
|
*/
|
|
5942
6068
|
outputPrice?: number;
|
|
5943
6069
|
/**
|
|
5944
|
-
*
|
|
6070
|
+
* @deprecated
|
|
6071
|
+
* Use cacheReadPrice instead. AI Credits cost per billing batch of cached tokens
|
|
5945
6072
|
*/
|
|
5946
6073
|
cachePrice?: number;
|
|
5947
6074
|
/**
|
|
@@ -5953,7 +6080,8 @@ export interface ModelBillingTokenPricesLongContext {
|
|
|
5953
6080
|
*/
|
|
5954
6081
|
cacheWritePrice?: number;
|
|
5955
6082
|
/**
|
|
5956
|
-
*
|
|
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.
|
|
5957
6085
|
*/
|
|
5958
6086
|
contextMax?: number;
|
|
5959
6087
|
/**
|
|
@@ -6146,6 +6274,7 @@ export interface NamedProviderConfig {
|
|
|
6146
6274
|
name: string;
|
|
6147
6275
|
type?: ProviderConfigType;
|
|
6148
6276
|
wireApi?: ProviderConfigWireApi;
|
|
6277
|
+
transport?: ProviderConfigTransport;
|
|
6149
6278
|
/**
|
|
6150
6279
|
* API endpoint URL.
|
|
6151
6280
|
*/
|
|
@@ -6165,6 +6294,10 @@ export interface NamedProviderConfig {
|
|
|
6165
6294
|
headers?: {
|
|
6166
6295
|
[k: string]: string | undefined;
|
|
6167
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;
|
|
6168
6301
|
}
|
|
6169
6302
|
/**
|
|
6170
6303
|
* Azure-specific provider options.
|
|
@@ -8025,6 +8158,78 @@ export interface SessionsPollSpawnedSessionsEvent {
|
|
|
8025
8158
|
*/
|
|
8026
8159
|
sessionId: string;
|
|
8027
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
|
+
}
|
|
8028
8233
|
/**
|
|
8029
8234
|
* Custom model-provider configuration (BYOK).
|
|
8030
8235
|
*
|
|
@@ -8035,6 +8240,7 @@ export interface SessionsPollSpawnedSessionsEvent {
|
|
|
8035
8240
|
export interface ProviderConfig {
|
|
8036
8241
|
type?: ProviderConfigType;
|
|
8037
8242
|
wireApi?: ProviderConfigWireApi;
|
|
8243
|
+
transport?: ProviderConfigTransport;
|
|
8038
8244
|
/**
|
|
8039
8245
|
* API endpoint URL.
|
|
8040
8246
|
*/
|
|
@@ -8074,6 +8280,10 @@ export interface ProviderConfig {
|
|
|
8074
8280
|
headers?: {
|
|
8075
8281
|
[k: string]: string | undefined;
|
|
8076
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;
|
|
8077
8287
|
}
|
|
8078
8288
|
/**
|
|
8079
8289
|
* A snapshot of the provider endpoint the session is currently configured to talk to.
|
|
@@ -8085,6 +8295,7 @@ export interface ProviderConfig {
|
|
|
8085
8295
|
export interface ProviderEndpoint {
|
|
8086
8296
|
type: ProviderEndpointType;
|
|
8087
8297
|
wireApi?: ProviderEndpointWireApi;
|
|
8298
|
+
transport?: ProviderEndpointTransport;
|
|
8088
8299
|
/**
|
|
8089
8300
|
* Base URL to pass to the LLM client library.
|
|
8090
8301
|
*/
|
|
@@ -8140,46 +8351,34 @@ export interface ProviderGetEndpointRequest {
|
|
|
8140
8351
|
modelId?: string;
|
|
8141
8352
|
}
|
|
8142
8353
|
/**
|
|
8143
|
-
*
|
|
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.
|
|
8144
8355
|
*
|
|
8145
8356
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
8146
|
-
* via the `definition` "
|
|
8357
|
+
* via the `definition` "ProviderTokenAcquireRequest".
|
|
8147
8358
|
*/
|
|
8148
8359
|
/** @experimental */
|
|
8149
|
-
export interface
|
|
8150
|
-
/**
|
|
8151
|
-
* 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`.
|
|
8152
|
-
*/
|
|
8153
|
-
id: string;
|
|
8154
|
-
/**
|
|
8155
|
-
* Name of the NamedProviderConfig that serves this model.
|
|
8156
|
-
*/
|
|
8157
|
-
provider: string;
|
|
8158
|
-
/**
|
|
8159
|
-
* The model name sent to the provider API for inference. Defaults to `id`.
|
|
8160
|
-
*/
|
|
8161
|
-
wireModel?: string;
|
|
8162
|
-
/**
|
|
8163
|
-
* Well-known base model id used for behavior/capability/config lookup. Defaults to `id`.
|
|
8164
|
-
*/
|
|
8165
|
-
modelId?: string;
|
|
8166
|
-
/**
|
|
8167
|
-
* Display name for model pickers. Defaults to the provider-qualified selection id (`provider/id`).
|
|
8168
|
-
*/
|
|
8169
|
-
name?: string;
|
|
8360
|
+
export interface ProviderTokenAcquireRequest {
|
|
8170
8361
|
/**
|
|
8171
|
-
*
|
|
8362
|
+
* Target session identifier
|
|
8172
8363
|
*/
|
|
8173
|
-
|
|
8364
|
+
sessionId: string;
|
|
8174
8365
|
/**
|
|
8175
|
-
*
|
|
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`.
|
|
8176
8367
|
*/
|
|
8177
|
-
|
|
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 {
|
|
8178
8378
|
/**
|
|
8179
|
-
*
|
|
8379
|
+
* The bearer token value (without the `Bearer ` prefix).
|
|
8180
8380
|
*/
|
|
8181
|
-
|
|
8182
|
-
capabilities?: ModelCapabilitiesOverride;
|
|
8381
|
+
token: string;
|
|
8183
8382
|
}
|
|
8184
8383
|
/**
|
|
8185
8384
|
* File attachment
|
|
@@ -8794,12 +8993,6 @@ export interface SandboxConfig {
|
|
|
8794
8993
|
*/
|
|
8795
8994
|
enabled: boolean;
|
|
8796
8995
|
userPolicy?: SandboxConfigUserPolicy;
|
|
8797
|
-
/**
|
|
8798
|
-
* Raw `ContainerConfig` (per `@microsoft/mxc-sdk`) passed directly to `spawnSandboxFromConfig`, bypassing policy merging.
|
|
8799
|
-
*/
|
|
8800
|
-
config?: {
|
|
8801
|
-
[k: string]: unknown | undefined;
|
|
8802
|
-
};
|
|
8803
8996
|
/**
|
|
8804
8997
|
* Whether to auto-add the current working directory to readwritePaths. Default: true.
|
|
8805
8998
|
*/
|
|
@@ -8815,6 +9008,7 @@ export interface SandboxConfig {
|
|
|
8815
9008
|
export interface SandboxConfigUserPolicy {
|
|
8816
9009
|
filesystem?: SandboxConfigUserPolicyFilesystem;
|
|
8817
9010
|
network?: SandboxConfigUserPolicyNetwork;
|
|
9011
|
+
seatbelt?: SandboxConfigUserPolicySeatbelt;
|
|
8818
9012
|
experimental?: SandboxConfigUserPolicyExperimental;
|
|
8819
9013
|
}
|
|
8820
9014
|
/**
|
|
@@ -8867,6 +9061,19 @@ export interface SandboxConfigUserPolicyNetwork {
|
|
|
8867
9061
|
*/
|
|
8868
9062
|
blockedHosts?: string[];
|
|
8869
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
|
+
}
|
|
8870
9077
|
/**
|
|
8871
9078
|
* Platform-specific experimental policy fields.
|
|
8872
9079
|
*
|
|
@@ -8926,6 +9133,10 @@ export interface ScheduleEntry {
|
|
|
8926
9133
|
* Whether the schedule re-arms after each tick (`/every`) or fires once (`/after`).
|
|
8927
9134
|
*/
|
|
8928
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;
|
|
8929
9140
|
/**
|
|
8930
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`.
|
|
8931
9142
|
*/
|
|
@@ -9136,6 +9347,10 @@ export interface ServerSkill {
|
|
|
9136
9347
|
* The project path this skill belongs to (only for project/inherited skills)
|
|
9137
9348
|
*/
|
|
9138
9349
|
projectPath?: string;
|
|
9350
|
+
/**
|
|
9351
|
+
* Optional freeform hint describing the skill's expected arguments, from the `argument-hint` frontmatter field
|
|
9352
|
+
*/
|
|
9353
|
+
argumentHint?: string;
|
|
9139
9354
|
}
|
|
9140
9355
|
/**
|
|
9141
9356
|
* Skills discovered across global and project sources.
|
|
@@ -9916,6 +10131,7 @@ export interface SessionOpenOptions {
|
|
|
9916
10131
|
isExperimentalMode?: boolean;
|
|
9917
10132
|
authInfo?: AuthInfo;
|
|
9918
10133
|
provider?: ProviderConfig;
|
|
10134
|
+
capi?: CapiSessionOptions;
|
|
9919
10135
|
/**
|
|
9920
10136
|
* Named BYOK provider connections, additive to CAPI auth. Combining with `provider` is rejected.
|
|
9921
10137
|
*
|
|
@@ -10887,6 +11103,7 @@ export interface SessionUpdateOptionsParams {
|
|
|
10887
11103
|
*/
|
|
10888
11104
|
isExperimentalMode?: boolean;
|
|
10889
11105
|
provider?: ProviderConfig;
|
|
11106
|
+
capi?: CapiSessionOptions;
|
|
10890
11107
|
/**
|
|
10891
11108
|
* Absolute working-directory path for shell tools.
|
|
10892
11109
|
*/
|
|
@@ -11185,6 +11402,10 @@ export interface Skill {
|
|
|
11185
11402
|
* Name of the plugin that provides the skill, when source is 'plugin'
|
|
11186
11403
|
*/
|
|
11187
11404
|
pluginName?: string;
|
|
11405
|
+
/**
|
|
11406
|
+
* Optional freeform hint describing the skill's expected arguments, from the `argument-hint` frontmatter field
|
|
11407
|
+
*/
|
|
11408
|
+
argumentHint?: string;
|
|
11188
11409
|
}
|
|
11189
11410
|
/**
|
|
11190
11411
|
* Schema for the `SkillDiscoveryPath` type.
|
|
@@ -13113,6 +13334,34 @@ export declare function createServerRpc(connection: MessageConnection): {
|
|
|
13113
13334
|
* @returns Quota usage snapshots for the resolved user, keyed by quota type.
|
|
13114
13335
|
*/
|
|
13115
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>;
|
|
13116
13365
|
};
|
|
13117
13366
|
secrets: {
|
|
13118
13367
|
/**
|
|
@@ -14090,7 +14339,7 @@ export declare function createSessionRpc(connection: MessageConnection, sessionI
|
|
|
14090
14339
|
/**
|
|
14091
14340
|
* Starts OAuth authentication for a remote MCP server.
|
|
14092
14341
|
*
|
|
14093
|
-
* @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.
|
|
14094
14343
|
*
|
|
14095
14344
|
* @returns OAuth authorization URL the caller should open, or empty when cached tokens already authenticated the server.
|
|
14096
14345
|
*/
|
|
@@ -14169,6 +14418,14 @@ export declare function createSessionRpc(connection: MessageConnection, sessionI
|
|
|
14169
14418
|
* @returns A snapshot of the provider endpoint the session is currently configured to talk to.
|
|
14170
14419
|
*/
|
|
14171
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>;
|
|
14172
14429
|
};
|
|
14173
14430
|
/** @experimental */
|
|
14174
14431
|
options: {
|
|
@@ -14803,6 +15060,18 @@ export declare function createSessionRpc(connection: MessageConnection, sessionI
|
|
|
14803
15060
|
stop: (params: ScheduleStopRequest) => Promise<ScheduleStopResult>;
|
|
14804
15061
|
};
|
|
14805
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
|
+
}
|
|
14806
15075
|
/** Handler for `sessionFs` client session API methods. */
|
|
14807
15076
|
/** @experimental */
|
|
14808
15077
|
export interface SessionFsHandler {
|
|
@@ -14931,6 +15200,7 @@ export interface CanvasHandler {
|
|
|
14931
15200
|
}
|
|
14932
15201
|
/** All client session API handler groups. */
|
|
14933
15202
|
export interface ClientSessionApiHandlers {
|
|
15203
|
+
providerToken?: ProviderTokenHandler;
|
|
14934
15204
|
sessionFs?: SessionFsHandler;
|
|
14935
15205
|
canvas?: CanvasHandler;
|
|
14936
15206
|
}
|
|
@@ -14941,3 +15211,35 @@ export interface ClientSessionApiHandlers {
|
|
|
14941
15211
|
* function uses `getHandlers` to resolve the session's handlers.
|
|
14942
15212
|
*/
|
|
14943
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;
|