@github/copilot-sdk 1.0.18-preview.3 → 1.0.18-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.
@@ -37,6 +37,14 @@ function createServerRpc(connection) {
37
37
  * @returns The existing runtime identity and its resource on the listener.
38
38
  */
39
39
  publishSession: async (params) => connection.sendRequest("host.publishSession", params),
40
+ /**
41
+ * Reads the complete advertised live and dormant session catalog of an existing host owned by this connection. Does not start hosting, subscribe to sessions, or guarantee resumability.
42
+ *
43
+ * @param params Reads a running host's catalog or the runtime's saved default catalog.
44
+ *
45
+ * @returns The complete live and dormant advertised catalog, without subscribing to sessions.
46
+ */
47
+ listSessions: async (params) => connection.sendRequest("host.listSessions", params),
40
48
  /**
41
49
  * Starts a connection-owned AHP host with explicit localServer and/or githubEnvironment transports as a supervised SDK participant.
42
50
  *
@@ -2682,6 +2690,12 @@ function createSessionRpc(connection, sessionId) {
2682
2690
  * @returns Indicates whether the external tool call result was handled successfully.
2683
2691
  */
2684
2692
  handlePendingToolCall: async (params) => connection.sendRequest("session.tools.handlePendingToolCall", { ...params, sessionId }),
2693
+ /**
2694
+ * Lists the external tool calls of the session and its sub-agents that are still waiting for session.tools.handlePendingToolCall.
2695
+ *
2696
+ * @returns External tool calls still waiting for a result.
2697
+ */
2698
+ listPendingRequests: async () => connection.sendRequest("session.tools.listPendingRequests", { sessionId }),
2685
2699
  /**
2686
2700
  * Resolves, builds, and validates the runtime tool list for the session.
2687
2701
  *
@@ -3371,6 +3385,27 @@ function createSessionRpc(connection, sessionId) {
3371
3385
  getMetrics: async () => connection.sendRequest("session.usage.getMetrics", { sessionId })
3372
3386
  },
3373
3387
  /** @experimental */
3388
+ quota: {
3389
+ /**
3390
+ * Gets the session's current quota and account projection without making a network request.
3391
+ *
3392
+ * @returns The incumbent session-owned quota and account projection.
3393
+ */
3394
+ get: async () => connection.sendRequest("session.quota.get", { sessionId }),
3395
+ /**
3396
+ * Refreshes the session's provider model catalog bypassing its cache, folds quota snapshots into session state, and returns the updated projection. Failures leave the last known quota intact.
3397
+ *
3398
+ * @returns The incumbent session-owned quota and account projection.
3399
+ */
3400
+ refresh: async () => connection.sendRequest("session.quota.refresh", { sessionId }),
3401
+ /**
3402
+ * Returns and clears the session's pending quota warnings. Reading or refreshing quota does not drain warnings.
3403
+ *
3404
+ * @returns Pending warnings returned and cleared by session.quota.takeWarnings.
3405
+ */
3406
+ takeWarnings: async () => connection.sendRequest("session.quota.takeWarnings", { sessionId })
3407
+ },
3408
+ /** @experimental */
3374
3409
  limitPrediction: {
3375
3410
  /**
3376
3411
  * Predicts an AI-credit session limit for the session's resolved model. Returns an unavailable result instead of falling back when the current model is unresolved auto.
@@ -3557,7 +3592,11 @@ function createInternalSessionRpc(connection, sessionId) {
3557
3592
  *
3558
3593
  * @returns The model identifier active on the session after the switch.
3559
3594
  */
3560
- applyStartupOverlay: async (params) => connection.sendRequest("session.model.applyStartupOverlay", { ...params, sessionId })
3595
+ applyStartupOverlay: async (params) => connection.sendRequest("session.model.applyStartupOverlay", { ...params, sessionId }),
3596
+ /**
3597
+ * Clears an unchanged startup model/provider seed before default-model resolution. Never clears a resumed or user-selected model.
3598
+ */
3599
+ clearStartupSeed: async (params) => connection.sendRequest("session.model.clearStartupSeed", { ...params, sessionId })
3561
3600
  },
3562
3601
  /** @experimental */
3563
3602
  mcp: {
@@ -3724,6 +3763,15 @@ function createInternalSessionRpc(connection, sessionId) {
3724
3763
  process: async () => connection.sendRequest("session.queue.process", { sessionId })
3725
3764
  },
3726
3765
  /** @experimental */
3766
+ usage: {
3767
+ /**
3768
+ * Internal host-only replacement of absolute code-change totals reported by a relay host.
3769
+ *
3770
+ * @param params Internal absolute code-change totals reported by the owning host.
3771
+ */
3772
+ setCodeChanges: async (params) => connection.sendRequest("session.usage.setCodeChanges", { ...params, sessionId })
3773
+ },
3774
+ /** @experimental */
3727
3775
  schedule: {
3728
3776
  /**
3729
3777
  * Hydrates the native schedule registry from persisted session events.