@github/copilot-sdk 1.0.23-preview.3 → 1.0.23-preview.5

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 CHANGED
@@ -1207,6 +1207,23 @@ const session = await client.createSession({
1207
1207
 
1208
1208
  See [Custom skills](../docs/features/skills.md#skill-providers-experimental) for limits and details.
1209
1209
 
1210
+ #### Supporting files (experimental)
1211
+
1212
+ To give a provider skill supporting files, such as scripts, references,
1213
+ templates, and assets, set its descriptor's `directory` to the absolute path of
1214
+ the folder that holds them:
1215
+
1216
+ ```typescript
1217
+ {
1218
+ name: "release-notes",
1219
+ description: "Writes release notes in the team's format.",
1220
+ directory: "/srv/skills/release-notes",
1221
+ }
1222
+ ```
1223
+
1224
+ When the skill is activated, the runtime lists the folder's files for the model.
1225
+ See [Supporting files](../docs/features/skills.md#supporting-files-experimental) for details.
1226
+
1210
1227
  ### Multiple Sessions
1211
1228
 
1212
1229
  ```typescript
@@ -22,7 +22,7 @@ __export(cliVersion_exports, {
22
22
  COPILOT_CLI_VERSION: () => COPILOT_CLI_VERSION
23
23
  });
24
24
  module.exports = __toCommonJS(cliVersion_exports);
25
- const COPILOT_CLI_VERSION = "1.0.99-3";
25
+ const COPILOT_CLI_VERSION = "1.0.100-1";
26
26
  const COPILOT_CLI_USE_NPM_PACKAGE = false;
27
27
  // Annotate the CommonJS export names for ESM import in node:
28
28
  0 && (module.exports = {
@@ -281,6 +281,81 @@ function createServerRpc(connection) {
281
281
  listTokenPriceUnits: async (params) => connection.sendRequest("models.listTokenPriceUnits", params)
282
282
  },
283
283
  /** @experimental */
284
+ azureMl: {
285
+ /**
286
+ * Lists eligible Azure ML local models and redacted warnings before a chat session exists.
287
+ *
288
+ * @param params Lists models eligible for local use before a chat session exists.
289
+ *
290
+ * @returns Eligible models and redacted validation warnings.
291
+ */
292
+ catalog: async (params) => connection.sendRequest("azureMl.catalog", params),
293
+ /**
294
+ * Revalidates the newest eligible version of one Azure ML model family.
295
+ *
296
+ * @param params Selects an Azure ML model family.
297
+ *
298
+ * @returns Eligible Azure ML model version and its provider metadata.
299
+ */
300
+ latest: async (params) => connection.sendRequest("azureMl.latest", params),
301
+ /**
302
+ * Resolves immutable artifact facts without returning signed access URLs.
303
+ *
304
+ * @param params Selects an immutable model version.
305
+ *
306
+ * @returns Resolved artifact facts without signed download URLs.
307
+ */
308
+ resolve: async (params) => connection.sendRequest("azureMl.resolve", params),
309
+ /**
310
+ * Downloads and verifies a connection-owned model version, returning only after placement and manifest publication.
311
+ *
312
+ * @param params Downloads a model version to its configured local library.
313
+ *
314
+ * @returns Completed and verified Azure ML model files.
315
+ */
316
+ download: async (params) => connection.sendRequest("azureMl.download", params),
317
+ /**
318
+ * Acquires a connection-owned model-family mutation lease across transfer, activation, registration, and cleanup.
319
+ *
320
+ * @param params Identifies a family in the server's Azure ML model library.
321
+ *
322
+ * @returns Opaque handle to a connection-owned family mutation interval.
323
+ */
324
+ acquireFamily: async (params) => connection.sendRequest("azureMl.acquireFamily", params),
325
+ /**
326
+ * Releases a connection-owned family lease after its active download and cleanup operations complete.
327
+ *
328
+ * @param params Releases a family mutation interval owned by this SDK connection.
329
+ *
330
+ * @returns Empty acknowledgement for a completed host lifecycle operation.
331
+ */
332
+ releaseFamily: async (params) => connection.sendRequest("azureMl.releaseFamily", params),
333
+ /**
334
+ * Returns progress for an active download owned by this connection, or null after completion.
335
+ *
336
+ * @param params Selects an active connection-owned download.
337
+ *
338
+ * @returns Active Azure ML download progress or null.
339
+ */
340
+ status: async (params) => connection.sendRequest("azureMl.status", params),
341
+ /**
342
+ * Cancels a connection-owned download; the download call reports terminal cleanup separately.
343
+ *
344
+ * @param params Selects an active connection-owned download.
345
+ *
346
+ * @returns Whether an active connection-owned transfer accepted cancellation.
347
+ */
348
+ cancel: async (params) => connection.sendRequest("azureMl.cancel", params),
349
+ /**
350
+ * Discards an inactive model version under the server-owned Azure ML library.
351
+ *
352
+ * @param params Selects an inactive Azure ML version for cleanup.
353
+ *
354
+ * @returns Empty acknowledgement for a completed host lifecycle operation.
355
+ */
356
+ discard: async (params) => connection.sendRequest("azureMl.discard", params)
357
+ },
358
+ /** @experimental */
284
359
  contentExclusion: {
285
360
  /**
286
361
  * Validates candidate content-exclusion policies and returns them normalized, without starting a session. This runs the same parser the runtime's own policy enforcement uses, so a host cannot accept a policy set the runtime would later reject, nor reject one it would have honored. Call it when policies arrive from outside the runtime — a command-line flag, a configuration file, a host's own settings — and must be checked before a session exists to apply them to. A malformed document fails with a message prefixed `Invalid JSON: `; a well-formed document that violates the policy schema fails with the offending field paths.
@@ -2964,9 +3039,9 @@ function createSessionRpc(connection, sessionId) {
2964
3039
  /** @experimental */
2965
3040
  oauth: {
2966
3041
  /**
2967
- * Resolves a pending MCP OAuth request with a host-provided token or cancellation. The pending request is emitted as mcp.oauth_required with the data necessary to authorize the request.
3042
+ * Resolves a pending MCP OAuth request with a host-provided token, cancellation, or a noninteractive runtime refresh handoff when the request advertises runtimeRefreshSupported. Acceptance resolves the host response, not credential installation, reconnect, or the original tool invocation.
2968
3043
  *
2969
- * @param params Pending MCP OAuth request ID and host-provided token or cancellation response.
3044
+ * @param params Pending MCP OAuth request ID and host token, cancellation, or advertised runtime refresh response.
2970
3045
  *
2971
3046
  * @returns Indicates whether the pending MCP OAuth response was accepted.
2972
3047
  */
@@ -1057,7 +1057,7 @@ class CopilotSession {
1057
1057
  async _executeMcpAuthAndRespond(request) {
1058
1058
  try {
1059
1059
  const result = await this.mcpAuthHandler(request, { sessionId: this.sessionId });
1060
- const response = result && "accessToken" in result ? { kind: "token", ...result } : { kind: "cancelled" };
1060
+ const response = result && "kind" in result && result.kind === "cancelled" ? { kind: "cancelled" } : result && "accessToken" in result && typeof result.accessToken === "string" && result.accessToken.length > 0 ? { ...result, kind: "token" } : result && "kind" in result && result.kind === "runtimeRefresh" && request.runtimeRefreshSupported === true ? { kind: "runtimeRefresh" } : { kind: "cancelled" };
1061
1061
  await this.rpc.mcp.oauth.handlePendingRequest({
1062
1062
  requestId: request.requestId,
1063
1063
  result: response
@@ -1,2 +1,2 @@
1
- export declare const COPILOT_CLI_VERSION = "1.0.99-3";
1
+ export declare const COPILOT_CLI_VERSION = "1.0.100-1";
2
2
  export declare const COPILOT_CLI_USE_NPM_PACKAGE = false;
@@ -1,4 +1,4 @@
1
- const COPILOT_CLI_VERSION = "1.0.99-3";
1
+ const COPILOT_CLI_VERSION = "1.0.100-1";
2
2
  const COPILOT_CLI_USE_NPM_PACKAGE = false;
3
3
  export {
4
4
  COPILOT_CLI_USE_NPM_PACKAGE,
@@ -541,6 +541,46 @@ export type AutopilotObjectiveStatus =
541
541
  | "paused"
542
542
  /** The objective completed. */
543
543
  | "completed";
544
+ /**
545
+ * Whether an active connection-owned transfer accepted cancellation.
546
+ *
547
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
548
+ * via the `definition` "AzureMlCancelResult".
549
+ */
550
+ /** @experimental */
551
+ export type AzureMlCancelResult = boolean;
552
+ /**
553
+ * How catalog discovery handles a recent sign-in failure.
554
+ *
555
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
556
+ * via the `definition` "AzureMlCatalogRetryMode".
557
+ */
558
+ /** @experimental */
559
+ export type AzureMlCatalogRetryMode =
560
+ /** Reuse a recent failure for automatic background discovery. */
561
+ "background"
562
+ /** Retry sign-in after an explicit refresh. */
563
+ | "explicit";
564
+ /**
565
+ * Registry that owns an Azure ML model version.
566
+ *
567
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
568
+ * via the `definition` "AzureMlRegistry".
569
+ */
570
+ /** @experimental */
571
+ export type AzureMlRegistry =
572
+ /** Public Azure ML model registry. */
573
+ "azureml"
574
+ /** Microsoft staff development registry. */
575
+ | "azureml-dev";
576
+ /**
577
+ * Active Azure ML download progress or null.
578
+ *
579
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
580
+ * via the `definition` "AzureMlStatusResult".
581
+ */
582
+ /** @experimental */
583
+ export type AzureMlStatusResult = AzureMlDownloadStatus | null;
544
584
  /**
545
585
  * Root JSON Schema type for a built-in tool input.
546
586
  *
@@ -3648,6 +3688,11 @@ export type McpOauthPendingRequestResponse = {
3648
3688
  * OAuth response variant discriminator.
3649
3689
  */
3650
3690
  kind: "cancelled";
3691
+ } | {
3692
+ /**
3693
+ * OAuth response variant discriminator.
3694
+ */
3695
+ kind: "runtimeRefresh";
3651
3696
  };
3652
3697
  /**
3653
3698
  * OAuth grant type override for this login.
@@ -8269,6 +8314,399 @@ export interface AutoTierMetadata {
8269
8314
  */
8270
8315
  providerId?: string;
8271
8316
  }
8317
+ /**
8318
+ * Lists models eligible for local use before a chat session exists.
8319
+ *
8320
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
8321
+ * via the `definition` "AzureMlCatalogRequest".
8322
+ */
8323
+ /** @experimental */
8324
+ export interface AzureMlCatalogRequest {
8325
+ /**
8326
+ * Ask for the staff registry; the server also verifies its own authenticated identity.
8327
+ */
8328
+ includeDev: boolean;
8329
+ /**
8330
+ * An explicit user refresh retries a cached sign-in failure.
8331
+ */
8332
+ retryMode?: AzureMlCatalogRetryMode | null;
8333
+ }
8334
+ /**
8335
+ * Eligible models and redacted validation warnings.
8336
+ *
8337
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
8338
+ * via the `definition` "AzureMlCatalogResult".
8339
+ */
8340
+ /** @experimental */
8341
+ export interface AzureMlCatalogResult {
8342
+ /**
8343
+ * Model versions suitable for local use.
8344
+ */
8345
+ models: AzureMlModel[];
8346
+ /**
8347
+ * Skipped model and catalog errors without sensitive access details.
8348
+ */
8349
+ warnings: AzureMlCatalogWarning[];
8350
+ }
8351
+ /**
8352
+ * Eligible Azure ML model version and its provider metadata.
8353
+ *
8354
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
8355
+ * via the `definition` "AzureMlModel".
8356
+ */
8357
+ /** @experimental */
8358
+ export interface AzureMlModel {
8359
+ registry: AzureMlRegistry;
8360
+ /**
8361
+ * Stable model-family name.
8362
+ */
8363
+ name: string;
8364
+ /**
8365
+ * Exact published model version.
8366
+ */
8367
+ version: string;
8368
+ profile: AzureMlProfile;
8369
+ /**
8370
+ * Provider metadata retained for registration.
8371
+ */
8372
+ metadata: JsonValue;
8373
+ }
8374
+ /**
8375
+ * Validated local runtime requirements for an Azure ML model.
8376
+ *
8377
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
8378
+ * via the `definition` "AzureMlProfile".
8379
+ */
8380
+ /** @experimental */
8381
+ export interface AzureMlProfile {
8382
+ /**
8383
+ * Sanitized model-picker display label.
8384
+ */
8385
+ displayName: string;
8386
+ /**
8387
+ * Published download size, when available.
8388
+ */
8389
+ downloadBytes?: number | null;
8390
+ /**
8391
+ * Peak disk use during installation, when available.
8392
+ */
8393
+ peakDiskBytes?: number | null;
8394
+ /**
8395
+ * Recommended graphics memory, when available.
8396
+ */
8397
+ recommendedVramBytes?: number | null;
8398
+ /**
8399
+ * Maximum input tokens accepted by the model.
8400
+ */
8401
+ maxPromptTokens: number;
8402
+ /**
8403
+ * Maximum context window accepted by the model.
8404
+ */
8405
+ maxContextWindowTokens: number;
8406
+ /**
8407
+ * Maximum output tokens produced by the model.
8408
+ */
8409
+ maxOutputTokens: number;
8410
+ /**
8411
+ * Whether the model supports tool calls.
8412
+ */
8413
+ supportsToolCalls: boolean;
8414
+ /**
8415
+ * Validated local runtime configuration.
8416
+ */
8417
+ serveOptions: JsonValue;
8418
+ /**
8419
+ * Published license, when available.
8420
+ */
8421
+ license?: AzureMlLicense | null;
8422
+ }
8423
+ /**
8424
+ * License published with an eligible Azure ML model.
8425
+ *
8426
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
8427
+ * via the `definition` "AzureMlLicense".
8428
+ */
8429
+ /** @experimental */
8430
+ export interface AzureMlLicense {
8431
+ /**
8432
+ * Bounded display label for the model license.
8433
+ */
8434
+ name: string;
8435
+ }
8436
+ /**
8437
+ * Redacted warning for a skipped model or registry.
8438
+ *
8439
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
8440
+ * via the `definition` "AzureMlCatalogWarning".
8441
+ */
8442
+ /** @experimental */
8443
+ export interface AzureMlCatalogWarning {
8444
+ registry: AzureMlRegistry;
8445
+ /**
8446
+ * Model family, or `catalog` for registry-wide errors.
8447
+ */
8448
+ modelName: string;
8449
+ /**
8450
+ * Version, if one was available.
8451
+ */
8452
+ version?: string | null;
8453
+ /**
8454
+ * Safe reason without signed access details.
8455
+ */
8456
+ kind: string;
8457
+ }
8458
+ /**
8459
+ * Selects an inactive Azure ML version for cleanup.
8460
+ *
8461
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
8462
+ * via the `definition` "AzureMlDiscardRequest".
8463
+ */
8464
+ /** @experimental */
8465
+ export interface AzureMlDiscardRequest {
8466
+ /**
8467
+ * Version directory under this server's Azure ML library.
8468
+ */
8469
+ destination: string;
8470
+ /**
8471
+ * Optional connection-owned lease that spans the caller's complete family mutation.
8472
+ */
8473
+ leaseId?: string | null;
8474
+ }
8475
+ /**
8476
+ * Selects an active connection-owned download.
8477
+ *
8478
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
8479
+ * via the `definition` "AzureMlDownloadIdRequest".
8480
+ */
8481
+ /** @experimental */
8482
+ export interface AzureMlDownloadIdRequest {
8483
+ /**
8484
+ * Identifier supplied when this connection started the download.
8485
+ */
8486
+ requestId: string;
8487
+ }
8488
+ /**
8489
+ * Downloads a model version to its configured local library.
8490
+ *
8491
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
8492
+ * via the `definition` "AzureMlDownloadRequest".
8493
+ */
8494
+ /** @experimental */
8495
+ export interface AzureMlDownloadRequest {
8496
+ /**
8497
+ * Unique request identifier for progress and explicit cancellation.
8498
+ */
8499
+ requestId: string;
8500
+ registry: AzureMlRegistry;
8501
+ /**
8502
+ * Exact model-family name.
8503
+ */
8504
+ name: string;
8505
+ /**
8506
+ * Exact published version.
8507
+ */
8508
+ version: string;
8509
+ /**
8510
+ * Version directory under this server's Azure ML library.
8511
+ */
8512
+ destination: string;
8513
+ /**
8514
+ * Optional connection-owned lease that spans the caller's complete family mutation.
8515
+ */
8516
+ leaseId?: string | null;
8517
+ }
8518
+ /**
8519
+ * Completed and verified Azure ML model files.
8520
+ *
8521
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
8522
+ * via the `definition` "AzureMlDownloadResult".
8523
+ */
8524
+ /** @experimental */
8525
+ export interface AzureMlDownloadResult {
8526
+ /**
8527
+ * Installed GGUF path.
8528
+ */
8529
+ primaryPath: string;
8530
+ /**
8531
+ * Published manifest path.
8532
+ */
8533
+ manifestPath: string;
8534
+ /**
8535
+ * Exact bytes across the model version.
8536
+ */
8537
+ totalBytes: number;
8538
+ /**
8539
+ * Whether all prior verified files were reused.
8540
+ */
8541
+ reused: boolean;
8542
+ /**
8543
+ * Validated local runtime settings.
8544
+ */
8545
+ serveOptions: JsonValue;
8546
+ /**
8547
+ * Maximum supported local concurrency.
8548
+ */
8549
+ maxConcurrent: number;
8550
+ /**
8551
+ * Installed companion file paths.
8552
+ */
8553
+ extraFiles: string[];
8554
+ /**
8555
+ * Transient transfer failures retried during this run.
8556
+ */
8557
+ totalFailures?: number | null;
8558
+ /**
8559
+ * Bytes received over the network during this run, including discarded bytes.
8560
+ */
8561
+ receivedBytes?: number | null;
8562
+ /**
8563
+ * Whether a partial from a prior run continued after the server accepted its range.
8564
+ */
8565
+ resumed?: boolean | null;
8566
+ }
8567
+ /**
8568
+ * Progress and retry facts for one active download.
8569
+ *
8570
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
8571
+ * via the `definition` "AzureMlDownloadStatus".
8572
+ */
8573
+ /** @experimental */
8574
+ export interface AzureMlDownloadStatus {
8575
+ /**
8576
+ * Current transfer phase.
8577
+ */
8578
+ phase: string;
8579
+ /**
8580
+ * Bytes completed across all files.
8581
+ */
8582
+ completedBytes: number;
8583
+ /**
8584
+ * Exact bytes expected across all files.
8585
+ */
8586
+ totalBytes: number;
8587
+ /**
8588
+ * Next retry attempt, if the transfer is retrying.
8589
+ */
8590
+ retryAttempt?: number | null;
8591
+ /**
8592
+ * Configured retry limit, if the transfer is retrying.
8593
+ */
8594
+ maxAttempts?: number | null;
8595
+ /**
8596
+ * Redacted failure reason, if the transfer is retrying.
8597
+ */
8598
+ retryReason?: string | null;
8599
+ /**
8600
+ * Planned delay before retry, if the transfer is retrying.
8601
+ */
8602
+ retryDelayMs?: number | null;
8603
+ }
8604
+ /**
8605
+ * Opaque handle to a connection-owned family mutation interval.
8606
+ *
8607
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
8608
+ * via the `definition` "AzureMlFamilyLeaseResult".
8609
+ */
8610
+ /** @experimental */
8611
+ export interface AzureMlFamilyLeaseResult {
8612
+ /**
8613
+ * Server-generated handle, valid only on the originating SDK connection.
8614
+ */
8615
+ leaseId: string;
8616
+ }
8617
+ /**
8618
+ * Releases a family mutation interval owned by this SDK connection.
8619
+ *
8620
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
8621
+ * via the `definition` "AzureMlFamilyReleaseRequest".
8622
+ */
8623
+ /** @experimental */
8624
+ export interface AzureMlFamilyReleaseRequest {
8625
+ /**
8626
+ * Server-generated handle from `azureMl.acquireFamily`.
8627
+ */
8628
+ leaseId: string;
8629
+ registry: AzureMlRegistry;
8630
+ /**
8631
+ * Exact model-family name.
8632
+ */
8633
+ name: string;
8634
+ }
8635
+ /**
8636
+ * Identifies a family in the server's Azure ML model library.
8637
+ *
8638
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
8639
+ * via the `definition` "AzureMlFamilyRequest".
8640
+ */
8641
+ /** @experimental */
8642
+ export interface AzureMlFamilyRequest {
8643
+ registry: AzureMlRegistry;
8644
+ /**
8645
+ * Exact model-family name.
8646
+ */
8647
+ name: string;
8648
+ }
8649
+ /**
8650
+ * Selects an Azure ML model family.
8651
+ *
8652
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
8653
+ * via the `definition` "AzureMlLatestRequest".
8654
+ */
8655
+ /** @experimental */
8656
+ export interface AzureMlLatestRequest {
8657
+ registry: AzureMlRegistry;
8658
+ /**
8659
+ * Exact model-family name.
8660
+ */
8661
+ name: string;
8662
+ }
8663
+ /**
8664
+ * Selects an immutable model version.
8665
+ *
8666
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
8667
+ * via the `definition` "AzureMlResolveRequest".
8668
+ */
8669
+ /** @experimental */
8670
+ export interface AzureMlResolveRequest {
8671
+ registry: AzureMlRegistry;
8672
+ /**
8673
+ * Exact model-family name.
8674
+ */
8675
+ name: string;
8676
+ /**
8677
+ * Exact published version.
8678
+ */
8679
+ version: string;
8680
+ }
8681
+ /**
8682
+ * Resolved artifact facts without signed download URLs.
8683
+ *
8684
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
8685
+ * via the `definition` "AzureMlResolveResult".
8686
+ */
8687
+ /** @experimental */
8688
+ export interface AzureMlResolveResult {
8689
+ /**
8690
+ * Exact bytes across all files in this version.
8691
+ */
8692
+ totalBytes: number;
8693
+ /**
8694
+ * GGUF path relative to the version directory.
8695
+ */
8696
+ primaryPath: string;
8697
+ /**
8698
+ * Other paths relative to the version directory.
8699
+ */
8700
+ extraFiles: string[];
8701
+ /**
8702
+ * Validated local runtime settings.
8703
+ */
8704
+ serveOptions: JsonValue;
8705
+ /**
8706
+ * Maximum supported local concurrency.
8707
+ */
8708
+ maxConcurrent: number;
8709
+ }
8272
8710
  /**
8273
8711
  * The running runtime's complete catalog of well-known built-in model IDs, including supported models and additional IDs with built-in metadata.
8274
8712
  *
@@ -12322,6 +12760,10 @@ export interface EnvironmentsListResult {
12322
12760
  * Safe discovery records without relay bootstrap credentials.
12323
12761
  */
12324
12762
  environments: GitHubEnvironment[];
12763
+ /**
12764
+ * Server-requested minimum delay before automatically listing again, in milliseconds.
12765
+ */
12766
+ retryAfterMs?: number;
12325
12767
  }
12326
12768
  /**
12327
12769
  * Cursor, batch size, and optional long-poll/filter parameters for reading session events.
@@ -16296,6 +16738,10 @@ export interface McpConfiguredServerState {
16296
16738
  * Observed connection error, when the materialized server failed.
16297
16739
  */
16298
16740
  error?: string;
16741
+ /**
16742
+ * Whether the server's current connection has loaded its tool list (from tools/list or a cached snapshot). A connected server without loaded tools is still loading them; the change is signalled by session.mcp_server_tools_loaded. Absent when the runtime does not report it.
16743
+ */
16744
+ toolsLoaded?: boolean;
16299
16745
  }
16300
16746
  /**
16301
16747
  * Effective MCP configuration with optional live observations from matching already materialized servers.
@@ -16887,7 +17333,7 @@ export interface McpOauthCompleteRequest {
16887
17333
  callbackUrl: string;
16888
17334
  }
16889
17335
  /**
16890
- * Pending MCP OAuth request ID and host-provided token or cancellation response.
17336
+ * Pending MCP OAuth request ID and host token, cancellation, or advertised runtime refresh response.
16891
17337
  *
16892
17338
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
16893
17339
  * via the `definition` "McpOauthHandlePendingRequest".
@@ -27985,6 +28431,10 @@ export interface SkillProviderDescriptor {
27985
28431
  * Optional freeform argument hint used by slash-command catalogs.
27986
28432
  */
27987
28433
  argumentHint?: string;
28434
+ /**
28435
+ * Absolute path to the folder that holds the skill's supporting files (scripts, references, templates, assets), in the session's path conventions: the host OS for local disk, or the registered SessionFs conventions. When the skill is activated the runtime lists the folder's files for the model through the session's filesystem, with the same rules as a file-based skill's folder; it never reads or copies them. On local disk the folder becomes a read-only skill root, like a configured skill directory. It is not shown in skill catalogs.
28436
+ */
28437
+ directory?: string;
27988
28438
  }
27989
28439
  /**
27990
28440
  * Skill names to mark as disabled in global configuration, replacing any previous list.
@@ -32474,6 +32924,118 @@ export interface ModelsListTokenPriceUnitsRequest {
32474
32924
  */
32475
32925
  gitHubToken?: string;
32476
32926
  }
32927
+ /**
32928
+ * Eligible Azure ML model version and its provider metadata.
32929
+ *
32930
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
32931
+ * via the `definition` "AzureMlLatestResult".
32932
+ */
32933
+ /** @experimental */
32934
+ export interface AzureMlLatestResult {
32935
+ registry: AzureMlRegistry;
32936
+ /**
32937
+ * Stable model-family name.
32938
+ */
32939
+ name: string;
32940
+ /**
32941
+ * Exact published model version.
32942
+ */
32943
+ version: string;
32944
+ profile: AzureMlProfile;
32945
+ /**
32946
+ * Provider metadata retained for registration.
32947
+ */
32948
+ metadata: JsonValue;
32949
+ }
32950
+ /**
32951
+ * Opaque handle to a connection-owned family mutation interval.
32952
+ *
32953
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
32954
+ * via the `definition` "AzureMlAcquireFamilyResult".
32955
+ */
32956
+ /** @experimental */
32957
+ export interface AzureMlAcquireFamilyResult {
32958
+ /**
32959
+ * Server-generated handle, valid only on the originating SDK connection.
32960
+ */
32961
+ leaseId: string;
32962
+ }
32963
+ /**
32964
+ * Identifies a family in the server's Azure ML model library.
32965
+ *
32966
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
32967
+ * via the `definition` "AzureMlAcquireFamilyRequest".
32968
+ */
32969
+ /** @experimental */
32970
+ export interface AzureMlAcquireFamilyRequest {
32971
+ registry: AzureMlRegistry;
32972
+ /**
32973
+ * Exact model-family name.
32974
+ */
32975
+ name: string;
32976
+ }
32977
+ /**
32978
+ * Empty acknowledgement for a completed host lifecycle operation.
32979
+ *
32980
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
32981
+ * via the `definition` "AzureMlReleaseFamilyResult".
32982
+ */
32983
+ /** @experimental */
32984
+ export interface AzureMlReleaseFamilyResult {
32985
+ }
32986
+ /**
32987
+ * Releases a family mutation interval owned by this SDK connection.
32988
+ *
32989
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
32990
+ * via the `definition` "AzureMlReleaseFamilyRequest".
32991
+ */
32992
+ /** @experimental */
32993
+ export interface AzureMlReleaseFamilyRequest {
32994
+ /**
32995
+ * Server-generated handle from `azureMl.acquireFamily`.
32996
+ */
32997
+ leaseId: string;
32998
+ registry: AzureMlRegistry;
32999
+ /**
33000
+ * Exact model-family name.
33001
+ */
33002
+ name: string;
33003
+ }
33004
+ /**
33005
+ * Selects an active connection-owned download.
33006
+ *
33007
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
33008
+ * via the `definition` "AzureMlStatusRequest".
33009
+ */
33010
+ /** @experimental */
33011
+ export interface AzureMlStatusRequest {
33012
+ /**
33013
+ * Identifier supplied when this connection started the download.
33014
+ */
33015
+ requestId: string;
33016
+ }
33017
+ /**
33018
+ * Selects an active connection-owned download.
33019
+ *
33020
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
33021
+ * via the `definition` "AzureMlCancelRequest".
33022
+ */
33023
+ /** @experimental */
33024
+ export interface AzureMlCancelRequest {
33025
+ /**
33026
+ * Identifier supplied when this connection started the download.
33027
+ */
33028
+ requestId: string;
33029
+ }
33030
+ /**
33031
+ * Empty acknowledgement for a completed host lifecycle operation.
33032
+ *
33033
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
33034
+ * via the `definition` "AzureMlDiscardResult".
33035
+ */
33036
+ /** @experimental */
33037
+ export interface AzureMlDiscardResult {
33038
+ }
32477
33039
  /** @experimental */
32478
33040
  export interface SessionWorkflowPauseAtCheckpointResult {
32479
33041
  action: WorkflowPauseCheckpointAction;
@@ -33254,6 +33816,81 @@ export declare function createServerRpc(connection: MessageConnection): {
33254
33816
  listTokenPriceUnits: (params?: ModelsListTokenPriceUnitsRequest) => Promise<ModelTokenPriceUnitList>;
33255
33817
  };
33256
33818
  /** @experimental */
33819
+ azureMl: {
33820
+ /**
33821
+ * Lists eligible Azure ML local models and redacted warnings before a chat session exists.
33822
+ *
33823
+ * @param params Lists models eligible for local use before a chat session exists.
33824
+ *
33825
+ * @returns Eligible models and redacted validation warnings.
33826
+ */
33827
+ catalog: (params: AzureMlCatalogRequest) => Promise<AzureMlCatalogResult>;
33828
+ /**
33829
+ * Revalidates the newest eligible version of one Azure ML model family.
33830
+ *
33831
+ * @param params Selects an Azure ML model family.
33832
+ *
33833
+ * @returns Eligible Azure ML model version and its provider metadata.
33834
+ */
33835
+ latest: (params: AzureMlLatestRequest) => Promise<AzureMlLatestResult>;
33836
+ /**
33837
+ * Resolves immutable artifact facts without returning signed access URLs.
33838
+ *
33839
+ * @param params Selects an immutable model version.
33840
+ *
33841
+ * @returns Resolved artifact facts without signed download URLs.
33842
+ */
33843
+ resolve: (params: AzureMlResolveRequest) => Promise<AzureMlResolveResult>;
33844
+ /**
33845
+ * Downloads and verifies a connection-owned model version, returning only after placement and manifest publication.
33846
+ *
33847
+ * @param params Downloads a model version to its configured local library.
33848
+ *
33849
+ * @returns Completed and verified Azure ML model files.
33850
+ */
33851
+ download: (params: AzureMlDownloadRequest) => Promise<AzureMlDownloadResult>;
33852
+ /**
33853
+ * Acquires a connection-owned model-family mutation lease across transfer, activation, registration, and cleanup.
33854
+ *
33855
+ * @param params Identifies a family in the server's Azure ML model library.
33856
+ *
33857
+ * @returns Opaque handle to a connection-owned family mutation interval.
33858
+ */
33859
+ acquireFamily: (params: AzureMlAcquireFamilyRequest) => Promise<AzureMlAcquireFamilyResult>;
33860
+ /**
33861
+ * Releases a connection-owned family lease after its active download and cleanup operations complete.
33862
+ *
33863
+ * @param params Releases a family mutation interval owned by this SDK connection.
33864
+ *
33865
+ * @returns Empty acknowledgement for a completed host lifecycle operation.
33866
+ */
33867
+ releaseFamily: (params: AzureMlReleaseFamilyRequest) => Promise<AzureMlReleaseFamilyResult>;
33868
+ /**
33869
+ * Returns progress for an active download owned by this connection, or null after completion.
33870
+ *
33871
+ * @param params Selects an active connection-owned download.
33872
+ *
33873
+ * @returns Active Azure ML download progress or null.
33874
+ */
33875
+ status: (params: AzureMlStatusRequest) => Promise<AzureMlStatusResult>;
33876
+ /**
33877
+ * Cancels a connection-owned download; the download call reports terminal cleanup separately.
33878
+ *
33879
+ * @param params Selects an active connection-owned download.
33880
+ *
33881
+ * @returns Whether an active connection-owned transfer accepted cancellation.
33882
+ */
33883
+ cancel: (params: AzureMlCancelRequest) => Promise<AzureMlCancelResult>;
33884
+ /**
33885
+ * Discards an inactive model version under the server-owned Azure ML library.
33886
+ *
33887
+ * @param params Selects an inactive Azure ML version for cleanup.
33888
+ *
33889
+ * @returns Empty acknowledgement for a completed host lifecycle operation.
33890
+ */
33891
+ discard: (params: AzureMlDiscardRequest) => Promise<AzureMlDiscardResult>;
33892
+ };
33893
+ /** @experimental */
33257
33894
  contentExclusion: {
33258
33895
  /**
33259
33896
  * Validates candidate content-exclusion policies and returns them normalized, without starting a session. This runs the same parser the runtime's own policy enforcement uses, so a host cannot accept a policy set the runtime would later reject, nor reject one it would have honored. Call it when policies arrive from outside the runtime — a command-line flag, a configuration file, a host's own settings — and must be checked before a session exists to apply them to. A malformed document fails with a message prefixed `Invalid JSON: `; a well-formed document that violates the policy schema fails with the offending field paths.
@@ -35059,9 +35696,9 @@ export declare function createSessionRpc(connection: MessageConnection, sessionI
35059
35696
  /** @experimental */
35060
35697
  oauth: {
35061
35698
  /**
35062
- * Resolves a pending MCP OAuth request with a host-provided token or cancellation. The pending request is emitted as mcp.oauth_required with the data necessary to authorize the request.
35699
+ * Resolves a pending MCP OAuth request with a host-provided token, cancellation, or a noninteractive runtime refresh handoff when the request advertises runtimeRefreshSupported. Acceptance resolves the host response, not credential installation, reconnect, or the original tool invocation.
35063
35700
  *
35064
- * @param params Pending MCP OAuth request ID and host-provided token or cancellation response.
35701
+ * @param params Pending MCP OAuth request ID and host token, cancellation, or advertised runtime refresh response.
35065
35702
  *
35066
35703
  * @returns Indicates whether the pending MCP OAuth response was accepted.
35067
35704
  */
@@ -253,6 +253,81 @@ function createServerRpc(connection) {
253
253
  listTokenPriceUnits: async (params) => connection.sendRequest("models.listTokenPriceUnits", params)
254
254
  },
255
255
  /** @experimental */
256
+ azureMl: {
257
+ /**
258
+ * Lists eligible Azure ML local models and redacted warnings before a chat session exists.
259
+ *
260
+ * @param params Lists models eligible for local use before a chat session exists.
261
+ *
262
+ * @returns Eligible models and redacted validation warnings.
263
+ */
264
+ catalog: async (params) => connection.sendRequest("azureMl.catalog", params),
265
+ /**
266
+ * Revalidates the newest eligible version of one Azure ML model family.
267
+ *
268
+ * @param params Selects an Azure ML model family.
269
+ *
270
+ * @returns Eligible Azure ML model version and its provider metadata.
271
+ */
272
+ latest: async (params) => connection.sendRequest("azureMl.latest", params),
273
+ /**
274
+ * Resolves immutable artifact facts without returning signed access URLs.
275
+ *
276
+ * @param params Selects an immutable model version.
277
+ *
278
+ * @returns Resolved artifact facts without signed download URLs.
279
+ */
280
+ resolve: async (params) => connection.sendRequest("azureMl.resolve", params),
281
+ /**
282
+ * Downloads and verifies a connection-owned model version, returning only after placement and manifest publication.
283
+ *
284
+ * @param params Downloads a model version to its configured local library.
285
+ *
286
+ * @returns Completed and verified Azure ML model files.
287
+ */
288
+ download: async (params) => connection.sendRequest("azureMl.download", params),
289
+ /**
290
+ * Acquires a connection-owned model-family mutation lease across transfer, activation, registration, and cleanup.
291
+ *
292
+ * @param params Identifies a family in the server's Azure ML model library.
293
+ *
294
+ * @returns Opaque handle to a connection-owned family mutation interval.
295
+ */
296
+ acquireFamily: async (params) => connection.sendRequest("azureMl.acquireFamily", params),
297
+ /**
298
+ * Releases a connection-owned family lease after its active download and cleanup operations complete.
299
+ *
300
+ * @param params Releases a family mutation interval owned by this SDK connection.
301
+ *
302
+ * @returns Empty acknowledgement for a completed host lifecycle operation.
303
+ */
304
+ releaseFamily: async (params) => connection.sendRequest("azureMl.releaseFamily", params),
305
+ /**
306
+ * Returns progress for an active download owned by this connection, or null after completion.
307
+ *
308
+ * @param params Selects an active connection-owned download.
309
+ *
310
+ * @returns Active Azure ML download progress or null.
311
+ */
312
+ status: async (params) => connection.sendRequest("azureMl.status", params),
313
+ /**
314
+ * Cancels a connection-owned download; the download call reports terminal cleanup separately.
315
+ *
316
+ * @param params Selects an active connection-owned download.
317
+ *
318
+ * @returns Whether an active connection-owned transfer accepted cancellation.
319
+ */
320
+ cancel: async (params) => connection.sendRequest("azureMl.cancel", params),
321
+ /**
322
+ * Discards an inactive model version under the server-owned Azure ML library.
323
+ *
324
+ * @param params Selects an inactive Azure ML version for cleanup.
325
+ *
326
+ * @returns Empty acknowledgement for a completed host lifecycle operation.
327
+ */
328
+ discard: async (params) => connection.sendRequest("azureMl.discard", params)
329
+ },
330
+ /** @experimental */
256
331
  contentExclusion: {
257
332
  /**
258
333
  * Validates candidate content-exclusion policies and returns them normalized, without starting a session. This runs the same parser the runtime's own policy enforcement uses, so a host cannot accept a policy set the runtime would later reject, nor reject one it would have honored. Call it when policies arrive from outside the runtime — a command-line flag, a configuration file, a host's own settings — and must be checked before a session exists to apply them to. A malformed document fails with a message prefixed `Invalid JSON: `; a well-formed document that violates the policy schema fails with the offending field paths.
@@ -2936,9 +3011,9 @@ function createSessionRpc(connection, sessionId) {
2936
3011
  /** @experimental */
2937
3012
  oauth: {
2938
3013
  /**
2939
- * Resolves a pending MCP OAuth request with a host-provided token or cancellation. The pending request is emitted as mcp.oauth_required with the data necessary to authorize the request.
3014
+ * Resolves a pending MCP OAuth request with a host-provided token, cancellation, or a noninteractive runtime refresh handoff when the request advertises runtimeRefreshSupported. Acceptance resolves the host response, not credential installation, reconnect, or the original tool invocation.
2940
3015
  *
2941
- * @param params Pending MCP OAuth request ID and host-provided token or cancellation response.
3016
+ * @param params Pending MCP OAuth request ID and host token, cancellation, or advertised runtime refresh response.
2942
3017
  *
2943
3018
  * @returns Indicates whether the pending MCP OAuth response was accepted.
2944
3019
  */
@@ -9,7 +9,7 @@ export type JsonValue = null | boolean | number | string | JsonValue[] | {
9
9
  /**
10
10
  * Union of all session event variants emitted by the Copilot CLI runtime.
11
11
  */
12
- export type SessionEvent = StartEvent | ResumeEvent | RemoteSteerableChangedEvent | ErrorEvent | IdleEvent | TitleChangedEvent | ScheduleCreatedEvent | ScheduleCancelledEvent | ScheduleRearmedEvent | AutopilotObjectiveChangedEvent | InfoEvent | IndexedSearchEvent | WarningEvent | ModelChangeEvent | ModelDeselectedEvent | AutoTierRecommendationEvent | AutoTierSwitchFailedEvent | ModeChangedEvent | ModeNoticeDeliveredEvent | SessionLimitsChangedEvent | PermissionsChangedEvent | PlanChangedEvent | TodosChangedEvent | WorkspaceFileChangedEvent | HandoffEvent | TruncationEvent | SnapshotRewindEvent | ShutdownEvent | UsageCheckpointEvent | ProviderQuotaObservationEvent | ContextChangedEvent | UsageInfoEvent | ContextClearedEvent | CompactionStartEvent | CompactionCompleteEvent | TaskCompleteEvent | CompletionReceiptEvent | FusionRouteStartedEvent | FusionRouteFailedEvent | FusionResolvedEvent | FusionCompletedEvent | PermissionRecoveryEvent | UserMessageEvent | PendingMessagesModifiedEvent | AssistantTurnStartEvent | AssistantIntentEvent | AssistantFusionPhaseStartedEvent | AssistantFusionPhaseActivityEvent | AssistantFusionPhaseCompletedEvent | AssistantFusionPhaseFailedEvent | AssistantServerToolProgressEvent | AssistantReasoningEvent | AssistantReasoningDeltaEvent | AssistantToolCallDeltaEvent | AssistantStreamingDeltaEvent | AssistantMessageEvent | AssistantMessageStartEvent | AssistantMessageDeltaEvent | AssistantTurnEndEvent | AssistantIdleEvent | AssistantUsageEvent | ModelCallFailureEvent | ModelCallFinishedEvent | AbortEvent | ToolUserRequestedEvent | ToolExecutionStartEvent | ToolExecutionPartialResultEvent | ToolShellOutputEvent | ToolExecutionProgressEvent | ToolExecutionCompleteEvent | ToolSearchActivatedEvent | SkillInvokedEvent | SubagentStartedEvent | SubagentConfiguredEvent | SubagentCompletedEvent | SubagentFailedEvent | SubagentSelectedEvent | SubagentDeselectedEvent | HookStartEvent | HookEndEvent | HookProgressEvent | BinaryAssetEvent | SystemMessageEvent | SystemNotificationEvent | PermissionRequestedEvent | PermissionCompletedEvent | PermissionCarriedForwardEvent | PermissionMessageAuthorizationEvent | PermissionMessageAuthorizationReadEvent | PermissionMessageAuthorizationDegradedEvent | PermissionAssentDetectedEvent | PermissionContextualAuthorizationEvent | UserInputRequestedEvent | UserInputCompletedEvent | ElicitationRequestedEvent | ElicitationCompletedEvent | SamplingRequestedEvent | SamplingCompletedEvent | McpOauthRequiredEvent | McpOauthCompletedEvent | McpHeadersRefreshRequiredEvent | McpHeadersRefreshCompletedEvent | CustomNotificationEvent | UIEphemeralQueryEvent | ExternalToolRequestedEvent | ExternalToolCompletedEvent | CommandQueuedEvent | CommandExecuteEvent | CommandCompletedEvent | AutoModeSwitchRequestedEvent | AutoModeSwitchCompletedEvent | SessionLimitsExhaustedRequestedEvent | SessionLimitsExhaustedCompletedEvent | AutoModeResolvedEvent | ManagedPluginProgressEvent | ManagedSettingsResolvedEvent | ManagedSettingsEnforcedEvent | CommandsChangedEvent | CapabilitiesChangedEvent | ExitPlanModeRequestedEvent | ExitPlanModeCompletedEvent | HumanResponseRecordedEvent | ToolsUpdatedEvent | BackgroundTasksChangedEvent | WorkflowRunUpdatedEvent | WorkflowRunStartedEvent | WorkflowRunSettledEvent | SkillsLoadedEvent | CustomAgentsUpdatedEvent | McpServersLoadedEvent | McpServerStatusChangedEvent | McpServerRemovedEvent | McpServerNeedsReconnectEvent | McpToolsListChangedEvent | McpResourcesListChangedEvent | McpPromptsListChangedEvent | ExtensionsLoadedEvent | CanvasOpenedEvent | CanvasRegistryChangedEvent | CanvasClosedEvent | CanvasUnavailableEvent | CanvasRecordedEvent | CanvasRemovedEvent | ExtensionsAttachmentsPushedEvent | McpAppToolCallCompleteEvent;
12
+ export type SessionEvent = StartEvent | ResumeEvent | RemoteSteerableChangedEvent | ErrorEvent | IdleEvent | TitleChangedEvent | ScheduleCreatedEvent | ScheduleCancelledEvent | ScheduleRearmedEvent | AutopilotObjectiveChangedEvent | InfoEvent | IndexedSearchEvent | WarningEvent | ModelChangeEvent | ModelDeselectedEvent | AutoTierRecommendationEvent | AutoTierSwitchFailedEvent | ModeChangedEvent | ModeNoticeDeliveredEvent | SessionLimitsChangedEvent | PermissionsChangedEvent | PlanChangedEvent | TodosChangedEvent | WorkspaceFileChangedEvent | HandoffEvent | TruncationEvent | SnapshotRewindEvent | ShutdownEvent | UsageCheckpointEvent | ProviderQuotaObservationEvent | ContextChangedEvent | UsageInfoEvent | ContextClearedEvent | CompactionStartEvent | CompactionCompleteEvent | TaskCompleteEvent | CompletionReceiptEvent | FusionRouteStartedEvent | FusionRouteFailedEvent | FusionResolvedEvent | FusionCompletedEvent | PermissionRecoveryEvent | UserMessageEvent | PendingMessagesModifiedEvent | AssistantTurnStartEvent | AssistantIntentEvent | AssistantFusionPhaseStartedEvent | AssistantFusionPhaseActivityEvent | AssistantFusionPhaseCompletedEvent | AssistantFusionPhaseFailedEvent | AssistantServerToolProgressEvent | AssistantReasoningEvent | AssistantReasoningDeltaEvent | AssistantToolCallDeltaEvent | AssistantStreamingDeltaEvent | AssistantMessageEvent | AssistantMessageStartEvent | AssistantMessageDeltaEvent | AssistantTurnEndEvent | AssistantIdleEvent | AssistantUsageEvent | ModelCallFailureEvent | ModelCallFinishedEvent | AbortEvent | ToolUserRequestedEvent | ToolExecutionStartEvent | ToolExecutionPartialResultEvent | ToolShellOutputEvent | ToolExecutionProgressEvent | ToolExecutionCompleteEvent | ToolSearchActivatedEvent | SkillInvokedEvent | SubagentStartedEvent | SubagentConfiguredEvent | SubagentCompletedEvent | SubagentFailedEvent | SubagentSelectedEvent | SubagentDeselectedEvent | HookStartEvent | HookEndEvent | HookProgressEvent | BinaryAssetEvent | SystemMessageEvent | SystemNotificationEvent | PermissionRequestedEvent | PermissionCompletedEvent | PermissionCarriedForwardEvent | PermissionMessageAuthorizationEvent | PermissionMessageAuthorizationReadEvent | PermissionMessageAuthorizationDegradedEvent | PermissionAssentDetectedEvent | PermissionContextualAuthorizationEvent | UserInputRequestedEvent | UserInputCompletedEvent | ElicitationRequestedEvent | ElicitationCompletedEvent | SamplingRequestedEvent | SamplingCompletedEvent | McpOauthRequiredEvent | McpOauthCompletedEvent | McpOauthRecoveryCompletedEvent | McpHeadersRefreshRequiredEvent | McpHeadersRefreshCompletedEvent | CustomNotificationEvent | UIEphemeralQueryEvent | ExternalToolRequestedEvent | ExternalToolCompletedEvent | CommandQueuedEvent | CommandExecuteEvent | CommandCompletedEvent | AutoModeSwitchRequestedEvent | AutoModeSwitchCompletedEvent | SessionLimitsExhaustedRequestedEvent | SessionLimitsExhaustedCompletedEvent | AutoModeResolvedEvent | ManagedPluginProgressEvent | ManagedSettingsResolvedEvent | ManagedSettingsEnforcedEvent | CommandsChangedEvent | CapabilitiesChangedEvent | ExitPlanModeRequestedEvent | ExitPlanModeCompletedEvent | HumanResponseRecordedEvent | ToolsUpdatedEvent | BackgroundTasksChangedEvent | WorkflowRunUpdatedEvent | WorkflowRunStartedEvent | WorkflowRunSettledEvent | SkillsLoadedEvent | CustomAgentsUpdatedEvent | McpServersLoadedEvent | McpServerStatusChangedEvent | McpServerToolsLoadedEvent | McpServerRemovedEvent | McpServerNeedsReconnectEvent | McpToolsListChangedEvent | McpResourcesListChangedEvent | McpPromptsListChangedEvent | ExtensionsLoadedEvent | CanvasOpenedEvent | CanvasRegistryChangedEvent | CanvasClosedEvent | CanvasUnavailableEvent | CanvasRecordedEvent | CanvasRemovedEvent | ExtensionsAttachmentsPushedEvent | McpAppToolCallCompleteEvent;
13
13
  /**
14
14
  * Extensible routing preference for the virtual `auto` model. New identifiers must be advertised and enabled by the provider. `fast` is an integrator-only latency preset.
15
15
  */
@@ -1288,6 +1288,16 @@ export type McpOauthCompletionOutcome =
1288
1288
  "token"
1289
1289
  /** The request completed without an OAuth provider. */
1290
1290
  | "cancelled";
1291
+ /**
1292
+ * Terminal outcome of the original authorization reservation, including reconnect
1293
+ */
1294
+ export type McpOauthRecoveryCompletedOutcome =
1295
+ /** Credentials were renewed and the server reconnected. */
1296
+ "succeeded"
1297
+ /** The recovery was cancelled before it completed. */
1298
+ | "cancelled"
1299
+ /** Credential renewal or reconnect failed, or the server was dropped. */
1300
+ | "failed";
1291
1301
  /**
1292
1302
  * Why dynamic headers are being requested.
1293
1303
  */
@@ -11638,6 +11648,10 @@ export interface McpOauthRequiredData {
11638
11648
  * Raw OAuth protected-resource metadata document fetched for the MCP server, if available
11639
11649
  */
11640
11650
  resourceMetadata?: string;
11651
+ /**
11652
+ * Whether this Refresh request accepts kind runtimeRefresh to continue noninteractive grant renewal within its original authorization reservation. Missing or false means unsupported; the host must retain its legacy response behavior.
11653
+ */
11654
+ runtimeRefreshSupported?: boolean;
11641
11655
  /**
11642
11656
  * Display name of the MCP server that requires OAuth
11643
11657
  */
@@ -11761,6 +11775,50 @@ export interface McpOauthCompletedData {
11761
11775
  */
11762
11776
  requestId: string;
11763
11777
  }
11778
+ /**
11779
+ * Session event "mcp.oauth_recovery_completed". Terminal outcome of a runtime-owned MCP OAuth recovery accepted through a runtimeRefresh handoff
11780
+ */
11781
+ export interface McpOauthRecoveryCompletedEvent {
11782
+ /**
11783
+ * Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
11784
+ */
11785
+ agentId?: string;
11786
+ data: McpOauthRecoveryCompletedData;
11787
+ /**
11788
+ * When true, the event is transient and not persisted to the session event log on disk
11789
+ */
11790
+ ephemeral?: boolean;
11791
+ /**
11792
+ * Unique event identifier (UUID v4), generated when the event is emitted
11793
+ */
11794
+ id: string;
11795
+ /**
11796
+ * ID of the chronologically preceding event in the session, forming a linked chain. Null for the first event.
11797
+ */
11798
+ parentId: string | null;
11799
+ /**
11800
+ * ISO 8601 timestamp when the event was created
11801
+ */
11802
+ timestamp: string;
11803
+ /**
11804
+ * Type discriminator. Always "mcp.oauth_recovery_completed".
11805
+ */
11806
+ type: "mcp.oauth_recovery_completed";
11807
+ }
11808
+ /**
11809
+ * Terminal outcome of a runtime-owned MCP OAuth recovery accepted through a runtimeRefresh handoff
11810
+ */
11811
+ export interface McpOauthRecoveryCompletedData {
11812
+ outcome: McpOauthRecoveryCompletedOutcome;
11813
+ /**
11814
+ * Request ID of the MCP OAuth request whose runtimeRefresh handoff was accepted
11815
+ */
11816
+ requestId: string;
11817
+ /**
11818
+ * Name of the MCP server whose authorization recovery completed
11819
+ */
11820
+ serverName: string;
11821
+ }
11764
11822
  /**
11765
11823
  * Session event "mcp.headers_refresh_required". Dynamic headers refresh request for a remote MCP server
11766
11824
  */
@@ -13453,6 +13511,49 @@ export interface McpServerStatusChangedData {
13453
13511
  serverName: string;
13454
13512
  status: McpServerStatus;
13455
13513
  }
13514
+ /**
13515
+ * Session event "session.mcp_server_tools_loaded". Payload of `session.mcp_server_tools_loaded`, emitted once per connection when an MCP server's tools first become available from tools/list or a cached snapshot. A connected server is still loading tools if this event has not fired since the server last left connected; it can precede connected when the tools come from a cached snapshot.
13516
+ */
13517
+ export interface McpServerToolsLoadedEvent {
13518
+ /**
13519
+ * Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
13520
+ */
13521
+ agentId?: string;
13522
+ data: McpServerToolsLoadedData;
13523
+ /**
13524
+ * Always true for events that are transient and not persisted to the session event log on disk.
13525
+ */
13526
+ ephemeral: true;
13527
+ /**
13528
+ * Unique event identifier (UUID v4), generated when the event is emitted
13529
+ */
13530
+ id: string;
13531
+ /**
13532
+ * ID of the chronologically preceding event in the session, forming a linked chain. Null for the first event.
13533
+ */
13534
+ parentId: string | null;
13535
+ /**
13536
+ * ISO 8601 timestamp when the event was created
13537
+ */
13538
+ timestamp: string;
13539
+ /**
13540
+ * Type discriminator. Always "session.mcp_server_tools_loaded".
13541
+ */
13542
+ type: "session.mcp_server_tools_loaded";
13543
+ }
13544
+ /**
13545
+ * Payload of `session.mcp_server_tools_loaded`, emitted once per connection when an MCP server's tools first become available from tools/list or a cached snapshot. A connected server is still loading tools if this event has not fired since the server last left connected; it can precede connected when the tools come from a cached snapshot.
13546
+ */
13547
+ export interface McpServerToolsLoadedData {
13548
+ /**
13549
+ * Name of the MCP server whose tools loaded
13550
+ */
13551
+ serverName: string;
13552
+ /**
13553
+ * Number of tools the server listed
13554
+ */
13555
+ toolCount: number;
13556
+ }
13456
13557
  /**
13457
13558
  * Session event "session.mcp_server_removed". Payload of `session.mcp_server_removed` identifying an MCP server the graph no longer runs.
13458
13559
  */
package/dist/session.js CHANGED
@@ -1039,7 +1039,7 @@ class CopilotSession {
1039
1039
  async _executeMcpAuthAndRespond(request) {
1040
1040
  try {
1041
1041
  const result = await this.mcpAuthHandler(request, { sessionId: this.sessionId });
1042
- const response = result && "accessToken" in result ? { kind: "token", ...result } : { kind: "cancelled" };
1042
+ const response = result && "kind" in result && result.kind === "cancelled" ? { kind: "cancelled" } : result && "accessToken" in result && typeof result.accessToken === "string" && result.accessToken.length > 0 ? { ...result, kind: "token" } : result && "kind" in result && result.kind === "runtimeRefresh" && request.runtimeRefreshSupported === true ? { kind: "runtimeRefresh" } : { kind: "cancelled" };
1043
1043
  await this.rpc.mcp.oauth.handlePendingRequest({
1044
1044
  requestId: request.requestId,
1045
1045
  result: response
package/dist/types.d.ts CHANGED
@@ -1767,6 +1767,8 @@ export interface McpAuthRequest {
1767
1767
  serverUrl: string;
1768
1768
  /** Why the runtime is requesting host-provided OAuth credentials. */
1769
1769
  reason: "initial" | "refresh" | "reauth" | "upscope";
1770
+ /** Whether this Refresh request supports noninteractive runtime handoff. Missing means false. */
1771
+ runtimeRefreshSupported?: boolean;
1770
1772
  /** Parsed WWW-Authenticate parameters from the MCP server. */
1771
1773
  wwwAuthenticateParams?: McpAuthWwwAuthenticateParams;
1772
1774
  /** Raw RFC 9728 protected-resource metadata JSON fetched by the runtime, if available. */
@@ -1788,12 +1790,15 @@ export interface McpAuthToken {
1788
1790
  *
1789
1791
  * Return `null`/`undefined` or `{ kind: "cancelled" }` to cancel the pending
1790
1792
  * OAuth request. Return `{ kind: "token", ... }` to provide host-acquired
1791
- * OAuth token data.
1793
+ * OAuth token data. Return `{ kind: "runtimeRefresh" }` only for a Refresh
1794
+ * request advertising `runtimeRefreshSupported`; acceptance is not reconnect completion.
1792
1795
  */
1793
1796
  export type McpAuthResult = ({
1794
1797
  kind: "token";
1795
1798
  } & McpAuthToken) | {
1796
1799
  kind: "cancelled";
1800
+ } | {
1801
+ kind: "runtimeRefresh";
1797
1802
  };
1798
1803
  /** Callback invoked when an MCP server requires OAuth and the SDK host opted in. */
1799
1804
  export type McpAuthHandler = (request: McpAuthRequest, context: {
package/package.json CHANGED
@@ -5,8 +5,8 @@
5
5
  "url": "https://github.com/github/copilot-agent-runtime.git",
6
6
  "directory": "src/sdk/nodejs"
7
7
  },
8
- "version": "1.0.23-preview.3",
9
- "copilotCliVersion": "1.0.99-3",
8
+ "version": "1.0.23-preview.5",
9
+ "copilotCliVersion": "1.0.100-1",
10
10
  "description": "TypeScript SDK for programmatic control of GitHub Copilot CLI via JSON-RPC",
11
11
  "main": "./dist/cjs/index.js",
12
12
  "types": "./dist/index.d.ts",
@@ -112,18 +112,18 @@
112
112
  "README.md"
113
113
  ],
114
114
  "copilotRuntime": {
115
- "sourceSha": "a408f87a893e2126164b60ef936972cfca65dcf2",
116
- "version": "1.0.99-3",
115
+ "sourceSha": "7d20899fc4c8b13a405aa621066e75a9e78e04cd",
116
+ "version": "1.0.100-1",
117
117
  "visibility": "public"
118
118
  },
119
119
  "optionalDependencies": {
120
- "@github/copilot-sdk-darwin-arm64": "1.0.23-preview.3",
121
- "@github/copilot-sdk-darwin-x64": "1.0.23-preview.3",
122
- "@github/copilot-sdk-linux-arm64": "1.0.23-preview.3",
123
- "@github/copilot-sdk-linux-x64": "1.0.23-preview.3",
124
- "@github/copilot-sdk-linuxmusl-arm64": "1.0.23-preview.3",
125
- "@github/copilot-sdk-linuxmusl-x64": "1.0.23-preview.3",
126
- "@github/copilot-sdk-win32-arm64": "1.0.23-preview.3",
127
- "@github/copilot-sdk-win32-x64": "1.0.23-preview.3"
120
+ "@github/copilot-sdk-darwin-arm64": "1.0.23-preview.5",
121
+ "@github/copilot-sdk-darwin-x64": "1.0.23-preview.5",
122
+ "@github/copilot-sdk-linux-arm64": "1.0.23-preview.5",
123
+ "@github/copilot-sdk-linux-x64": "1.0.23-preview.5",
124
+ "@github/copilot-sdk-linuxmusl-arm64": "1.0.23-preview.5",
125
+ "@github/copilot-sdk-linuxmusl-x64": "1.0.23-preview.5",
126
+ "@github/copilot-sdk-win32-arm64": "1.0.23-preview.5",
127
+ "@github/copilot-sdk-win32-x64": "1.0.23-preview.5"
128
128
  }
129
129
  }