dsh-github-copilot 0.4.1 → 0.4.2-alpha.10
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 +26 -3
- package/CHANGELOG.md +108 -0
- package/README.md +61 -21
- package/README.zh.md +46 -17
- package/deployment-baseline.json +25 -2
- package/docs/auto-high-cost.md +20 -8
- package/docs/auto-iteration-review.json +12 -12
- package/docs/auto-task-routing.md +85 -10
- package/docs/copilot-accounts.md +6 -0
- package/docs/copilot-compaction.md +1 -1
- package/docs/plugin-diagnostics.md +159 -6
- package/lib/client.js +774 -52
- package/lib/client.js.map +1 -1
- package/lib/diagnostics-analysis.js +4 -2
- package/lib/diagnostics-types-C1BD6ayS.js +655 -0
- package/lib/index.js +1816 -1050
- package/lib/manual-compaction-recovery.js +1 -1
- package/lib/remote.js +253 -1
- package/lib/routed-web.js +1 -1
- package/lib/types/auto-allocation-diagnostics.d.ts +126 -0
- package/lib/types/auto-assessment-evidence.d.ts +32 -0
- package/lib/types/auto-model-host.d.ts +1 -0
- package/lib/types/auto-task-assessment.d.ts +1 -0
- package/lib/types/auto-task-classifier.d.ts +2 -1
- package/lib/types/compaction-continuation.d.ts +1 -1
- package/lib/types/config.d.ts +18 -2
- package/lib/types/context-evidence.d.ts +4 -4
- package/lib/types/copilot-auth.d.ts +2 -1
- package/lib/types/copilot-usage-remote.d.ts +1 -1
- package/lib/types/diagnostics-analysis.d.ts +3 -2
- package/lib/types/diagnostics-card.d.ts +1 -0
- package/lib/types/diagnostics-collector.d.ts +14 -0
- package/lib/types/diagnostics-host.d.ts +114 -3
- package/lib/types/diagnostics-remote.d.ts +11 -9
- package/lib/types/diagnostics-types.d.ts +486 -30
- package/lib/types/native-settings-style.d.ts +1 -1
- package/lib/types/preview-provider.d.ts +8 -2
- package/lib/types/preview-route.d.ts +1 -1
- package/lib/types/remote.d.ts +1 -1
- package/lib/types/request-body-composition.d.ts +17 -0
- package/lib/types/request-body-evidence.d.ts +2 -1
- package/lib/types/request-diagnostics.d.ts +278 -0
- package/lib/types/session-continuation-types.d.ts +2 -2
- package/lib/types/turn-selection.d.ts +18 -1
- package/package.json +2 -2
- package/lib/diagnostics-types-FVf6zjob.js +0 -182
|
@@ -44,6 +44,7 @@ export declare const DiagnosticsAnalysisReportSchema: z.ZodObject<{
|
|
|
44
44
|
"no-calibrated-alert-thresholds": "no-calibrated-alert-thresholds";
|
|
45
45
|
"no-baseline-trend": "no-baseline-trend";
|
|
46
46
|
"no-root-cause-proof": "no-root-cause-proof";
|
|
47
|
+
"request-observations-not-analyzed": "request-observations-not-analyzed";
|
|
47
48
|
}>>;
|
|
48
49
|
collection: z.ZodObject<{
|
|
49
50
|
enabled: z.ZodNullable<z.ZodBoolean>;
|
|
@@ -194,6 +195,7 @@ export declare const DiagnosticsAnalysisReportSchema: z.ZodObject<{
|
|
|
194
195
|
}>;
|
|
195
196
|
stage: z.ZodEnum<{
|
|
196
197
|
ended: "ended";
|
|
198
|
+
dispatched: "dispatched";
|
|
197
199
|
admitted: "admitted";
|
|
198
200
|
"rpc-invoked": "rpc-invoked";
|
|
199
201
|
"host-received": "host-received";
|
|
@@ -209,7 +211,6 @@ export declare const DiagnosticsAnalysisReportSchema: z.ZodObject<{
|
|
|
209
211
|
"cache-hit": "cache-hit";
|
|
210
212
|
"joined-flight": "joined-flight";
|
|
211
213
|
cooldown: "cooldown";
|
|
212
|
-
dispatched: "dispatched";
|
|
213
214
|
}>;
|
|
214
215
|
bucket: z.ZodNumber;
|
|
215
216
|
count: z.ZodNumber;
|
|
@@ -236,8 +237,8 @@ export declare const DiagnosticsAnalysisReportSchema: z.ZodObject<{
|
|
|
236
237
|
}>;
|
|
237
238
|
metric: z.ZodEnum<{
|
|
238
239
|
unknown: "unknown";
|
|
239
|
-
"environment-fault": "environment-fault";
|
|
240
240
|
failed: "failed";
|
|
241
|
+
"environment-fault": "environment-fault";
|
|
241
242
|
}>;
|
|
242
243
|
reason: z.ZodEnum<{
|
|
243
244
|
none: "none";
|
|
@@ -6,6 +6,7 @@ export declare function DiagnosticsCard({ remote }: {
|
|
|
6
6
|
}): import("react").DetailedReactHTMLElement<{
|
|
7
7
|
'aria-label': string;
|
|
8
8
|
'data-copilot-native-ui': boolean;
|
|
9
|
+
'data-copilot-diagnostics': boolean;
|
|
9
10
|
style: CSSProperties;
|
|
10
11
|
}, HTMLElement>;
|
|
11
12
|
//# sourceMappingURL=diagnostics-card.d.ts.map
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { DiagnosticsOperation, DiagnosticsStage, DiagnosticsOutcome, DiagnosticsReason, DiagnosticsRow, DiagnosticsSnapshot } from './diagnostics-types.ts';
|
|
2
|
+
import type { AutoSelectionExplanation } from './auto-model-routing.ts';
|
|
3
|
+
import type { RequestDiagnosticHandle, RequestDiagnosticStart, CredentialChangeHandle } from './request-diagnostics.ts';
|
|
2
4
|
export interface DiagnosticsHandle {
|
|
3
5
|
stage(stage: DiagnosticsStage): void;
|
|
4
6
|
finish(outcome: DiagnosticsOutcome, reason?: DiagnosticsReason): void;
|
|
@@ -14,7 +16,13 @@ export declare class DiagnosticsCollector {
|
|
|
14
16
|
private data;
|
|
15
17
|
private readonly live;
|
|
16
18
|
private enabled;
|
|
19
|
+
private autoAllocationEnabled;
|
|
20
|
+
private requestEnabled;
|
|
21
|
+
private readonly requestHandles;
|
|
22
|
+
private readonly credentialHandles;
|
|
23
|
+
private requestGeneration;
|
|
17
24
|
private lastWall;
|
|
25
|
+
private readonly autoAllocation;
|
|
18
26
|
constructor(version: string, layer: 'client' | 'host', changed?: () => void, wall?: () => number, mono?: () => number);
|
|
19
27
|
restore(snapshot: DiagnosticsSnapshot): void;
|
|
20
28
|
setEnabled(enabled: boolean): void;
|
|
@@ -29,8 +37,14 @@ export declare class DiagnosticsCollector {
|
|
|
29
37
|
private oldestIndex;
|
|
30
38
|
snapshot(): DiagnosticsSnapshot;
|
|
31
39
|
close(): void;
|
|
40
|
+
setRequestEnabled(enabled: boolean): void;
|
|
41
|
+
beginCredentialChange(): CredentialChangeHandle | undefined;
|
|
42
|
+
beginRequest(start: RequestDiagnosticStart): RequestDiagnosticHandle | undefined;
|
|
43
|
+
isRequestEnabled(): boolean;
|
|
32
44
|
noteDropped(): void;
|
|
33
45
|
noteClientGaps(dropped: number, unconfirmed: number): void;
|
|
46
|
+
recordAutoAllocation(explanation: AutoSelectionExplanation): void;
|
|
47
|
+
setAutoAllocationEnabled(enabled: boolean): void;
|
|
34
48
|
mergeClient(rows: readonly DiagnosticsRow[]): void;
|
|
35
49
|
}
|
|
36
50
|
//# sourceMappingURL=diagnostics-collector.d.ts.map
|
|
@@ -19,8 +19,8 @@ export declare const diagnosticsDomain: {
|
|
|
19
19
|
version: string;
|
|
20
20
|
layer: "client" | "host";
|
|
21
21
|
operation: "compaction" | "account-global-switch" | "account-session-select" | "account-session-inherit" | "identity-read" | "identity-flight" | "compaction-summary" | "collection";
|
|
22
|
-
stage: "ended" | "admitted" | "rpc-invoked" | "host-received" | "identity-validation" | "model-validation" | "cas" | "readback" | "response-received" | "decoded" | "client-settled" | "summary-attempt" | "checkpoint-committed" | "cache-hit" | "joined-flight" | "cooldown"
|
|
23
|
-
metric: "paused" | "unknown" | "
|
|
22
|
+
stage: "ended" | "dispatched" | "admitted" | "rpc-invoked" | "host-received" | "identity-validation" | "model-validation" | "cas" | "readback" | "response-received" | "decoded" | "client-settled" | "summary-attempt" | "checkpoint-committed" | "cache-hit" | "joined-flight" | "cooldown";
|
|
23
|
+
metric: "paused" | "unknown" | "success" | "stage" | "failed" | "dropped" | "expired" | "cancelled" | "revoked" | "interrupted" | "started" | "no-op" | "policy-rejected" | "environment-fault" | "clock-discontinuity" | "pending-sample";
|
|
24
24
|
reason: "none" | "COPILOT_ACCOUNTS_SETTINGS_UNAVAILABLE" | "COPILOT_ACCOUNTS_CHANGED" | "COPILOT_ACCOUNTS_BUSY" | "COPILOT_ACCOUNTS_CONFLICT" | "COPILOT_ACCOUNTS_COMMIT_UNCERTAIN" | "COPILOT_ACCOUNTS_MODELS_FAILED" | "COPILOT_ACCOUNTS_IDENTITY_UNAVAILABLE" | "COPILOT_ACCOUNTS_IDENTITY_INVALID" | "COPILOT_ACCOUNTS_IDENTITY_TIMEOUT" | "COPILOT_ACCOUNTS_IDENTITY_TLS" | "COPILOT_ACCOUNTS_IDENTITY_NETWORK" | "COPILOT_ACCOUNTS_IDENTITY_AUTH_REJECTED" | "COPILOT_ACCOUNTS_IDENTITY_RATE_LIMITED" | "COPILOT_ACCOUNTS_IDENTITY_HTTP_ERROR" | "unknown" | "rpc-unavailable" | "decode-invalid" | "COPILOT_SESSION_ACCOUNTS_UNAVAILABLE" | "COPILOT_SESSION_ACCOUNTS_SETTINGS_UNAVAILABLE" | "COPILOT_SESSION_ACCOUNTS_COMMIT_UNCERTAIN" | "COPILOT_RESPONSES_REPLAY_SCOPE_MISMATCH" | "CONTEXT_WINDOW_EXCEEDED" | "COPILOT_MANUAL_RECOVERY_FIXED_PREFIX" | "COPILOT_MANUAL_RECOVERY_INDIVISIBLE" | "COPILOT_MANUAL_RECOVERY_CALL_LIMIT" | "COPILOT_MANUAL_RECOVERY_EMPTY_SUMMARY" | "COPILOT_MANUAL_RECOVERY_UNBALANCED";
|
|
25
25
|
bucket: number;
|
|
26
26
|
count: number;
|
|
@@ -28,7 +28,7 @@ export declare const diagnosticsDomain: {
|
|
|
28
28
|
pending: {
|
|
29
29
|
version: string;
|
|
30
30
|
operation: "compaction" | "account-global-switch" | "account-session-select" | "account-session-inherit" | "identity-read" | "identity-flight" | "compaction-summary" | "collection";
|
|
31
|
-
stage: "ended" | "admitted" | "rpc-invoked" | "host-received" | "identity-validation" | "model-validation" | "cas" | "readback" | "response-received" | "decoded" | "client-settled" | "summary-attempt" | "checkpoint-committed" | "cache-hit" | "joined-flight" | "cooldown"
|
|
31
|
+
stage: "ended" | "dispatched" | "admitted" | "rpc-invoked" | "host-received" | "identity-validation" | "model-validation" | "cas" | "readback" | "response-received" | "decoded" | "client-settled" | "summary-attempt" | "checkpoint-committed" | "cache-hit" | "joined-flight" | "cooldown";
|
|
32
32
|
bucket: number;
|
|
33
33
|
count: number;
|
|
34
34
|
}[];
|
|
@@ -38,6 +38,113 @@ export declare const diagnosticsDomain: {
|
|
|
38
38
|
saturated: number;
|
|
39
39
|
evicted: number;
|
|
40
40
|
interrupted: number;
|
|
41
|
+
autoAllocation?: {
|
|
42
|
+
status: "observed" | "not-collected";
|
|
43
|
+
rows: {
|
|
44
|
+
day: number;
|
|
45
|
+
version: string;
|
|
46
|
+
policyVersion: string;
|
|
47
|
+
modelId: string;
|
|
48
|
+
targetCategory: "powerful" | "versatile" | "lightweight";
|
|
49
|
+
category: "unknown" | "powerful" | "versatile" | "lightweight";
|
|
50
|
+
demand: "unknown" | "simple" | "routine" | "complex";
|
|
51
|
+
assessmentSource: "local" | "semantic";
|
|
52
|
+
method: "weighted-distribution" | "only-candidate";
|
|
53
|
+
fallback: boolean;
|
|
54
|
+
highCost: boolean;
|
|
55
|
+
previous: boolean;
|
|
56
|
+
weight: number;
|
|
57
|
+
opportunities: number;
|
|
58
|
+
expectedSelections: number;
|
|
59
|
+
selections: number;
|
|
60
|
+
assessmentOutcome?: "disabled" | "unavailable" | "context-omitted" | "invalid-result" | "timeout" | "failed" | "local-known" | "local-unknown" | "semantic-known" | "semantic-unknown" | undefined;
|
|
61
|
+
}[];
|
|
62
|
+
noFitRows: {
|
|
63
|
+
day: number;
|
|
64
|
+
version: string;
|
|
65
|
+
policyVersion: string;
|
|
66
|
+
targetCategory: "powerful" | "versatile" | "lightweight";
|
|
67
|
+
category: "unknown" | "powerful" | "versatile" | "lightweight";
|
|
68
|
+
demand: "unknown" | "simple" | "routine" | "complex";
|
|
69
|
+
assessmentSource: "local" | "semantic";
|
|
70
|
+
decisions: number;
|
|
71
|
+
assessmentOutcome?: "disabled" | "unavailable" | "context-omitted" | "invalid-result" | "timeout" | "failed" | "local-known" | "local-unknown" | "semantic-known" | "semantic-unknown" | undefined;
|
|
72
|
+
}[];
|
|
73
|
+
observationStart: number | null;
|
|
74
|
+
observationEnd: number | null;
|
|
75
|
+
completeHistory: false;
|
|
76
|
+
rowsTruncated: boolean;
|
|
77
|
+
dropped: number;
|
|
78
|
+
expired: number;
|
|
79
|
+
saturated: number;
|
|
80
|
+
restarts: number;
|
|
81
|
+
} | undefined;
|
|
82
|
+
requests?: {
|
|
83
|
+
rows: {
|
|
84
|
+
streamId: string;
|
|
85
|
+
dispatchIndex: number;
|
|
86
|
+
version: string;
|
|
87
|
+
startedAt: number;
|
|
88
|
+
elapsedMs: number;
|
|
89
|
+
model: string;
|
|
90
|
+
protocol: "openai-completions" | "openai-responses" | "anthropic-messages";
|
|
91
|
+
composition: {
|
|
92
|
+
state: "complete";
|
|
93
|
+
totalBytes: number;
|
|
94
|
+
conversationBytes: number;
|
|
95
|
+
toolSchemaBytes: number;
|
|
96
|
+
systemBytes: number;
|
|
97
|
+
otherBytes: number;
|
|
98
|
+
imageBlockBytes: number;
|
|
99
|
+
opaqueReplayBytes: number;
|
|
100
|
+
remainingConversationBytes: number;
|
|
101
|
+
} | {
|
|
102
|
+
state: "unavailable" | "work-limit" | "size-limit" | "invalid-json" | "unsupported-shape" | "cancelled" | "time-limit";
|
|
103
|
+
totalBytes?: number | undefined;
|
|
104
|
+
};
|
|
105
|
+
encoding: "unknown" | "identity" | "gzip";
|
|
106
|
+
outcome: "cancelled" | "http-error" | "transport-error" | "stream-done" | "stream-error" | "interrupted";
|
|
107
|
+
reason: "none" | "unknown" | "request-body-timeout" | "caller-abort" | "credential-changed" | "disposed" | "byte-idle-timeout" | "signal-abort";
|
|
108
|
+
wireBytes?: number | undefined;
|
|
109
|
+
upload?: {
|
|
110
|
+
state: "observed";
|
|
111
|
+
bodyWrite: "observed" | "not-observed";
|
|
112
|
+
alpn: "h2" | "unavailable" | "http/1.1";
|
|
113
|
+
bodyWriteCompleteMs?: number | undefined;
|
|
114
|
+
nativeResponseHeadersMs?: number | undefined;
|
|
115
|
+
nodeWritableBufferBytes?: number | undefined;
|
|
116
|
+
} | {
|
|
117
|
+
state: "unavailable" | "work-limit";
|
|
118
|
+
} | {
|
|
119
|
+
state: "ambiguous";
|
|
120
|
+
requestCount: number;
|
|
121
|
+
} | undefined;
|
|
122
|
+
responseHeadersMs?: number | undefined;
|
|
123
|
+
httpStatus?: number | undefined;
|
|
124
|
+
}[];
|
|
125
|
+
dropped: number;
|
|
126
|
+
evicted: number;
|
|
127
|
+
pending?: number | undefined;
|
|
128
|
+
interruptedOnReopen?: number | undefined;
|
|
129
|
+
credentialChanges?: {
|
|
130
|
+
rows: {
|
|
131
|
+
changeId: string;
|
|
132
|
+
observedAt: number;
|
|
133
|
+
version: string;
|
|
134
|
+
phase: "notification" | "commit";
|
|
135
|
+
reason: "expired" | "qualified" | "unknown-source" | "account-changed" | "endpoint-changed" | "entitlements-changed" | "auth-mismatch" | "duplicate-notification" | "missing-notification" | "commit-mismatch" | "write-failed" | "write-conflict";
|
|
136
|
+
preparing: number;
|
|
137
|
+
dispatched: number;
|
|
138
|
+
alreadyAborted: number;
|
|
139
|
+
preserved: number;
|
|
140
|
+
revoked: number;
|
|
141
|
+
}[];
|
|
142
|
+
dropped: number;
|
|
143
|
+
evicted: number;
|
|
144
|
+
pending?: number | undefined;
|
|
145
|
+
interruptedOnReopen?: number | undefined;
|
|
146
|
+
} | undefined;
|
|
147
|
+
} | undefined;
|
|
41
148
|
}>;
|
|
42
149
|
};
|
|
43
150
|
export declare function diagnosticsDomainForProfile(profileId: string): typeof diagnosticsDomain;
|
|
@@ -54,6 +161,8 @@ export declare class DiagnosticsController extends TypertRemoteService {
|
|
|
54
161
|
private state;
|
|
55
162
|
private problem;
|
|
56
163
|
private enabled;
|
|
164
|
+
private autoAllocationEnabled;
|
|
165
|
+
private requestEnabled;
|
|
57
166
|
private dirty;
|
|
58
167
|
private persistedAt;
|
|
59
168
|
private revision;
|
|
@@ -65,7 +174,9 @@ export declare class DiagnosticsController extends TypertRemoteService {
|
|
|
65
174
|
flush(): Promise<void>;
|
|
66
175
|
markCompactionCancelled(session: object): void;
|
|
67
176
|
get(): DiagnosticsView;
|
|
177
|
+
setRequestEnabled(enabled: boolean): Promise<DiagnosticsView>;
|
|
68
178
|
setEnabled(enabled: boolean): Promise<DiagnosticsView>;
|
|
179
|
+
setAutoAllocationEnabled(enabled: boolean): Promise<DiagnosticsView>;
|
|
69
180
|
clear(): Promise<DiagnosticsView>;
|
|
70
181
|
recordClient(batch: ClientDiagnosticsBatch): Promise<DiagnosticsView>;
|
|
71
182
|
}
|
|
@@ -22,6 +22,7 @@ export declare const ClientDiagnosticsBatchSchema: z.ZodObject<{
|
|
|
22
22
|
}>;
|
|
23
23
|
stage: z.ZodEnum<{
|
|
24
24
|
ended: "ended";
|
|
25
|
+
dispatched: "dispatched";
|
|
25
26
|
admitted: "admitted";
|
|
26
27
|
"rpc-invoked": "rpc-invoked";
|
|
27
28
|
"host-received": "host-received";
|
|
@@ -37,23 +38,22 @@ export declare const ClientDiagnosticsBatchSchema: z.ZodObject<{
|
|
|
37
38
|
"cache-hit": "cache-hit";
|
|
38
39
|
"joined-flight": "joined-flight";
|
|
39
40
|
cooldown: "cooldown";
|
|
40
|
-
dispatched: "dispatched";
|
|
41
41
|
}>;
|
|
42
42
|
metric: z.ZodEnum<{
|
|
43
43
|
paused: "paused";
|
|
44
44
|
unknown: "unknown";
|
|
45
|
-
started: "started";
|
|
46
|
-
stage: "stage";
|
|
47
45
|
success: "success";
|
|
48
|
-
|
|
49
|
-
cancelled: "cancelled";
|
|
50
|
-
"policy-rejected": "policy-rejected";
|
|
51
|
-
revoked: "revoked";
|
|
52
|
-
"environment-fault": "environment-fault";
|
|
46
|
+
stage: "stage";
|
|
53
47
|
failed: "failed";
|
|
54
|
-
interrupted: "interrupted";
|
|
55
48
|
dropped: "dropped";
|
|
56
49
|
expired: "expired";
|
|
50
|
+
cancelled: "cancelled";
|
|
51
|
+
revoked: "revoked";
|
|
52
|
+
interrupted: "interrupted";
|
|
53
|
+
started: "started";
|
|
54
|
+
"no-op": "no-op";
|
|
55
|
+
"policy-rejected": "policy-rejected";
|
|
56
|
+
"environment-fault": "environment-fault";
|
|
57
57
|
"clock-discontinuity": "clock-discontinuity";
|
|
58
58
|
"pending-sample": "pending-sample";
|
|
59
59
|
}>;
|
|
@@ -99,6 +99,8 @@ declare module '@deepseek-ai/dsh-typert-protocol' {
|
|
|
99
99
|
githubCopilotDiagnostics: {
|
|
100
100
|
get(): Promise<RemoteResult<DiagnosticsView>>;
|
|
101
101
|
setEnabled(enabled: boolean): Promise<RemoteResult<DiagnosticsView>>;
|
|
102
|
+
setAutoAllocationEnabled(enabled: boolean): Promise<RemoteResult<DiagnosticsView>>;
|
|
103
|
+
setRequestEnabled(enabled: boolean): Promise<RemoteResult<DiagnosticsView>>;
|
|
102
104
|
clear(): Promise<RemoteResult<DiagnosticsView>>;
|
|
103
105
|
recordClient(batch: ClientDiagnosticsBatch): Promise<RemoteResult<DiagnosticsView>>;
|
|
104
106
|
};
|