dsh-github-copilot 0.4.0-alpha.84 → 0.4.0-alpha.86
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/AGENTS.md +6 -4
- package/CHANGELOG.md +6 -0
- package/README.md +9 -9
- package/README.zh.md +9 -9
- package/deployment-baseline.json +10 -4
- package/docs/auto-task-routing.md +15 -9
- package/docs/automatic-model-routing.md +3 -2
- package/docs/copilot-usage.md +6 -2
- package/lib/client.js +79 -8
- package/lib/client.js.map +1 -1
- package/lib/index.js +9 -4
- package/lib/types/config.d.ts +1 -1
- package/lib/types/request-body-timeout-marker.d.ts +2 -0
- package/lib/types/turn-usage-evidence.d.ts +20 -1
- package/package.json +1 -1
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.
|
|
1850
|
+
var version = "0.4.0-alpha.86";
|
|
1851
1851
|
//#endregion
|
|
1852
1852
|
//#region lib/types/probe.js
|
|
1853
1853
|
/**
|
|
@@ -2214,7 +2214,7 @@ const Config = z.object({
|
|
|
2214
2214
|
accountModelFailureCooldownMs: z.number().step(1).min(0).max(MAX_TIMEOUT_MS).default(3e5),
|
|
2215
2215
|
excludedModelIds: z.array(z.string()).default([]).hidden().volatile(),
|
|
2216
2216
|
followParentModel: z.boolean().default(false).volatile(),
|
|
2217
|
-
autoSemanticAssessment: z.boolean().default(
|
|
2217
|
+
autoSemanticAssessment: z.boolean().default(true),
|
|
2218
2218
|
parentModelFollow: z.array(z.object({
|
|
2219
2219
|
childSessionId: z.string().min(1),
|
|
2220
2220
|
parentSessionId: z.string().min(1)
|
|
@@ -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
|
-
|
|
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
|
|
@@ -8852,7 +8857,7 @@ function apply$1(ctx, config = {}) {
|
|
|
8852
8857
|
budgetPolicy: () => budgetSettings(),
|
|
8853
8858
|
parentModelBindings: () => cacheSettings().parentModelFollow ?? [],
|
|
8854
8859
|
followParentModel: () => cacheSettings().followParentModel === true,
|
|
8855
|
-
semanticAssessment: () => cacheSettings().autoSemanticAssessment
|
|
8860
|
+
semanticAssessment: () => cacheSettings().autoSemanticAssessment ?? true,
|
|
8856
8861
|
assessmentDiagnostic: (code) => ctx.logger.warn(code),
|
|
8857
8862
|
async classifyTask(input, signal) {
|
|
8858
8863
|
const snapshot = await discoverSnapshot({ signal });
|
package/lib/types/config.d.ts
CHANGED
|
@@ -43,7 +43,7 @@ export interface InlineConfig {
|
|
|
43
43
|
parentModelFollow?: ParentModelBinding[];
|
|
44
44
|
/** Profile-wide next-turn policy for supported native children. */
|
|
45
45
|
followParentModel?: boolean;
|
|
46
|
-
/**
|
|
46
|
+
/** Default-on bounded task assessment; explicit false opts out of auxiliary inference. */
|
|
47
47
|
autoSemanticAssessment?: boolean;
|
|
48
48
|
/** Estimated managed-route input headroom, separate from truthful catalog capacities. */
|
|
49
49
|
requestBudgetSafetyTokens?: number;
|
|
@@ -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
|
-
/**
|
|
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.
|
|
4
|
+
"version": "0.4.0-alpha.86",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
7
7
|
"registry": "https://registry.npmjs.org/",
|