@github/copilot-sdk 1.0.17-preview.5 → 1.0.17-preview.6
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 +41 -0
- package/dist/cjs/cliVersion.js +1 -1
- package/dist/cjs/client.js +44 -2
- package/dist/cjs/extension.js +2 -0
- package/dist/cjs/generated/rpc.js +165 -0
- package/dist/cjs/session.js +67 -0
- package/dist/cliVersion.d.ts +1 -1
- package/dist/cliVersion.js +1 -1
- package/dist/client.d.ts +1 -0
- package/dist/client.js +44 -2
- package/dist/extension.d.ts +1 -1
- package/dist/extension.js +2 -0
- package/dist/generated/rpc.d.ts +381 -1
- package/dist/generated/rpc.js +165 -0
- package/dist/generated/session-events.d.ts +14 -0
- package/dist/index.d.ts +1 -1
- package/dist/session.d.ts +7 -0
- package/dist/session.js +67 -0
- package/dist/types.d.ts +69 -0
- package/package.json +12 -12
package/dist/generated/rpc.d.ts
CHANGED
|
@@ -1362,6 +1362,20 @@ export type ConnectorMcpStatus =
|
|
|
1362
1362
|
| "disabled"
|
|
1363
1363
|
/** The Connector currently has no live server configuration. */
|
|
1364
1364
|
| "not_configured";
|
|
1365
|
+
/**
|
|
1366
|
+
* Availability.
|
|
1367
|
+
*
|
|
1368
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
1369
|
+
* via the `definition` "ConnectorDiscoveryAvailability".
|
|
1370
|
+
*/
|
|
1371
|
+
/** @experimental */
|
|
1372
|
+
export type ConnectorDiscoveryAvailability =
|
|
1373
|
+
/** Enabled. */
|
|
1374
|
+
"enabled"
|
|
1375
|
+
/** Disabled. */
|
|
1376
|
+
| "disabled"
|
|
1377
|
+
/** Unavailable. */
|
|
1378
|
+
| "unavailable";
|
|
1365
1379
|
/**
|
|
1366
1380
|
* Session account selection, or null.
|
|
1367
1381
|
*
|
|
@@ -9459,6 +9473,146 @@ export interface ConnectorDisconnectResult {
|
|
|
9459
9473
|
disconnected: boolean;
|
|
9460
9474
|
status: ConnectorStatus;
|
|
9461
9475
|
}
|
|
9476
|
+
/**
|
|
9477
|
+
* Eligible account.
|
|
9478
|
+
*
|
|
9479
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
9480
|
+
* via the `definition` "ConnectorDiscoveryAccount".
|
|
9481
|
+
*/
|
|
9482
|
+
/** @experimental */
|
|
9483
|
+
export interface ConnectorDiscoveryAccount {
|
|
9484
|
+
/**
|
|
9485
|
+
* Opaque account ID.
|
|
9486
|
+
*/
|
|
9487
|
+
accountId: string;
|
|
9488
|
+
authInfo: ConnectorDiscoveryAuthInfo;
|
|
9489
|
+
}
|
|
9490
|
+
/**
|
|
9491
|
+
* Account metadata.
|
|
9492
|
+
*
|
|
9493
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
9494
|
+
* via the `definition` "ConnectorDiscoveryAuthInfo".
|
|
9495
|
+
*/
|
|
9496
|
+
/** @experimental */
|
|
9497
|
+
export interface ConnectorDiscoveryAuthInfo {
|
|
9498
|
+
type: AuthInfoType;
|
|
9499
|
+
/**
|
|
9500
|
+
* Host.
|
|
9501
|
+
*/
|
|
9502
|
+
host: string;
|
|
9503
|
+
/**
|
|
9504
|
+
* Login.
|
|
9505
|
+
*/
|
|
9506
|
+
login: string;
|
|
9507
|
+
}
|
|
9508
|
+
/**
|
|
9509
|
+
* Eligible accounts.
|
|
9510
|
+
*
|
|
9511
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
9512
|
+
* via the `definition` "ConnectorDiscoveryAccountList".
|
|
9513
|
+
*/
|
|
9514
|
+
/** @experimental */
|
|
9515
|
+
export interface ConnectorDiscoveryAccountList {
|
|
9516
|
+
availability: ConnectorDiscoveryAvailability;
|
|
9517
|
+
/**
|
|
9518
|
+
* Eligible accounts.
|
|
9519
|
+
*/
|
|
9520
|
+
accounts: ConnectorDiscoveryAccount[];
|
|
9521
|
+
}
|
|
9522
|
+
/**
|
|
9523
|
+
* Selected account.
|
|
9524
|
+
*
|
|
9525
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
9526
|
+
* via the `definition` "ConnectorDiscoveryAccountRequest".
|
|
9527
|
+
*/
|
|
9528
|
+
/** @experimental */
|
|
9529
|
+
export interface ConnectorDiscoveryAccountRequest {
|
|
9530
|
+
/**
|
|
9531
|
+
* Opaque account ID.
|
|
9532
|
+
*/
|
|
9533
|
+
accountId: string;
|
|
9534
|
+
}
|
|
9535
|
+
/**
|
|
9536
|
+
* Feature availability.
|
|
9537
|
+
*
|
|
9538
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
9539
|
+
* via the `definition` "ConnectorDiscoveryCapabilities".
|
|
9540
|
+
*/
|
|
9541
|
+
/** @experimental */
|
|
9542
|
+
export interface ConnectorDiscoveryCapabilities {
|
|
9543
|
+
/**
|
|
9544
|
+
* API version.
|
|
9545
|
+
*/
|
|
9546
|
+
apiVersion: number;
|
|
9547
|
+
availability: ConnectorDiscoveryAvailability;
|
|
9548
|
+
/**
|
|
9549
|
+
* Whether accounts are selected by opaque ID.
|
|
9550
|
+
*/
|
|
9551
|
+
opaqueAccountSelection: boolean;
|
|
9552
|
+
/**
|
|
9553
|
+
* Whether results are cached.
|
|
9554
|
+
*/
|
|
9555
|
+
conditionalCache: boolean;
|
|
9556
|
+
}
|
|
9557
|
+
/**
|
|
9558
|
+
* Entry.
|
|
9559
|
+
*
|
|
9560
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
9561
|
+
* via the `definition` "ConnectorDiscoveryCatalogEntry".
|
|
9562
|
+
*/
|
|
9563
|
+
/** @experimental */
|
|
9564
|
+
export interface ConnectorDiscoveryCatalogEntry {
|
|
9565
|
+
/**
|
|
9566
|
+
* Name.
|
|
9567
|
+
*/
|
|
9568
|
+
name: string;
|
|
9569
|
+
/**
|
|
9570
|
+
* Display name.
|
|
9571
|
+
*/
|
|
9572
|
+
displayName: string;
|
|
9573
|
+
/**
|
|
9574
|
+
* Description.
|
|
9575
|
+
*/
|
|
9576
|
+
description?: string;
|
|
9577
|
+
/**
|
|
9578
|
+
* Logo.
|
|
9579
|
+
*/
|
|
9580
|
+
logo?: string;
|
|
9581
|
+
/**
|
|
9582
|
+
* Tier.
|
|
9583
|
+
*/
|
|
9584
|
+
tier?: string;
|
|
9585
|
+
/**
|
|
9586
|
+
* Release tag.
|
|
9587
|
+
*/
|
|
9588
|
+
releaseTag?: string;
|
|
9589
|
+
status: ConnectorCatalogStatus;
|
|
9590
|
+
}
|
|
9591
|
+
/**
|
|
9592
|
+
* Entries for the selected account.
|
|
9593
|
+
*
|
|
9594
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
9595
|
+
* via the `definition` "ConnectorDiscoveryCatalogResult".
|
|
9596
|
+
*/
|
|
9597
|
+
/** @experimental */
|
|
9598
|
+
export interface ConnectorDiscoveryCatalogResult {
|
|
9599
|
+
/**
|
|
9600
|
+
* Opaque account ID.
|
|
9601
|
+
*/
|
|
9602
|
+
accountId: string;
|
|
9603
|
+
/**
|
|
9604
|
+
* Revision.
|
|
9605
|
+
*/
|
|
9606
|
+
revision: number;
|
|
9607
|
+
/**
|
|
9608
|
+
* Refresh time in Unix epoch milliseconds.
|
|
9609
|
+
*/
|
|
9610
|
+
refreshedAtMs: number;
|
|
9611
|
+
/**
|
|
9612
|
+
* Entries.
|
|
9613
|
+
*/
|
|
9614
|
+
connectors: ConnectorDiscoveryCatalogEntry[];
|
|
9615
|
+
}
|
|
9462
9616
|
/**
|
|
9463
9617
|
* Requests authoritative Connector-to-MCP reconciliation for the pinned account.
|
|
9464
9618
|
*
|
|
@@ -11121,6 +11275,27 @@ export interface FolderTrustCheckResult {
|
|
|
11121
11275
|
*/
|
|
11122
11276
|
trusted: boolean;
|
|
11123
11277
|
}
|
|
11278
|
+
/**
|
|
11279
|
+
* Owner, name, and host of a GitHub repository, as resolved from a git remote URL.
|
|
11280
|
+
*
|
|
11281
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
11282
|
+
* via the `definition` "GitHubRepositoryIdentity".
|
|
11283
|
+
*/
|
|
11284
|
+
/** @experimental */
|
|
11285
|
+
export interface GitHubRepositoryIdentity {
|
|
11286
|
+
/**
|
|
11287
|
+
* Repository owner login (user or organization).
|
|
11288
|
+
*/
|
|
11289
|
+
owner: string;
|
|
11290
|
+
/**
|
|
11291
|
+
* Repository name, without the owner prefix or the `.git` suffix.
|
|
11292
|
+
*/
|
|
11293
|
+
name: string;
|
|
11294
|
+
/**
|
|
11295
|
+
* Host the remote points at, for example `github.com` or a GitHub Enterprise hostname.
|
|
11296
|
+
*/
|
|
11297
|
+
host: string;
|
|
11298
|
+
}
|
|
11124
11299
|
/**
|
|
11125
11300
|
* Client environment metadata describing the process that produced a telemetry event.
|
|
11126
11301
|
*
|
|
@@ -22154,6 +22329,23 @@ export interface SessionBulkDeleteResult {
|
|
|
22154
22329
|
[k: string]: number | undefined;
|
|
22155
22330
|
};
|
|
22156
22331
|
}
|
|
22332
|
+
/**
|
|
22333
|
+
* The IDE a host is connected to, as reported to the session.
|
|
22334
|
+
*
|
|
22335
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
22336
|
+
* via the `definition` "SessionConnectedIdeInfo".
|
|
22337
|
+
*/
|
|
22338
|
+
/** @experimental */
|
|
22339
|
+
export interface SessionConnectedIdeInfo {
|
|
22340
|
+
/**
|
|
22341
|
+
* Display name of the connected IDE, for example `VS Code`.
|
|
22342
|
+
*/
|
|
22343
|
+
ideName: string;
|
|
22344
|
+
/**
|
|
22345
|
+
* Absolute path of the workspace folder the IDE has open.
|
|
22346
|
+
*/
|
|
22347
|
+
workspaceFolder: string;
|
|
22348
|
+
}
|
|
22157
22349
|
/**
|
|
22158
22350
|
* The enriched metadata records, with summary and context fields backfilled where available. Sessions confirmed empty and unnamed are omitted.
|
|
22159
22351
|
*
|
|
@@ -22996,6 +23188,19 @@ export interface SessionManagedPermissions {
|
|
|
22996
23188
|
export interface SessionManagedSettings {
|
|
22997
23189
|
permissions?: SessionManagedPermissions;
|
|
22998
23190
|
}
|
|
23191
|
+
/**
|
|
23192
|
+
* Records which IDE the host is connected to, or clears it.
|
|
23193
|
+
*
|
|
23194
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
23195
|
+
* via the `definition` "SessionMcpSetConnectedIdeInfoParams".
|
|
23196
|
+
*/
|
|
23197
|
+
/** @experimental */
|
|
23198
|
+
export interface SessionMcpSetConnectedIdeInfoParams {
|
|
23199
|
+
/**
|
|
23200
|
+
* The connected IDE. Null or omitted clears the recorded IDE, which is how a host reports that it is disconnected.
|
|
23201
|
+
*/
|
|
23202
|
+
ide?: SessionConnectedIdeInfo | null;
|
|
23203
|
+
}
|
|
22999
23204
|
/**
|
|
23000
23205
|
* Point-in-time snapshot of slow-changing session identifier and state fields
|
|
23001
23206
|
*
|
|
@@ -23830,6 +24035,90 @@ export interface SessionsCloseRequest {
|
|
|
23830
24035
|
/** @experimental */
|
|
23831
24036
|
export interface SessionsCloseResult {
|
|
23832
24037
|
}
|
|
24038
|
+
/**
|
|
24039
|
+
* Identity, state location and starting context for a workspace record.
|
|
24040
|
+
*
|
|
24041
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
24042
|
+
* via the `definition` "SessionsCreateWorkspaceRequest".
|
|
24043
|
+
*/
|
|
24044
|
+
/** @experimental */
|
|
24045
|
+
export interface SessionsCreateWorkspaceRequest {
|
|
24046
|
+
/**
|
|
24047
|
+
* Session ID the workspace record belongs to
|
|
24048
|
+
*/
|
|
24049
|
+
sessionId: string;
|
|
24050
|
+
/**
|
|
24051
|
+
* Directory the session's state is written under when no session filesystem provider is configured. Ignored when a provider is configured; the provider's session state path is used instead.
|
|
24052
|
+
*/
|
|
24053
|
+
sessionStatePath: string;
|
|
24054
|
+
/**
|
|
24055
|
+
* `windows` (any letter case) selects Windows path rules. Any other value selects POSIX path rules.
|
|
24056
|
+
*/
|
|
24057
|
+
convention: string;
|
|
24058
|
+
context?: SessionWorkingDirectoryContextWithClient;
|
|
24059
|
+
/**
|
|
24060
|
+
* User-supplied display name for the workspace
|
|
24061
|
+
*/
|
|
24062
|
+
name?: string;
|
|
24063
|
+
}
|
|
24064
|
+
/**
|
|
24065
|
+
* A working-directory context together with the client that produced it.
|
|
24066
|
+
*
|
|
24067
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
24068
|
+
* via the `definition` "SessionWorkingDirectoryContextWithClient".
|
|
24069
|
+
*/
|
|
24070
|
+
/** @experimental */
|
|
24071
|
+
export interface SessionWorkingDirectoryContextWithClient {
|
|
24072
|
+
/**
|
|
24073
|
+
* Current working directory path
|
|
24074
|
+
*/
|
|
24075
|
+
cwd: string;
|
|
24076
|
+
/**
|
|
24077
|
+
* Root directory of the git repository
|
|
24078
|
+
*/
|
|
24079
|
+
gitRoot?: string;
|
|
24080
|
+
/**
|
|
24081
|
+
* Repository identifier derived from the git remote URL
|
|
24082
|
+
*/
|
|
24083
|
+
repository?: string;
|
|
24084
|
+
/**
|
|
24085
|
+
* Hosting platform type of the repository
|
|
24086
|
+
*/
|
|
24087
|
+
hostType?: string;
|
|
24088
|
+
/**
|
|
24089
|
+
* Current git branch name
|
|
24090
|
+
*/
|
|
24091
|
+
branch?: string;
|
|
24092
|
+
/**
|
|
24093
|
+
* Raw host string from the git remote URL
|
|
24094
|
+
*/
|
|
24095
|
+
repositoryHost?: string;
|
|
24096
|
+
/**
|
|
24097
|
+
* Head commit of the current git branch
|
|
24098
|
+
*/
|
|
24099
|
+
headCommit?: string;
|
|
24100
|
+
/**
|
|
24101
|
+
* Merge-base commit SHA
|
|
24102
|
+
*/
|
|
24103
|
+
baseCommit?: string;
|
|
24104
|
+
/**
|
|
24105
|
+
* Name of the client that created the session
|
|
24106
|
+
*/
|
|
24107
|
+
clientName?: string;
|
|
24108
|
+
}
|
|
24109
|
+
/**
|
|
24110
|
+
* The workspace record that was written.
|
|
24111
|
+
*
|
|
24112
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
24113
|
+
* via the `definition` "SessionsCreateWorkspaceResult".
|
|
24114
|
+
*/
|
|
24115
|
+
/** @experimental */
|
|
24116
|
+
export interface SessionsCreateWorkspaceResult {
|
|
24117
|
+
/**
|
|
24118
|
+
* The created workspace record, as JSON
|
|
24119
|
+
*/
|
|
24120
|
+
workspaceJson: string;
|
|
24121
|
+
}
|
|
23833
24122
|
/**
|
|
23834
24123
|
* Session ID to delete from disk.
|
|
23835
24124
|
*
|
|
@@ -24457,6 +24746,36 @@ export interface SessionsLoadDeferredRepoHooksRequest {
|
|
|
24457
24746
|
*/
|
|
24458
24747
|
sessionId: string;
|
|
24459
24748
|
}
|
|
24749
|
+
/**
|
|
24750
|
+
* Where the session's state lives, as a root directory and the session ID under it.
|
|
24751
|
+
*
|
|
24752
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
24753
|
+
* via the `definition` "SessionsLoadWorkspaceRequest".
|
|
24754
|
+
*/
|
|
24755
|
+
/** @experimental */
|
|
24756
|
+
export interface SessionsLoadWorkspaceRequest {
|
|
24757
|
+
/**
|
|
24758
|
+
* Root directory every session's state directory sits under
|
|
24759
|
+
*/
|
|
24760
|
+
sessionsHome: string;
|
|
24761
|
+
/**
|
|
24762
|
+
* Session ID naming the state directory under the sessions home. Rejected when it is absolute or contains a parent component, so it cannot escape the sessions home.
|
|
24763
|
+
*/
|
|
24764
|
+
sessionId: string;
|
|
24765
|
+
}
|
|
24766
|
+
/**
|
|
24767
|
+
* The workspace record on disk, omitted when the session has none.
|
|
24768
|
+
*
|
|
24769
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
24770
|
+
* via the `definition` "SessionsLoadWorkspaceResult".
|
|
24771
|
+
*/
|
|
24772
|
+
/** @experimental */
|
|
24773
|
+
export interface SessionsLoadWorkspaceResult {
|
|
24774
|
+
/**
|
|
24775
|
+
* The workspace record, as JSON. Omitted when the record does not exist.
|
|
24776
|
+
*/
|
|
24777
|
+
workspaceJson?: string;
|
|
24778
|
+
}
|
|
24460
24779
|
/**
|
|
24461
24780
|
* Age threshold and optional flags controlling which old sessions are pruned (or simulated when dryRun is true).
|
|
24462
24781
|
*
|
|
@@ -24651,6 +24970,36 @@ export interface SessionsTransferRemoteControlRequest {
|
|
|
24651
24970
|
*/
|
|
24652
24971
|
expectedFromSessionId?: string;
|
|
24653
24972
|
}
|
|
24973
|
+
/**
|
|
24974
|
+
* Where the session's state lives, plus workspace-schema fields to merge into its workspace record. Stored keys outside the schema are not preserved, and a stored `fork_count` is never replaced.
|
|
24975
|
+
*
|
|
24976
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
24977
|
+
* via the `definition` "SessionsUpdateWorkspaceFieldsRequest".
|
|
24978
|
+
*/
|
|
24979
|
+
/** @experimental */
|
|
24980
|
+
export interface SessionsUpdateWorkspaceFieldsRequest {
|
|
24981
|
+
/**
|
|
24982
|
+
* Root directory every session's state directory sits under
|
|
24983
|
+
*/
|
|
24984
|
+
sessionsHome: string;
|
|
24985
|
+
/**
|
|
24986
|
+
* Session ID naming the state directory under the sessions home. Rejected when it is absolute or contains a parent component, so it cannot escape the sessions home.
|
|
24987
|
+
*/
|
|
24988
|
+
sessionId: string;
|
|
24989
|
+
/**
|
|
24990
|
+
* Workspace-schema fields to merge into the record, as a JSON object. Fields the object omits keep their stored values, except stored keys outside the schema are not preserved and a stored `fork_count` is never replaced.
|
|
24991
|
+
*/
|
|
24992
|
+
fieldsJson: string;
|
|
24993
|
+
}
|
|
24994
|
+
/**
|
|
24995
|
+
* The merge completed. The record carries the supplied workspace-schema fields, but a stored `fork_count` stays.
|
|
24996
|
+
*
|
|
24997
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
24998
|
+
* via the `definition` "SessionsUpdateWorkspaceFieldsResult".
|
|
24999
|
+
*/
|
|
25000
|
+
/** @experimental */
|
|
25001
|
+
export interface SessionsUpdateWorkspaceFieldsResult {
|
|
25002
|
+
}
|
|
24654
25003
|
/**
|
|
24655
25004
|
* Telemetry engagement ID for the session, when available.
|
|
24656
25005
|
*
|
|
@@ -25252,7 +25601,7 @@ export interface SkillPlanUninstallRequest {
|
|
|
25252
25601
|
policySessionId: string;
|
|
25253
25602
|
}
|
|
25254
25603
|
/**
|
|
25255
|
-
*
|
|
25604
|
+
* Authoritative catalog metadata for one SDK-provided skill. The skill's SKILL.md text is fetched separately and lazily.
|
|
25256
25605
|
*
|
|
25257
25606
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
25258
25607
|
* via the `definition` "SkillProviderDescriptor".
|
|
@@ -30679,6 +31028,37 @@ export declare function createServerRpc(connection: MessageConnection): {
|
|
|
30679
31028
|
*/
|
|
30680
31029
|
spawn: (params: AgentRegistrySpawnRequest) => Promise<AgentRegistrySpawnResult>;
|
|
30681
31030
|
};
|
|
31031
|
+
/** @experimental */
|
|
31032
|
+
connectors: {
|
|
31033
|
+
/**
|
|
31034
|
+
* Returns feature availability.
|
|
31035
|
+
*
|
|
31036
|
+
* @returns Feature availability.
|
|
31037
|
+
*/
|
|
31038
|
+
getCapabilities: () => Promise<ConnectorDiscoveryCapabilities>;
|
|
31039
|
+
/**
|
|
31040
|
+
* Returns eligible accounts.
|
|
31041
|
+
*
|
|
31042
|
+
* @returns Eligible accounts.
|
|
31043
|
+
*/
|
|
31044
|
+
getAccounts: () => Promise<ConnectorDiscoveryAccountList>;
|
|
31045
|
+
/**
|
|
31046
|
+
* Lists entries for the selected account.
|
|
31047
|
+
*
|
|
31048
|
+
* @param params Selected account.
|
|
31049
|
+
*
|
|
31050
|
+
* @returns Entries for the selected account.
|
|
31051
|
+
*/
|
|
31052
|
+
list: (params: ConnectorDiscoveryAccountRequest) => Promise<ConnectorDiscoveryCatalogResult>;
|
|
31053
|
+
/**
|
|
31054
|
+
* Refreshes entries for the selected account.
|
|
31055
|
+
*
|
|
31056
|
+
* @param params Selected account.
|
|
31057
|
+
*
|
|
31058
|
+
* @returns Entries for the selected account.
|
|
31059
|
+
*/
|
|
31060
|
+
refresh: (params: ConnectorDiscoveryAccountRequest) => Promise<ConnectorDiscoveryCatalogResult>;
|
|
31061
|
+
};
|
|
30682
31062
|
};
|
|
30683
31063
|
/** Create typed session-scoped RPC methods. */
|
|
30684
31064
|
export declare function createSessionRpc(connection: MessageConnection, sessionId: string): {
|
package/dist/generated/rpc.js
CHANGED
|
@@ -952,6 +952,37 @@ function createServerRpc(connection) {
|
|
|
952
952
|
* @returns Outcome of an agentRegistry.spawn call.
|
|
953
953
|
*/
|
|
954
954
|
spawn: async (params) => connection.sendRequest("agentRegistry.spawn", params)
|
|
955
|
+
},
|
|
956
|
+
/** @experimental */
|
|
957
|
+
connectors: {
|
|
958
|
+
/**
|
|
959
|
+
* Returns feature availability.
|
|
960
|
+
*
|
|
961
|
+
* @returns Feature availability.
|
|
962
|
+
*/
|
|
963
|
+
getCapabilities: async () => connection.sendRequest("connectors.getCapabilities", {}),
|
|
964
|
+
/**
|
|
965
|
+
* Returns eligible accounts.
|
|
966
|
+
*
|
|
967
|
+
* @returns Eligible accounts.
|
|
968
|
+
*/
|
|
969
|
+
getAccounts: async () => connection.sendRequest("connectors.getAccounts", {}),
|
|
970
|
+
/**
|
|
971
|
+
* Lists entries for the selected account.
|
|
972
|
+
*
|
|
973
|
+
* @param params Selected account.
|
|
974
|
+
*
|
|
975
|
+
* @returns Entries for the selected account.
|
|
976
|
+
*/
|
|
977
|
+
list: async (params) => connection.sendRequest("connectors.list", params),
|
|
978
|
+
/**
|
|
979
|
+
* Refreshes entries for the selected account.
|
|
980
|
+
*
|
|
981
|
+
* @param params Selected account.
|
|
982
|
+
*
|
|
983
|
+
* @returns Entries for the selected account.
|
|
984
|
+
*/
|
|
985
|
+
refresh: async (params) => connection.sendRequest("connectors.refresh", params)
|
|
955
986
|
}
|
|
956
987
|
};
|
|
957
988
|
}
|
|
@@ -1007,6 +1038,110 @@ function createInternalServerRpc(connection) {
|
|
|
1007
1038
|
*/
|
|
1008
1039
|
connect: async (params) => connection.sendRequest("connect", params),
|
|
1009
1040
|
/** @experimental */
|
|
1041
|
+
agents: {
|
|
1042
|
+
/**
|
|
1043
|
+
* Lists the agents this runtime ships, by name. A consumer separating shipped agents from ones the user or a plugin authored should compare against these names rather than against `AgentInfo.source`: an authored agent may carry the `builtin` source while not being one of these, and the runtime treats the two as separate questions. `disableableNames` is the subset a user may turn off, which a client needs to decide whether to offer a toggle. `yamlBasedNames` is the subset backed by a shipped YAML definition, which a client needs before asking the runtime to load one.
|
|
1044
|
+
*
|
|
1045
|
+
* @returns The agents this runtime ships, named so a consumer can tell them apart from authored ones.
|
|
1046
|
+
*/
|
|
1047
|
+
getBuiltins: async () => connection.sendRequest("agents.getBuiltins", {}),
|
|
1048
|
+
/**
|
|
1049
|
+
* Lists the shipped agents a client should offer right now, filtered by the feature flags it passes. `getBuiltins` names every agent the runtime knows about; some of those are gated, so a client rendering a picker wants this narrower list together with the description to show beside each name.
|
|
1050
|
+
*
|
|
1051
|
+
* @param params The feature flags to evaluate shipped agents against.
|
|
1052
|
+
*
|
|
1053
|
+
* @returns The shipped agents available under the requested flags.
|
|
1054
|
+
*/
|
|
1055
|
+
getAvailableBuiltins: async (params) => connection.sendRequest("agents.getAvailableBuiltins", params),
|
|
1056
|
+
/**
|
|
1057
|
+
* Loads one shipped agent's YAML definition, for a client that needs what the agent declares rather than only its name. `getBuiltins` reports which names have a definition to load: a name outside its `yamlBasedNames` is special-cased in code and has none. The definition crosses as its own JSON rather than as contract-typed fields, because the runtime parses it with the agent schema's tolerant shape and re-typing it here would drop the keys that shape accepts and this one does not. The projected `__nativeCustomAgent` view the runtime derives is included, so a caller reading the declared model and a caller rendering the agent see the same definition.
|
|
1058
|
+
*
|
|
1059
|
+
* @param params The shipped agent whose definition to load.
|
|
1060
|
+
*
|
|
1061
|
+
* @returns One shipped agent's definition.
|
|
1062
|
+
*/
|
|
1063
|
+
getBuiltinDefinition: async (params) => connection.sendRequest("agents.getBuiltinDefinition", params),
|
|
1064
|
+
/**
|
|
1065
|
+
* Projects one shipped agent the way a picker lists it, reading only the metadata at the head of the definition file and stopping before the prompt body. `getBuiltinDefinition` answers the whole definition instead, so a client listing every shipped agent should prefer this one: the cost of a listing grows with the number of agents, and the prompt body is the part a listing never shows. The two also differ in shape. This returns the projected custom agent on its own, whereas `getBuiltinDefinition` returns the authored definition with that projection nested under `__nativeCustomAgent`.
|
|
1066
|
+
*
|
|
1067
|
+
* @param params The shipped agent whose listing entry to load.
|
|
1068
|
+
*
|
|
1069
|
+
* @returns One shipped agent, projected for a listing.
|
|
1070
|
+
*/
|
|
1071
|
+
getBuiltinListingDefinition: async (params) => connection.sendRequest("agents.getBuiltinListingDefinition", params),
|
|
1072
|
+
/**
|
|
1073
|
+
* Resolves the model a custom agent asks for against the models actually available, and answers both the model to switch to and the warning a user should see when the agent's preference cannot be met. A custom agent may name several acceptable models in preference order, so the decision is a match rather than a lookup, and an agent whose preference is unavailable is a normal outcome that produces a warning rather than an error. A host must call this rather than pick the first available name itself, because the preference order and the wording of the warning are what keep one installation's agent selection the same as another's.
|
|
1074
|
+
*
|
|
1075
|
+
* @param params The models a custom agent asks for, and the models actually available.
|
|
1076
|
+
*
|
|
1077
|
+
* @returns The model to switch to, and the warning to show when the agent's preference could not be met.
|
|
1078
|
+
*/
|
|
1079
|
+
customAgentInitialModelDecision: async (params) => connection.sendRequest("agents.customAgentInitialModelDecision", params)
|
|
1080
|
+
},
|
|
1081
|
+
/** @experimental */
|
|
1082
|
+
gitHubRepository: {
|
|
1083
|
+
/**
|
|
1084
|
+
* Resolves the GitHub repository that owns a working-tree path by reading the selected git remote configured for it, preferring `origin`. Returns a null `repository` when the path is inside a git working tree but that selected remote does not resolve to a GitHub host. Fails when the path is not inside a git working tree at all, so a caller can tell 'not a repository' apart from 'a repository with no GitHub remote'.
|
|
1085
|
+
*
|
|
1086
|
+
* @param params Working-tree path whose owning GitHub repository should be resolved.
|
|
1087
|
+
*
|
|
1088
|
+
* @returns The GitHub repository that owns the requested path, when the selected remote (`origin`, else the first) is on a GitHub host.
|
|
1089
|
+
*/
|
|
1090
|
+
atPath: async (params) => connection.sendRequest("gitHubRepository.atPath", params)
|
|
1091
|
+
},
|
|
1092
|
+
/** @experimental */
|
|
1093
|
+
gitHubOwners: {
|
|
1094
|
+
/**
|
|
1095
|
+
* Registers a cancellable owner listing and returns its request id. Separate from `gitHubOwners.list` so the id exists before the listing starts: a caller that abandons the listing the moment it begins would otherwise have nothing to name in `gitHubOwners.cancel`. The id serves one listing only. Long-abandoned unused ids can be released by later allocations.
|
|
1096
|
+
*
|
|
1097
|
+
* @returns A freshly registered request id. Registering it before the listing starts is what lets a cancel that races the request still find the owner listing slot. The id serves one listing only. Long-abandoned unused ids can be released by later allocations.
|
|
1098
|
+
*/
|
|
1099
|
+
nextRequestId: async () => connection.sendRequest("gitHubOwners.nextRequestId", {}),
|
|
1100
|
+
/**
|
|
1101
|
+
* Lists the logins the authenticated user may act as — their own account first, then the organizations they belong to — by asking the GitHub API under the supplied credential. No credential travels in the request: `authInfo` selects one the runtime already holds, and the runtime resolves the token and the GitHub host from it. A failure the caller should render arrives as `message`; one it should raise arrives as `throwError`.
|
|
1102
|
+
*
|
|
1103
|
+
* @param params Credential to list owners under, and the request id that makes the listing cancellable.
|
|
1104
|
+
*
|
|
1105
|
+
* @returns Outcome of an owner listing. Exactly one of `owners` and `message` is present, except that `throwError` reports a failure the caller is expected to raise rather than render.
|
|
1106
|
+
*/
|
|
1107
|
+
list: async (params) => connection.sendRequest("gitHubOwners.list", params),
|
|
1108
|
+
/**
|
|
1109
|
+
* Abandons an owner listing started with the given request id. Answers `canceled: true` while a listing with that id is running. Answers `canceled: false` when the id was never registered, was registered but not used, was released after being abandoned, or its listing has ended. Canceling an unused id releases it, and a later `list` with that id is refused. The cancel acts only on owner listings and never reaches another request of the host.
|
|
1110
|
+
*
|
|
1111
|
+
* @param params The owner listing to abandon.
|
|
1112
|
+
*
|
|
1113
|
+
* @returns Whether the id named a running owner listing.
|
|
1114
|
+
*/
|
|
1115
|
+
cancel: async (params) => connection.sendRequest("gitHubOwners.cancel", params)
|
|
1116
|
+
},
|
|
1117
|
+
/** @experimental */
|
|
1118
|
+
git: {
|
|
1119
|
+
/**
|
|
1120
|
+
* Reads the remote that the branch checked out in a working tree tracks, as `branch.<name>.remote` configures it. Reports `origin` rather than failing whenever there is no tracking configuration to read — on a detached HEAD, on a branch with no upstream, or when git itself fails — because a caller asking which remote to talk to needs an answer it can act on, not an error. Marked internal because it exists to carry a CLI call site off the napi boundary onto the SDK contract; it is migration plumbing, not a surface consumers are meant to depend on.
|
|
1121
|
+
*
|
|
1122
|
+
* @param params Working-tree path a git query applies to.
|
|
1123
|
+
*
|
|
1124
|
+
* @returns The remote the checked-out branch tracks.
|
|
1125
|
+
*/
|
|
1126
|
+
currentBranchRemote: async (params) => connection.sendRequest("git.currentBranchRemote", params),
|
|
1127
|
+
/**
|
|
1128
|
+
* Collects the repository context of a working directory in one call: working tree root, repository identifier and host, current branch, and the HEAD and base commits. Every repository field is omitted when the path is not inside a git working tree, and the requested path is echoed back as `cwd`. The answer is the same `SessionWorkingDirectoryContext` that `session.metadata.recordContextChange` accepts, so a caller polling for a context change can forward the result unchanged. Marked internal because it exists to carry a CLI call site off the napi boundary onto the SDK contract; it is migration plumbing, not a surface consumers are meant to depend on. It can become public once an SDK consumer needs to derive session context from a directory itself.
|
|
1129
|
+
*
|
|
1130
|
+
* @param params Working-tree path a git query applies to.
|
|
1131
|
+
*
|
|
1132
|
+
* @returns Updated working directory and git context. Emitted as the new payload of `session.context_changed`.
|
|
1133
|
+
*/
|
|
1134
|
+
workingDirectoryContext: async (params) => connection.sendRequest("git.workingDirectoryContext", params),
|
|
1135
|
+
/**
|
|
1136
|
+
* Lists the GitHub repositories a working tree's remotes point at, one entry per distinct repository, so a caller can resolve a base and head repository without parsing remote URLs itself. When several remotes name the same repository, only the first is listed, and the entry keeps that remote name. Remotes pointing at no GitHub host are left out, so an empty list means the tree reaches GitHub through no remote. Failing to read the remotes is reported as an error rather than as an empty list, because the two mean different things to a caller. Marked internal because it exists to carry a CLI call site off the napi boundary onto the SDK contract; it is migration plumbing, not a surface consumers are meant to depend on.
|
|
1137
|
+
*
|
|
1138
|
+
* @param params Git working tree whose GitHub remotes should be listed.
|
|
1139
|
+
*
|
|
1140
|
+
* @returns The GitHub repositories a working tree's remotes point at.
|
|
1141
|
+
*/
|
|
1142
|
+
reposFromRemotes: async (params) => connection.sendRequest("git.reposFromRemotes", params)
|
|
1143
|
+
},
|
|
1144
|
+
/** @experimental */
|
|
1010
1145
|
sessions: {
|
|
1011
1146
|
/**
|
|
1012
1147
|
* Reads lightweight persisted metadata for one local session without opening it.
|
|
@@ -1046,6 +1181,30 @@ function createInternalServerRpc(connection) {
|
|
|
1046
1181
|
* @param params Session ID to delete from disk.
|
|
1047
1182
|
*/
|
|
1048
1183
|
delete: async (params) => connection.sendRequest("sessions.delete", params),
|
|
1184
|
+
/**
|
|
1185
|
+
* Creates the workspace record for a session that has not been opened yet. A host that hands a session off to another application — writing the record and then launching that application against the session ID — needs the record on disk before any session exists to carry it, which the session-scoped workspace methods cannot do. Replaces any existing record and resets the checkpoint index. When writing to the local filesystem, a stored `fork_count` survives on disk. Returns the record it built, so a surviving stored `fork_count` can differ from the answer.
|
|
1186
|
+
*
|
|
1187
|
+
* @param params Identity, state location and starting context for a workspace record.
|
|
1188
|
+
*
|
|
1189
|
+
* @returns The workspace record that was written.
|
|
1190
|
+
*/
|
|
1191
|
+
createWorkspace: async (params) => connection.sendRequest("sessions.createWorkspace", params),
|
|
1192
|
+
/**
|
|
1193
|
+
* Reads a session's workspace record straight from disk, without opening the session. Resuming by session ID has to know where the session lives before it can connect, so the lookup cannot come from the session-scoped workspace methods, which resolve their location from a live session's context. Returns no record when the file is absent.
|
|
1194
|
+
*
|
|
1195
|
+
* @param params Where the session's state lives, as a root directory and the session ID under it.
|
|
1196
|
+
*
|
|
1197
|
+
* @returns The workspace record on disk, omitted when the session has none.
|
|
1198
|
+
*/
|
|
1199
|
+
loadWorkspace: async (params) => connection.sendRequest("sessions.loadWorkspace", params),
|
|
1200
|
+
/**
|
|
1201
|
+
* Merges fields into a session's workspace record on disk, creating the record when it is absent. The counterpart to `sessions.loadWorkspace`, for the same before-the-session-exists case. It preserves stored workspace-schema fields the request does not supply, does not preserve stored keys outside the workspace schema, and never replaces a stored `fork_count`.
|
|
1202
|
+
*
|
|
1203
|
+
* @param params Where the session's state lives, plus workspace-schema fields to merge into its workspace record. Stored keys outside the schema are not preserved, and a stored `fork_count` is never replaced.
|
|
1204
|
+
*
|
|
1205
|
+
* @returns The merge completed. The record carries the supplied workspace-schema fields, but a stored `fork_count` stays.
|
|
1206
|
+
*/
|
|
1207
|
+
updateWorkspaceFields: async (params) => connection.sendRequest("sessions.updateWorkspaceFields", params),
|
|
1049
1208
|
/**
|
|
1050
1209
|
* Gets the dynamic-context board entry count associated with a session, when available. Internal: this exists solely so CLI telemetry events (`rem_spawn_gate`, `rem_consolidation_complete`) can pair START / END board counts around the detached rem-agent spawn. "Dynamic context board" is a runtime-internal concept that is not part of the public SDK contract; the long-term plan is to relocate the telemetry emission into the runtime so this method can be deleted entirely.
|
|
1051
1210
|
*
|
|
@@ -3379,6 +3538,12 @@ function createInternalSessionRpc(connection, sessionId) {
|
|
|
3379
3538
|
},
|
|
3380
3539
|
/** @experimental */
|
|
3381
3540
|
mcp: {
|
|
3541
|
+
/**
|
|
3542
|
+
* Records the IDE the host is connected to, so the agent's system prompt can name it and its workspace folder. Null or an omitted `ide` clears the recorded value, which is how a host reports that it is disconnected; there is no separate clear method. Both `ideName` and `workspaceFolder` are required together, because half a state cannot be attributed to a project.
|
|
3543
|
+
*
|
|
3544
|
+
* @param params Records which IDE the host is connected to, or clears it.
|
|
3545
|
+
*/
|
|
3546
|
+
setConnectedIdeInfo: async (params) => connection.sendRequest("session.mcp.setConnectedIdeInfo", { ...params, sessionId }),
|
|
3382
3547
|
/**
|
|
3383
3548
|
* Reloads MCP server connections for the session with an explicit host-provided configuration.
|
|
3384
3549
|
*
|
|
@@ -8852,6 +8852,8 @@ export interface PermissionApprovalEvaluation {
|
|
|
8852
8852
|
| "action-too-long"
|
|
8853
8853
|
/** The script path was not authorized for inspection. */
|
|
8854
8854
|
| "path-not-authorized"
|
|
8855
|
+
/** A code source was excluded from review by content exclusion policy. */
|
|
8856
|
+
| "content-excluded"
|
|
8855
8857
|
/** The script working directory was invalid. */
|
|
8856
8858
|
| "invalid-working-directory"
|
|
8857
8859
|
/** The script snapshot could not be read. */
|
|
@@ -8876,6 +8878,18 @@ export interface PermissionApprovalEvaluation {
|
|
|
8876
8878
|
| "unreviewable-script-invocation"
|
|
8877
8879
|
/** The script argument binding could not be reviewed. */
|
|
8878
8880
|
| "argument-binding-unreviewable"
|
|
8881
|
+
/** The shell command could not be analyzed for execution evidence. */
|
|
8882
|
+
| "unsupported-command-shape"
|
|
8883
|
+
/** The shell command used a code source that cannot be bound for review. */
|
|
8884
|
+
| "unsupported-source"
|
|
8885
|
+
/** The shell command used a code source computed at run time. */
|
|
8886
|
+
| "dynamic-source"
|
|
8887
|
+
/** The shell command referenced more code sources than can be reviewed. */
|
|
8888
|
+
| "too-many-sources"
|
|
8889
|
+
/** A code-bearing executable could not be inspected. */
|
|
8890
|
+
| "executable-unavailable"
|
|
8891
|
+
/** A code-bearing executable exceeded the binding size limit. */
|
|
8892
|
+
| "executable-too-large"
|
|
8879
8893
|
/** The script review metadata was malformed. */
|
|
8880
8894
|
| "malformed-script-action-review"
|
|
8881
8895
|
/** The script snapshot manifest was malformed. */
|