@github/copilot-sdk 1.0.18-preview.0 → 1.0.18-preview.1

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.
@@ -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.94-0";
25
+ const COPILOT_CLI_VERSION = "1.0.94-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 = {
@@ -1,2 +1,2 @@
1
- export declare const COPILOT_CLI_VERSION = "1.0.94-0";
1
+ export declare const COPILOT_CLI_VERSION = "1.0.94-1";
2
2
  export declare const COPILOT_CLI_USE_NPM_PACKAGE = false;
@@ -1,4 +1,4 @@
1
- const COPILOT_CLI_VERSION = "1.0.94-0";
1
+ const COPILOT_CLI_VERSION = "1.0.94-1";
2
2
  const COPILOT_CLI_USE_NPM_PACKAGE = false;
3
3
  export {
4
4
  COPILOT_CLI_USE_NPM_PACKAGE,
@@ -681,6 +681,20 @@ export type AssistantUsageTransport =
681
681
  "http"
682
682
  /** WebSocket transport. */
683
683
  | "websocket";
684
+ /**
685
+ * Why a WebSocket-capable model call was carried by the HTTP fallback
686
+ */
687
+ export type ModelCallWebSocketFallbackReason =
688
+ /** The WebSocket connection could not be established. */
689
+ "connect_failed"
690
+ /** No usable WebSocket connection was available for the request. */
691
+ | "connection_unavailable"
692
+ /** Sending the request over the WebSocket failed. */
693
+ | "send_failed"
694
+ /** The WebSocket returned a retryable API error. */
695
+ | "api_error"
696
+ /** The WebSocket transport failed before any output reached the consumer. */
697
+ | "transport_failed";
684
698
  /**
685
699
  * For HTTP 400 failures only: whether the response carried a structured CAPI error envelope (structured_error, a deterministic validation failure) or no error body (bodyless, the transient gateway/proxy signature). Absent for non-400 failures.
686
700
  */
@@ -6076,6 +6090,10 @@ export interface AssistantUsageData {
6076
6090
  * Number of rejected speculative prediction tokens
6077
6091
  */
6078
6092
  rejectedPredictionTokens?: number;
6093
+ /**
6094
+ * Serialized (uncompressed) byte length of the request body. A content-free size signal.
6095
+ */
6096
+ requestBodyBytes?: number;
6079
6097
  /**
6080
6098
  * Per-request treatment/eligibility signal returned by the Copilot API in the `X-GitHub-Copilot-Request-TE` response header for the associated model call; `false` when the header was absent or unparseable.
6081
6099
  */
@@ -6089,6 +6107,11 @@ export interface AssistantUsageData {
6089
6107
  */
6090
6108
  timeToFirstTokenMs?: number;
6091
6109
  transport?: AssistantUsageTransport;
6110
+ /**
6111
+ * Milliseconds spent on the WebSocket attempt before falling back to HTTP
6112
+ */
6113
+ websocketFallbackAfterMs?: number;
6114
+ websocketFallbackReason?: ModelCallWebSocketFallbackReason;
6092
6115
  }
6093
6116
  /**
6094
6117
  * Per-request cost and usage data from the CAPI copilot_usage response field
@@ -6244,6 +6267,10 @@ export interface ModelCallFailureData {
6244
6267
  */
6245
6268
  requestBodyBytes?: number;
6246
6269
  requestFingerprint?: ModelCallFailureRequestFingerprint;
6270
+ /**
6271
+ * Zero-based orchestrator retry index of the failed attempt
6272
+ */
6273
+ retryAttempt?: number;
6247
6274
  /**
6248
6275
  * Per-request treatment/eligibility signal returned by the Copilot API in the `X-GitHub-Copilot-Request-TE` response header for the associated model call; `false` when the header was absent or unparseable.
6249
6276
  */
@@ -6258,11 +6285,24 @@ export interface ModelCallFailureData {
6258
6285
  */
6259
6286
  statusCode?: number;
6260
6287
  transport?: ModelCallFailureTransport;
6288
+ /**
6289
+ * Milliseconds spent on the WebSocket attempt before falling back to HTTP
6290
+ */
6291
+ websocketFallbackAfterMs?: number;
6292
+ websocketFallbackReason?: ModelCallWebSocketFallbackReason;
6261
6293
  }
6262
6294
  /**
6263
6295
  * Content-free structural summary of the failing request for diagnosing malformed 4xx calls
6264
6296
  */
6265
6297
  export interface ModelCallFailureRequestFingerprint {
6298
+ /**
6299
+ * Summed byte length of opaque or encrypted reasoning payloads
6300
+ */
6301
+ encryptedContentBytes?: number;
6302
+ /**
6303
+ * Summed byte length of inline image payloads (data URLs and base64 sources)
6304
+ */
6305
+ imageBytes?: number;
6266
6306
  /**
6267
6307
  * Total number of image content parts
6268
6308
  */
@@ -6283,6 +6323,10 @@ export interface ModelCallFailureRequestFingerprint {
6283
6323
  * Tool calls whose name is missing or empty (rejected by strict providers)
6284
6324
  */
6285
6325
  namelessToolCallCount: number;
6326
+ /**
6327
+ * Number of messages carrying opaque or encrypted reasoning
6328
+ */
6329
+ reasoningItemCount?: number;
6286
6330
  /**
6287
6331
  * Total number of tool calls across assistant messages
6288
6332
  */
package/docs/workflows.md CHANGED
@@ -186,7 +186,7 @@ session.workflow.resume(
186
186
 
187
187
  Set `notifyOnComplete` to `true` for workflows that are likely to be invoked by an agent, so the originating session is notified when the workflow completes. Set it to `false` for workflows intended to be invoked programmatically, where the caller awaits the result directly. Set `logPhaseNames` to emit workflow phase names to the session transcript. Both options apply to new and resumed runs.
188
188
 
189
- Both resolve with the run envelope (`WorkflowRunResult`) for **every** outcome—`completed`, `error`, `halted`, `paused`, and `cancelled` alike. Inspect `status` and read `result` only when the run completed; a limit breach carries a typed `failure`. A `paused` envelope means that the current attempt settled, not that the durable run is permanently finished. Resume the same run ID to start another attempt with its journal and accounting intact. SDK-initiated `run` and `resume` do not request permission, so they have no declined outcome. An SDK-initiated run is refused only when the session already has its maximum number of active top-level runs. Pre-execution resume failures throw `WorkflowResumeError`, whose `code` is one of `not_found`, `non_resumable`, `workflow_run_not_resumable`, `already_active`, `workflow_already_running`, `workflow_limits_invalid`, `workflow_session_disposed`, `workflow_storage_unavailable`, or `workflow_storage_corrupt`.
189
+ Both resolve with the run envelope (`WorkflowRunResult`) for **every** outcome—`completed`, `error`, `halted`, `paused`, and `cancelled` alike. Inspect `status` and read `result` only when the run completed; a limit breach carries a typed `failure`. A `paused` envelope means that the current attempt settled, not that the durable run is permanently finished. Resume the same run ID to start another attempt with its journal and accounting intact. SDK-initiated `run` and `resume` do not request permission, so they have no declined outcome. They still enforce execution eligibility, input validation, and active-run limits. Recognized pre-execution resume failures throw `WorkflowResumeError`, whose `code` is one of `not_found`, `non_resumable`, `workflow_run_not_resumable`, `already_active`, `workflow_already_running`, `workflow_limits_invalid`, `workflow_session_disposed`, `workflow_storage_unavailable`, or `workflow_storage_corrupt`.
190
190
 
191
191
  Pause a running attempt from outside its workflow body:
192
192
 
@@ -206,7 +206,13 @@ The first attempt pauses at `"review-ready"` and ends through cooperative cancel
206
206
 
207
207
  ## Observe a run
208
208
 
209
- The calling session can inspect its own workflow runs:
209
+ The calling session can inspect its own workflow runs independently of its current execution eligibility. An empty registry enumerates successfully; losing eligibility does not hide already-admitted runs or terminal history. Observation still requires a valid, non-disposed session, and validation, missing-run, and storage errors still propagate.
210
+
211
+ Workflow storage requires SQLite support from a custom session filesystem. A provider without that capability reports `workflow_storage_unavailable`, not an empty registry or a local-storage fallback.
212
+
213
+ Compaction waits at most five seconds for its optional active-workflow summary. If storage fails or times out, compaction logs a warning and continues without that summary; aborting compaction cancels the wait. This does not change the results or error handling of explicit workflow observation calls.
214
+
215
+ Observation does not restore execution eligibility. Starting, resuming, pausing, or cancelling runs, and workflow-owned agent, log, and journal/checkpoint operations still require eligible credentials (token-based billing or trusted HMAC authentication). Ineligible execution requests fail with JSON-RPC `-32601` and `data.code: "dynamic_workflows_unavailable"`.
210
216
 
211
217
  ```ts
212
218
  const runs = await session.workflow.listRuns();
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.18-preview.0",
9
- "copilotCliVersion": "1.0.94-0",
8
+ "version": "1.0.18-preview.1",
9
+ "copilotCliVersion": "1.0.94-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",
@@ -103,18 +103,18 @@
103
103
  "README.md"
104
104
  ],
105
105
  "copilotRuntime": {
106
- "sourceSha": "5e60ea8ecadacaa0c999ec02e40541e13a165349",
107
- "version": "1.0.94-0",
106
+ "sourceSha": "44097658e184184613f404efe56e6c4d3a991656",
107
+ "version": "1.0.94-1",
108
108
  "visibility": "public"
109
109
  },
110
110
  "optionalDependencies": {
111
- "@github/copilot-sdk-darwin-arm64": "1.0.18-preview.0",
112
- "@github/copilot-sdk-darwin-x64": "1.0.18-preview.0",
113
- "@github/copilot-sdk-linux-arm64": "1.0.18-preview.0",
114
- "@github/copilot-sdk-linux-x64": "1.0.18-preview.0",
115
- "@github/copilot-sdk-linuxmusl-arm64": "1.0.18-preview.0",
116
- "@github/copilot-sdk-linuxmusl-x64": "1.0.18-preview.0",
117
- "@github/copilot-sdk-win32-arm64": "1.0.18-preview.0",
118
- "@github/copilot-sdk-win32-x64": "1.0.18-preview.0"
111
+ "@github/copilot-sdk-darwin-arm64": "1.0.18-preview.1",
112
+ "@github/copilot-sdk-darwin-x64": "1.0.18-preview.1",
113
+ "@github/copilot-sdk-linux-arm64": "1.0.18-preview.1",
114
+ "@github/copilot-sdk-linux-x64": "1.0.18-preview.1",
115
+ "@github/copilot-sdk-linuxmusl-arm64": "1.0.18-preview.1",
116
+ "@github/copilot-sdk-linuxmusl-x64": "1.0.18-preview.1",
117
+ "@github/copilot-sdk-win32-arm64": "1.0.18-preview.1",
118
+ "@github/copilot-sdk-win32-x64": "1.0.18-preview.1"
119
119
  }
120
120
  }