dsh-github-copilot 0.4.0-alpha.84 → 0.4.0-alpha.85

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/lib/index.js CHANGED
@@ -1847,7 +1847,7 @@ function installContextEvidence(ctx) {
1847
1847
  //#endregion
1848
1848
  //#region package.json
1849
1849
  var name$1 = "dsh-github-copilot";
1850
- var version = "0.4.0-alpha.84";
1850
+ var version = "0.4.0-alpha.85";
1851
1851
  //#endregion
1852
1852
  //#region lib/types/probe.js
1853
1853
  /**
@@ -5539,6 +5539,9 @@ async function isCopilotInputItemScopeError(response, signal) {
5539
5539
  return !signal?.aborted && isScopeError(body);
5540
5540
  }
5541
5541
  //#endregion
5542
+ //#region lib/types/request-body-timeout-marker.js
5543
+ const REQUEST_BODY_TIMEOUT_MARKER = "COPILOT_REQUEST_BODY_TIMEOUT: Copilot returned HTTP 408 / user_request_timeout while reading the request body; this is not context-window overflow.";
5544
+ //#endregion
5542
5545
  //#region lib/types/request-body-evidence.js
5543
5546
  const REQUEST_BODY_EVIDENCE_LIMITS = Object.freeze({
5544
5547
  bytes: 16777216,
@@ -5739,7 +5742,9 @@ async function requestBodyTimeoutDiagnostic(response, body, signal, dispatch) {
5739
5742
  if (signal?.aborted || !record$5(value)) return void 0;
5740
5743
  const error = Object.hasOwn(value, "error") ? value.error : value;
5741
5744
  if (!record$5(error) || error.code !== "user_request_timeout" || error.message !== observedMessage || value.code !== void 0 && value.code !== error.code || value.message !== void 0 && value.message !== error.message) return void 0;
5742
- return `COPILOT_REQUEST_BODY_TIMEOUT: Copilot returned HTTP 408 / user_request_timeout while reading the request body; this is not context-window overflow. ${body === void 0 ? "Request body size unavailable." : `Request body: ${Buffer.byteLength(body, "utf8")} UTF-8 bytes (not context tokens).`} ${formatRequestBodyEvidence(dispatch === void 0 ? { state: "unavailable" } : requestBodyEvidence(body, dispatch.protocol), dispatch?.responseHeadersMs)} Native retry policy is unchanged. If retries exhaust, use these numbers to choose an explicit attachment/image-offload budget change or native compaction for compressible history; tool definitions and opaque replay may remain. Also check network/proxy health and GitHub service status. Composition alone does not establish a cause or supplier size limit. A larger client timeout does not change this server timeout. No history was trimmed or model switched.`;
5745
+ const size = body === void 0 ? "Request body size unavailable." : `Request body: ${Buffer.byteLength(body, "utf8")} UTF-8 bytes (not context tokens).`;
5746
+ const composition = formatRequestBodyEvidence(dispatch === void 0 ? { state: "unavailable" } : requestBodyEvidence(body, dispatch.protocol), dispatch?.responseHeadersMs);
5747
+ return `${REQUEST_BODY_TIMEOUT_MARKER} ${size} ${composition} Native retry policy is unchanged. If retries exhaust, use these numbers to choose an explicit attachment/image-offload budget change or native compaction for compressible history; tool definitions and opaque replay may remain. Also check network/proxy health and GitHub service status. Composition alone does not establish a cause or supplier size limit. A larger client timeout does not change this server timeout. No history was trimmed or model switched.`;
5743
5748
  }
5744
5749
  //#endregion
5745
5750
  //#region lib/types/copilot-stream-liveness.js
@@ -0,0 +1,2 @@
1
+ export declare const REQUEST_BODY_TIMEOUT_MARKER = "COPILOT_REQUEST_BODY_TIMEOUT: Copilot returned HTTP 408 / user_request_timeout while reading the request body; this is not context-window overflow.";
2
+ //# sourceMappingURL=request-body-timeout-marker.d.ts.map
@@ -1,13 +1,29 @@
1
1
  export declare const TURN_USAGE_EVIDENCE_KEY = "github-copilot-turn-usage-evidence";
2
+ export interface TimeoutUsageDetail {
3
+ readonly step?: number;
4
+ readonly seq?: number;
5
+ readonly recovered: boolean;
6
+ }
2
7
  export interface TurnUsageEvidence {
3
8
  readonly ended: boolean;
4
9
  readonly hasStart: boolean;
5
10
  readonly localPreDispatchBlocks: number;
6
11
  readonly unreportedAttempts: number;
12
+ readonly requestBodyTimeouts?: number;
13
+ readonly timeoutDetails?: readonly TimeoutUsageDetail[];
14
+ }
15
+ interface PendingRetry {
16
+ readonly index: number;
17
+ readonly step: number;
18
+ readonly seq: number;
19
+ readonly phase: 'failed' | 'scheduled' | 'started';
20
+ readonly retryId?: string;
21
+ readonly retry?: number;
7
22
  }
8
23
  interface State {
9
24
  readonly turn: number;
10
25
  readonly value: TurnUsageEvidence;
26
+ readonly pending?: PendingRetry;
11
27
  }
12
28
  interface Match {
13
29
  readonly event: unknown;
@@ -27,12 +43,15 @@ export interface TurnUsageDiagnostic {
27
43
  readonly localPreDispatchBlocks: number;
28
44
  readonly unreportedAttempts: number;
29
45
  readonly incompleteHistory: boolean;
46
+ readonly requestBodyTimeouts?: number;
47
+ readonly timeoutDetails?: readonly TimeoutUsageDetail[];
30
48
  }
31
49
  /** Native completed-tail evidence gates the notice; native totals are never replaced. */
32
50
  export declare function turnUsageDiagnostic(turn: number, tail: unknown, evidence: unknown, copilot: boolean): TurnUsageDiagnostic | undefined;
33
- /** Diagnostic event counts only, not a competing usage total or billing projection. */
51
+ /** Bounded diagnostic evidence, not a competing usage total or billing projection. */
34
52
  export declare const turnUsageEvidenceDefinition: {
35
53
  kind: string;
54
+ stateVersion: number;
36
55
  match(event: unknown): {
37
56
  id: string;
38
57
  role: "start" | "update";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dsh-github-copilot",
3
3
  "description": "DSH companion for GitHub Copilot sign-in, account-aware model profiles, tool compatibility, and provider-hosted search.",
4
- "version": "0.4.0-alpha.84",
4
+ "version": "0.4.0-alpha.85",
5
5
  "publishConfig": {
6
6
  "access": "public",
7
7
  "registry": "https://registry.npmjs.org/",