dsh-github-copilot 0.4.0 → 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 +34 -3
- package/CHANGELOG.md +120 -0
- package/README.md +63 -21
- package/README.zh.md +48 -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 +39 -0
- package/docs/copilot-compaction.md +1 -1
- package/docs/npm-distribution.md +9 -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 +1894 -1046
- 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 +7 -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 +9 -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 +12 -11
- package/lib/diagnostics-types-FVf6zjob.js +0 -182
|
@@ -4,6 +4,7 @@ import type { CoreCompatibleProvider } from './pi-provider-bridge.ts';
|
|
|
4
4
|
import type { GitHubCopilotOAuthCredential } from './copilot-grant.ts';
|
|
5
5
|
import { CopilotResponsesReplayError } from './responses-replay-compat.ts';
|
|
6
6
|
import type { ResponsesRetryReplay } from './responses-replay-compat.ts';
|
|
7
|
+
import type { RequestDiagnosticHandle, RequestDiagnosticStart } from './request-diagnostics.ts';
|
|
7
8
|
import { CopilotStreamIdleError, CopilotStreamLiveness } from './copilot-stream-liveness.ts';
|
|
8
9
|
export type ManagedWireAbortCode = 'COPILOT_PREVIEW_CREDENTIAL_CHANGED' | 'COPILOT_PREVIEW_DISPOSED';
|
|
9
10
|
/** Identity, not upstream error text, proves that the plugin revoked this wire. */
|
|
@@ -19,6 +20,7 @@ export interface PreviewProviderGuard {
|
|
|
19
20
|
beforeWire(model: Model<Api>, options?: StreamOptions): Promise<{
|
|
20
21
|
signal: AbortSignal;
|
|
21
22
|
release(): void;
|
|
23
|
+
dispatch?(): void;
|
|
22
24
|
}>;
|
|
23
25
|
/** Actual model HTTP 401, excluding proven Responses replay-scope failures; no request replay. */
|
|
24
26
|
onUnauthorized?(): void;
|
|
@@ -32,6 +34,11 @@ export interface PreviewProviderGuard {
|
|
|
32
34
|
readonly streamIdleTimeoutMs?: number;
|
|
33
35
|
onStreamLiveness?(control: Pick<CopilotStreamLiveness, 'pause' | 'resume'>): void;
|
|
34
36
|
onStreamIdleTimeout?(error: CopilotStreamIdleError): void;
|
|
37
|
+
requestDiagnostics?: {
|
|
38
|
+
enabled(): boolean;
|
|
39
|
+
begin(start: RequestDiagnosticStart): RequestDiagnosticHandle | undefined;
|
|
40
|
+
failed(): void;
|
|
41
|
+
};
|
|
35
42
|
}
|
|
36
43
|
/** Guard for one selected model in an account-bound descriptor snapshot. */
|
|
37
44
|
export interface AccountProviderGuard extends PreviewProviderGuard {
|
|
@@ -61,9 +68,9 @@ export type AccountPiModel = Model<AccountModelApi> & {
|
|
|
61
68
|
};
|
|
62
69
|
export declare function copilotPublicHeaders(): Readonly<Record<string, string>>;
|
|
63
70
|
/** Materialize advertised capabilities only; model names and the local static catalog never select the API. */
|
|
64
|
-
export declare function accountModelFromDescriptor(descriptor: AccountModelDescriptor, baseURL: string): AccountPiModel;
|
|
71
|
+
export declare function accountModelFromDescriptor(descriptor: AccountModelDescriptor, baseURL: string, classifierReasoningOff?: boolean): AccountPiModel;
|
|
65
72
|
/** Create a descriptor-driven, OAuth-only provider using native SDK serialization for all supported endpoints. */
|
|
66
|
-
export declare function createAccountProvider(descriptors: readonly AccountModelDescriptor[], guard: AccountProviderGuard, baseURL: string): {
|
|
73
|
+
export declare function createAccountProvider(descriptors: readonly AccountModelDescriptor[], guard: AccountProviderGuard, baseURL: string, classifierReasoningOff?: boolean): {
|
|
67
74
|
provider: CoreCompatibleProvider;
|
|
68
75
|
models: readonly AccountPiModel[];
|
|
69
76
|
};
|
|
@@ -10,7 +10,7 @@ import type { RequestBudgetPolicy } from './request-budget.ts';
|
|
|
10
10
|
export type PreviewRouteConfig = Pick<PiAiProviderProfile, 'reasoning' | 'cacheRetention' | 'transport' | 'timeoutMs' | 'websocketConnectTimeoutMs' | 'streamIdleTimeoutMs' | 'maxRequestImageBytes' | 'requestImagePixelBudget' | 'requestImageMaxBytes' | 'retryPolicy'> & Pick<InlineConfig, 'accountModelTtlMs' | 'accountModelFailureCooldownMs'> & {
|
|
11
11
|
readonly streamLiveness?: boolean;
|
|
12
12
|
readonly chatRequestSettings?: () => Pick<InlineConfig, 'chatStreamIdleTimeoutMs' | 'chatStreamLiveness' | 'chatMaxRequestImageBytes' | 'responsesRequestCompression' | 'responsesOmitTemperature'>;
|
|
13
|
-
readonly accountModelSettings?: () => Pick<InlineConfig, 'accountModelTtlMs' | 'accountModelFailureCooldownMs' | 'excludedModelIds' | 'highCostModelIds' | 'parentModelFollow' | 'followParentModel' | 'autoSemanticAssessment' | 'autoAllocationEvidence'>;
|
|
13
|
+
readonly accountModelSettings?: () => Pick<InlineConfig, 'accountModelTtlMs' | 'accountModelFailureCooldownMs' | 'excludedModelIds' | 'highCostModelIds' | 'parentModelFollow' | 'followParentModel' | 'autoSemanticAssessment' | 'autoSemanticAssessmentTimeoutMs' | 'autoSemanticAssessmentModel' | 'autoAllocationEvidence'>;
|
|
14
14
|
readonly requestBudget?: Partial<RequestBudgetPolicy>;
|
|
15
15
|
readonly requestBudgetSettings?: () => Partial<RequestBudgetPolicy>;
|
|
16
16
|
};
|
package/lib/types/remote.d.ts
CHANGED
|
@@ -56,10 +56,10 @@ export declare const GitHubCopilotAuthorizationViewSchema: z.ZodObject<{
|
|
|
56
56
|
error: "error";
|
|
57
57
|
ready: "ready";
|
|
58
58
|
unavailable: "unavailable";
|
|
59
|
+
disposed: "disposed";
|
|
59
60
|
loading: "loading";
|
|
60
61
|
idle: "idle";
|
|
61
62
|
stale: "stale";
|
|
62
|
-
disposed: "disposed";
|
|
63
63
|
unconfigured: "unconfigured";
|
|
64
64
|
}>;
|
|
65
65
|
models: z.ZodArray<z.ZodObject<{
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { RequestBodyEvidence, RequestBodyProtocol } from './request-body-evidence.ts';
|
|
2
|
+
export declare const REQUEST_BODY_COMPOSITION_LIMITS: Readonly<{
|
|
3
|
+
bytes: number;
|
|
4
|
+
sliceCharacters: 65536;
|
|
5
|
+
elapsedMs: 2000;
|
|
6
|
+
concurrent: 4;
|
|
7
|
+
values: 65536;
|
|
8
|
+
tokens: 131072;
|
|
9
|
+
depth: 64;
|
|
10
|
+
keyCharacters: 128;
|
|
11
|
+
}>;
|
|
12
|
+
/** Only bounded keys/discriminators are decoded; payload values never form an object graph. */
|
|
13
|
+
export declare function requestBodyComposition(payload: string | undefined, protocol: RequestBodyProtocol, options?: {
|
|
14
|
+
signal?: AbortSignal;
|
|
15
|
+
isCurrent?: () => boolean;
|
|
16
|
+
}): Promise<RequestBodyEvidence>;
|
|
17
|
+
//# sourceMappingURL=request-body-composition.d.ts.map
|
|
@@ -20,11 +20,12 @@ export type RequestBodyEvidence = {
|
|
|
20
20
|
readonly opaqueReplayBytes: number;
|
|
21
21
|
readonly remainingConversationBytes: number;
|
|
22
22
|
} | {
|
|
23
|
-
readonly state: 'unavailable' | 'size-limit' | 'work-limit' | 'invalid-json' | 'unsupported-shape';
|
|
23
|
+
readonly state: 'unavailable' | 'size-limit' | 'work-limit' | 'invalid-json' | 'unsupported-shape' | 'cancelled' | 'time-limit';
|
|
24
24
|
readonly totalBytes?: number;
|
|
25
25
|
};
|
|
26
26
|
export interface RequestBodyDispatchEvidence {
|
|
27
27
|
readonly protocol: RequestBodyProtocol;
|
|
28
|
+
readonly composition?: Promise<RequestBodyEvidence>;
|
|
28
29
|
/** Fetch invocation to response headers, not upload duration or clone-observation time. */
|
|
29
30
|
readonly responseHeadersMs: number;
|
|
30
31
|
readonly upload?: RequestUploadEvidence;
|
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { RequestBodyEvidence } from './request-body-evidence.ts';
|
|
3
|
+
import type { RequestUploadEvidence } from './request-upload-evidence.ts';
|
|
4
|
+
export declare const REQUEST_DIAGNOSTICS_MAX_ROWS = 128;
|
|
5
|
+
export declare const REQUEST_DIAGNOSTICS_RETENTION_MS: number;
|
|
6
|
+
export declare const CredentialChangeReasonSchema: z.ZodEnum<{
|
|
7
|
+
expired: "expired";
|
|
8
|
+
qualified: "qualified";
|
|
9
|
+
"unknown-source": "unknown-source";
|
|
10
|
+
"account-changed": "account-changed";
|
|
11
|
+
"endpoint-changed": "endpoint-changed";
|
|
12
|
+
"entitlements-changed": "entitlements-changed";
|
|
13
|
+
"auth-mismatch": "auth-mismatch";
|
|
14
|
+
"duplicate-notification": "duplicate-notification";
|
|
15
|
+
"missing-notification": "missing-notification";
|
|
16
|
+
"commit-mismatch": "commit-mismatch";
|
|
17
|
+
"write-failed": "write-failed";
|
|
18
|
+
"write-conflict": "write-conflict";
|
|
19
|
+
}>;
|
|
20
|
+
export declare const CredentialChangeSchema: z.ZodObject<{
|
|
21
|
+
changeId: z.ZodString;
|
|
22
|
+
observedAt: z.ZodNumber;
|
|
23
|
+
version: z.ZodString;
|
|
24
|
+
phase: z.ZodEnum<{
|
|
25
|
+
notification: "notification";
|
|
26
|
+
commit: "commit";
|
|
27
|
+
}>;
|
|
28
|
+
reason: z.ZodEnum<{
|
|
29
|
+
expired: "expired";
|
|
30
|
+
qualified: "qualified";
|
|
31
|
+
"unknown-source": "unknown-source";
|
|
32
|
+
"account-changed": "account-changed";
|
|
33
|
+
"endpoint-changed": "endpoint-changed";
|
|
34
|
+
"entitlements-changed": "entitlements-changed";
|
|
35
|
+
"auth-mismatch": "auth-mismatch";
|
|
36
|
+
"duplicate-notification": "duplicate-notification";
|
|
37
|
+
"missing-notification": "missing-notification";
|
|
38
|
+
"commit-mismatch": "commit-mismatch";
|
|
39
|
+
"write-failed": "write-failed";
|
|
40
|
+
"write-conflict": "write-conflict";
|
|
41
|
+
}>;
|
|
42
|
+
preparing: z.ZodNumber;
|
|
43
|
+
dispatched: z.ZodNumber;
|
|
44
|
+
alreadyAborted: z.ZodNumber;
|
|
45
|
+
preserved: z.ZodNumber;
|
|
46
|
+
revoked: z.ZodNumber;
|
|
47
|
+
}, z.core.$strict>;
|
|
48
|
+
export type CredentialChangeReason = z.infer<typeof CredentialChangeReasonSchema>;
|
|
49
|
+
export type CredentialChangeEvidence = Omit<z.infer<typeof CredentialChangeSchema>, 'changeId' | 'observedAt' | 'version'>;
|
|
50
|
+
export interface CredentialChangeHandle {
|
|
51
|
+
record(evidence: CredentialChangeEvidence): void;
|
|
52
|
+
cancel(): void;
|
|
53
|
+
}
|
|
54
|
+
export declare const RequestDiagnosticSchema: z.ZodObject<{
|
|
55
|
+
streamId: z.ZodString;
|
|
56
|
+
dispatchIndex: z.ZodNumber;
|
|
57
|
+
version: z.ZodString;
|
|
58
|
+
startedAt: z.ZodNumber;
|
|
59
|
+
elapsedMs: z.ZodNumber;
|
|
60
|
+
model: z.ZodString;
|
|
61
|
+
protocol: z.ZodEnum<{
|
|
62
|
+
"openai-completions": "openai-completions";
|
|
63
|
+
"openai-responses": "openai-responses";
|
|
64
|
+
"anthropic-messages": "anthropic-messages";
|
|
65
|
+
}>;
|
|
66
|
+
composition: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
67
|
+
state: z.ZodLiteral<"complete">;
|
|
68
|
+
totalBytes: z.ZodNumber;
|
|
69
|
+
conversationBytes: z.ZodNumber;
|
|
70
|
+
toolSchemaBytes: z.ZodNumber;
|
|
71
|
+
systemBytes: z.ZodNumber;
|
|
72
|
+
otherBytes: z.ZodNumber;
|
|
73
|
+
imageBlockBytes: z.ZodNumber;
|
|
74
|
+
opaqueReplayBytes: z.ZodNumber;
|
|
75
|
+
remainingConversationBytes: z.ZodNumber;
|
|
76
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
77
|
+
state: z.ZodEnum<{
|
|
78
|
+
unavailable: "unavailable";
|
|
79
|
+
"work-limit": "work-limit";
|
|
80
|
+
"size-limit": "size-limit";
|
|
81
|
+
"invalid-json": "invalid-json";
|
|
82
|
+
"unsupported-shape": "unsupported-shape";
|
|
83
|
+
cancelled: "cancelled";
|
|
84
|
+
"time-limit": "time-limit";
|
|
85
|
+
}>;
|
|
86
|
+
totalBytes: z.ZodOptional<z.ZodNumber>;
|
|
87
|
+
}, z.core.$strict>], "state">;
|
|
88
|
+
encoding: z.ZodEnum<{
|
|
89
|
+
unknown: "unknown";
|
|
90
|
+
identity: "identity";
|
|
91
|
+
gzip: "gzip";
|
|
92
|
+
}>;
|
|
93
|
+
wireBytes: z.ZodOptional<z.ZodNumber>;
|
|
94
|
+
upload: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
95
|
+
state: z.ZodLiteral<"observed">;
|
|
96
|
+
bodyWrite: z.ZodEnum<{
|
|
97
|
+
observed: "observed";
|
|
98
|
+
"not-observed": "not-observed";
|
|
99
|
+
}>;
|
|
100
|
+
bodyWriteCompleteMs: z.ZodOptional<z.ZodNumber>;
|
|
101
|
+
nativeResponseHeadersMs: z.ZodOptional<z.ZodNumber>;
|
|
102
|
+
alpn: z.ZodEnum<{
|
|
103
|
+
h2: "h2";
|
|
104
|
+
unavailable: "unavailable";
|
|
105
|
+
"http/1.1": "http/1.1";
|
|
106
|
+
}>;
|
|
107
|
+
nodeWritableBufferBytes: z.ZodOptional<z.ZodNumber>;
|
|
108
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
109
|
+
state: z.ZodEnum<{
|
|
110
|
+
unavailable: "unavailable";
|
|
111
|
+
"work-limit": "work-limit";
|
|
112
|
+
}>;
|
|
113
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
114
|
+
state: z.ZodLiteral<"ambiguous">;
|
|
115
|
+
requestCount: z.ZodNumber;
|
|
116
|
+
}, z.core.$strict>], "state">>;
|
|
117
|
+
responseHeadersMs: z.ZodOptional<z.ZodNumber>;
|
|
118
|
+
httpStatus: z.ZodOptional<z.ZodNumber>;
|
|
119
|
+
outcome: z.ZodEnum<{
|
|
120
|
+
cancelled: "cancelled";
|
|
121
|
+
"http-error": "http-error";
|
|
122
|
+
"transport-error": "transport-error";
|
|
123
|
+
"stream-done": "stream-done";
|
|
124
|
+
"stream-error": "stream-error";
|
|
125
|
+
interrupted: "interrupted";
|
|
126
|
+
}>;
|
|
127
|
+
reason: z.ZodEnum<{
|
|
128
|
+
none: "none";
|
|
129
|
+
unknown: "unknown";
|
|
130
|
+
"request-body-timeout": "request-body-timeout";
|
|
131
|
+
"caller-abort": "caller-abort";
|
|
132
|
+
"credential-changed": "credential-changed";
|
|
133
|
+
disposed: "disposed";
|
|
134
|
+
"byte-idle-timeout": "byte-idle-timeout";
|
|
135
|
+
"signal-abort": "signal-abort";
|
|
136
|
+
}>;
|
|
137
|
+
}, z.core.$strict>;
|
|
138
|
+
export declare const RequestDiagnosticsSchema: z.ZodObject<{
|
|
139
|
+
rows: z.ZodArray<z.ZodObject<{
|
|
140
|
+
streamId: z.ZodString;
|
|
141
|
+
dispatchIndex: z.ZodNumber;
|
|
142
|
+
version: z.ZodString;
|
|
143
|
+
startedAt: z.ZodNumber;
|
|
144
|
+
elapsedMs: z.ZodNumber;
|
|
145
|
+
model: z.ZodString;
|
|
146
|
+
protocol: z.ZodEnum<{
|
|
147
|
+
"openai-completions": "openai-completions";
|
|
148
|
+
"openai-responses": "openai-responses";
|
|
149
|
+
"anthropic-messages": "anthropic-messages";
|
|
150
|
+
}>;
|
|
151
|
+
composition: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
152
|
+
state: z.ZodLiteral<"complete">;
|
|
153
|
+
totalBytes: z.ZodNumber;
|
|
154
|
+
conversationBytes: z.ZodNumber;
|
|
155
|
+
toolSchemaBytes: z.ZodNumber;
|
|
156
|
+
systemBytes: z.ZodNumber;
|
|
157
|
+
otherBytes: z.ZodNumber;
|
|
158
|
+
imageBlockBytes: z.ZodNumber;
|
|
159
|
+
opaqueReplayBytes: z.ZodNumber;
|
|
160
|
+
remainingConversationBytes: z.ZodNumber;
|
|
161
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
162
|
+
state: z.ZodEnum<{
|
|
163
|
+
unavailable: "unavailable";
|
|
164
|
+
"work-limit": "work-limit";
|
|
165
|
+
"size-limit": "size-limit";
|
|
166
|
+
"invalid-json": "invalid-json";
|
|
167
|
+
"unsupported-shape": "unsupported-shape";
|
|
168
|
+
cancelled: "cancelled";
|
|
169
|
+
"time-limit": "time-limit";
|
|
170
|
+
}>;
|
|
171
|
+
totalBytes: z.ZodOptional<z.ZodNumber>;
|
|
172
|
+
}, z.core.$strict>], "state">;
|
|
173
|
+
encoding: z.ZodEnum<{
|
|
174
|
+
unknown: "unknown";
|
|
175
|
+
identity: "identity";
|
|
176
|
+
gzip: "gzip";
|
|
177
|
+
}>;
|
|
178
|
+
wireBytes: z.ZodOptional<z.ZodNumber>;
|
|
179
|
+
upload: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
180
|
+
state: z.ZodLiteral<"observed">;
|
|
181
|
+
bodyWrite: z.ZodEnum<{
|
|
182
|
+
observed: "observed";
|
|
183
|
+
"not-observed": "not-observed";
|
|
184
|
+
}>;
|
|
185
|
+
bodyWriteCompleteMs: z.ZodOptional<z.ZodNumber>;
|
|
186
|
+
nativeResponseHeadersMs: z.ZodOptional<z.ZodNumber>;
|
|
187
|
+
alpn: z.ZodEnum<{
|
|
188
|
+
h2: "h2";
|
|
189
|
+
unavailable: "unavailable";
|
|
190
|
+
"http/1.1": "http/1.1";
|
|
191
|
+
}>;
|
|
192
|
+
nodeWritableBufferBytes: z.ZodOptional<z.ZodNumber>;
|
|
193
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
194
|
+
state: z.ZodEnum<{
|
|
195
|
+
unavailable: "unavailable";
|
|
196
|
+
"work-limit": "work-limit";
|
|
197
|
+
}>;
|
|
198
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
199
|
+
state: z.ZodLiteral<"ambiguous">;
|
|
200
|
+
requestCount: z.ZodNumber;
|
|
201
|
+
}, z.core.$strict>], "state">>;
|
|
202
|
+
responseHeadersMs: z.ZodOptional<z.ZodNumber>;
|
|
203
|
+
httpStatus: z.ZodOptional<z.ZodNumber>;
|
|
204
|
+
outcome: z.ZodEnum<{
|
|
205
|
+
cancelled: "cancelled";
|
|
206
|
+
"http-error": "http-error";
|
|
207
|
+
"transport-error": "transport-error";
|
|
208
|
+
"stream-done": "stream-done";
|
|
209
|
+
"stream-error": "stream-error";
|
|
210
|
+
interrupted: "interrupted";
|
|
211
|
+
}>;
|
|
212
|
+
reason: z.ZodEnum<{
|
|
213
|
+
none: "none";
|
|
214
|
+
unknown: "unknown";
|
|
215
|
+
"request-body-timeout": "request-body-timeout";
|
|
216
|
+
"caller-abort": "caller-abort";
|
|
217
|
+
"credential-changed": "credential-changed";
|
|
218
|
+
disposed: "disposed";
|
|
219
|
+
"byte-idle-timeout": "byte-idle-timeout";
|
|
220
|
+
"signal-abort": "signal-abort";
|
|
221
|
+
}>;
|
|
222
|
+
}, z.core.$strict>>;
|
|
223
|
+
dropped: z.ZodNumber;
|
|
224
|
+
evicted: z.ZodNumber;
|
|
225
|
+
pending: z.ZodOptional<z.ZodNumber>;
|
|
226
|
+
interruptedOnReopen: z.ZodOptional<z.ZodNumber>;
|
|
227
|
+
credentialChanges: z.ZodOptional<z.ZodObject<{
|
|
228
|
+
rows: z.ZodArray<z.ZodObject<{
|
|
229
|
+
changeId: z.ZodString;
|
|
230
|
+
observedAt: z.ZodNumber;
|
|
231
|
+
version: z.ZodString;
|
|
232
|
+
phase: z.ZodEnum<{
|
|
233
|
+
notification: "notification";
|
|
234
|
+
commit: "commit";
|
|
235
|
+
}>;
|
|
236
|
+
reason: z.ZodEnum<{
|
|
237
|
+
expired: "expired";
|
|
238
|
+
qualified: "qualified";
|
|
239
|
+
"unknown-source": "unknown-source";
|
|
240
|
+
"account-changed": "account-changed";
|
|
241
|
+
"endpoint-changed": "endpoint-changed";
|
|
242
|
+
"entitlements-changed": "entitlements-changed";
|
|
243
|
+
"auth-mismatch": "auth-mismatch";
|
|
244
|
+
"duplicate-notification": "duplicate-notification";
|
|
245
|
+
"missing-notification": "missing-notification";
|
|
246
|
+
"commit-mismatch": "commit-mismatch";
|
|
247
|
+
"write-failed": "write-failed";
|
|
248
|
+
"write-conflict": "write-conflict";
|
|
249
|
+
}>;
|
|
250
|
+
preparing: z.ZodNumber;
|
|
251
|
+
dispatched: z.ZodNumber;
|
|
252
|
+
alreadyAborted: z.ZodNumber;
|
|
253
|
+
preserved: z.ZodNumber;
|
|
254
|
+
revoked: z.ZodNumber;
|
|
255
|
+
}, z.core.$strict>>;
|
|
256
|
+
dropped: z.ZodNumber;
|
|
257
|
+
evicted: z.ZodNumber;
|
|
258
|
+
pending: z.ZodOptional<z.ZodNumber>;
|
|
259
|
+
interruptedOnReopen: z.ZodOptional<z.ZodNumber>;
|
|
260
|
+
}, z.core.$strict>>;
|
|
261
|
+
}, z.core.$strict>;
|
|
262
|
+
export type RequestDiagnostic = z.infer<typeof RequestDiagnosticSchema>;
|
|
263
|
+
export interface RequestDiagnosticHandle {
|
|
264
|
+
composition?(evidence: RequestBodyEvidence): void;
|
|
265
|
+
isCurrent?(): boolean;
|
|
266
|
+
headers(status: number | undefined, ms: number | undefined, upload?: RequestUploadEvidence): void;
|
|
267
|
+
finish(outcome: RequestDiagnostic['outcome'], reason?: RequestDiagnostic['reason']): void;
|
|
268
|
+
}
|
|
269
|
+
export interface RequestDiagnosticStart {
|
|
270
|
+
streamId: string;
|
|
271
|
+
dispatchIndex: number;
|
|
272
|
+
model: string;
|
|
273
|
+
protocol: RequestDiagnostic['protocol'];
|
|
274
|
+
composition: RequestBodyEvidence;
|
|
275
|
+
encoding: RequestDiagnostic['encoding'];
|
|
276
|
+
wireBytes?: number;
|
|
277
|
+
}
|
|
278
|
+
//# sourceMappingURL=request-diagnostics.d.ts.map
|
|
@@ -4,8 +4,8 @@ export declare const CompactionContinuationStatusSchema: z.ZodObject<{
|
|
|
4
4
|
id: z.ZodString;
|
|
5
5
|
state: z.ZodEnum<{
|
|
6
6
|
running: "running";
|
|
7
|
-
cancelled: "cancelled";
|
|
8
7
|
failed: "failed";
|
|
8
|
+
cancelled: "cancelled";
|
|
9
9
|
completed: "completed";
|
|
10
10
|
blocked: "blocked";
|
|
11
11
|
}>;
|
|
@@ -51,8 +51,8 @@ export declare const SessionContinuationViewSchema: z.ZodObject<{
|
|
|
51
51
|
id: z.ZodString;
|
|
52
52
|
state: z.ZodEnum<{
|
|
53
53
|
running: "running";
|
|
54
|
-
cancelled: "cancelled";
|
|
55
54
|
failed: "failed";
|
|
55
|
+
cancelled: "cancelled";
|
|
56
56
|
completed: "completed";
|
|
57
57
|
blocked: "blocked";
|
|
58
58
|
}>;
|
|
@@ -45,10 +45,10 @@ export declare const TurnSelectionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
45
45
|
diagnostic: z.ZodOptional<z.ZodEnum<{
|
|
46
46
|
disabled: "disabled";
|
|
47
47
|
unavailable: "unavailable";
|
|
48
|
-
failed: "failed";
|
|
49
48
|
"context-omitted": "context-omitted";
|
|
50
49
|
"invalid-result": "invalid-result";
|
|
51
50
|
timeout: "timeout";
|
|
51
|
+
failed: "failed";
|
|
52
52
|
}>>;
|
|
53
53
|
semantic: z.ZodOptional<z.ZodObject<{
|
|
54
54
|
modelId: z.ZodOptional<z.ZodString>;
|
|
@@ -74,6 +74,21 @@ export declare const TurnSelectionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
74
74
|
valid: "valid";
|
|
75
75
|
"context-omitted": "context-omitted";
|
|
76
76
|
}>;
|
|
77
|
+
candidateScan: z.ZodOptional<z.ZodObject<{
|
|
78
|
+
candidates: z.ZodNumber;
|
|
79
|
+
eligible: z.ZodNumber;
|
|
80
|
+
rejected: z.ZodRecord<z.ZodEnum<{
|
|
81
|
+
input: "input";
|
|
82
|
+
category: "category";
|
|
83
|
+
excluded: "excluded";
|
|
84
|
+
"configured-id": "configured-id";
|
|
85
|
+
"reasoning-disable-unproven": "reasoning-disable-unproven";
|
|
86
|
+
budget: "budget";
|
|
87
|
+
}> & z.core.$partial, z.ZodNumber>;
|
|
88
|
+
}, z.core.$strict>>;
|
|
89
|
+
preparationFailure: z.ZodOptional<z.ZodEnum<{
|
|
90
|
+
"native-off-unavailable": "native-off-unavailable";
|
|
91
|
+
}>>;
|
|
77
92
|
}, z.core.$strict>>;
|
|
78
93
|
}, z.core.$strict>;
|
|
79
94
|
targetCategory: z.ZodEnum<{
|
|
@@ -123,8 +138,10 @@ export type TurnSelection = {
|
|
|
123
138
|
};
|
|
124
139
|
/** Ephemeral decision evidence only; never session content, model usage or credentials. */
|
|
125
140
|
export declare class TurnSelectionStore {
|
|
141
|
+
private readonly onAutoDecision?;
|
|
126
142
|
private readonly agents;
|
|
127
143
|
private timestamps;
|
|
144
|
+
constructor(onAutoDecision?: ((explanation: AutoSelectionExplanation) => void) | undefined);
|
|
128
145
|
record(agent: object, turn: number, selection: TurnSelection): void;
|
|
129
146
|
get(agent: object, turn: number): TurnSelection;
|
|
130
147
|
allocationSummary(agent: object): AutoAllocationSummary;
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
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.
|
|
4
|
+
"version": "0.4.2-alpha.10",
|
|
5
|
+
"releaseNotes": "CHANGELOG.md",
|
|
5
6
|
"publishConfig": {
|
|
6
7
|
"access": "public",
|
|
7
8
|
"registry": "https://registry.npmjs.org/",
|
|
8
|
-
"tag": "
|
|
9
|
+
"tag": "alpha"
|
|
9
10
|
},
|
|
10
11
|
"repository": {
|
|
11
12
|
"type": "git",
|
|
@@ -107,20 +108,20 @@
|
|
|
107
108
|
"@deepseek-ai/cordis": "^4.0.4",
|
|
108
109
|
"@deepseek-ai/dsh-agent": "0.2.0-rc.2",
|
|
109
110
|
"@deepseek-ai/dsh-agent-default-model": "0.2.0-rc.2",
|
|
110
|
-
"@deepseek-ai/dsh-commands": "0.2.0-rc.2",
|
|
111
|
-
"@deepseek-ai/dsh-compaction": "0.2.0-rc.2",
|
|
112
|
-
"@deepseek-ai/dsh-compaction-basic": "0.2.0-rc.2",
|
|
113
111
|
"@deepseek-ai/dsh-api-remotes": "0.2.0-rc.2",
|
|
114
112
|
"@deepseek-ai/dsh-authorization": "0.2.0-rc.2",
|
|
115
113
|
"@deepseek-ai/dsh-client-ui-renderer": "0.2.0-rc.2",
|
|
116
114
|
"@deepseek-ai/dsh-client-ui-settings-models": "0.2.0-rc.2",
|
|
117
115
|
"@deepseek-ai/dsh-client-ui-slots": "0.2.0-rc.2",
|
|
116
|
+
"@deepseek-ai/dsh-commands": "0.2.0-rc.2",
|
|
117
|
+
"@deepseek-ai/dsh-compaction": "0.2.0-rc.2",
|
|
118
|
+
"@deepseek-ai/dsh-compaction-basic": "0.2.0-rc.2",
|
|
118
119
|
"@deepseek-ai/dsh-credentials": "0.2.0-rc.2",
|
|
119
120
|
"@deepseek-ai/dsh-launch-environment": "0.2.0-rc.2",
|
|
120
121
|
"@deepseek-ai/dsh-llm": "0.2.0-rc.2",
|
|
121
122
|
"@deepseek-ai/dsh-llm-pi-ai": "0.2.0-rc.2",
|
|
122
|
-
"@deepseek-ai/dsh-session": "0.2.0-rc.2",
|
|
123
123
|
"@deepseek-ai/dsh-scope": "0.2.0-rc.2",
|
|
124
|
+
"@deepseek-ai/dsh-session": "0.2.0-rc.2",
|
|
124
125
|
"@deepseek-ai/dsh-settings": "0.2.0-rc.2",
|
|
125
126
|
"@deepseek-ai/dsh-typert-protocol": "0.2.0-rc.2",
|
|
126
127
|
"@deepseek-ai/dsh-web": "0.2.0-rc.2",
|
|
@@ -159,22 +160,22 @@
|
|
|
159
160
|
"@deepseek-ai/cordis": "~4.0.4",
|
|
160
161
|
"@deepseek-ai/dsh-agent": "0.2.0-rc.2",
|
|
161
162
|
"@deepseek-ai/dsh-agent-default-model": "0.2.0-rc.2",
|
|
162
|
-
"@deepseek-ai/dsh-commands": "0.2.0-rc.2",
|
|
163
|
-
"@deepseek-ai/dsh-compaction": "0.2.0-rc.2",
|
|
164
|
-
"@deepseek-ai/dsh-compaction-basic": "0.2.0-rc.2",
|
|
165
|
-
"@deepseek-ai/dsh-jobs": "0.2.0-rc.2",
|
|
166
163
|
"@deepseek-ai/dsh-api-gateway": "0.2.0-rc.2",
|
|
167
164
|
"@deepseek-ai/dsh-api-remotes": "0.2.0-rc.2",
|
|
168
165
|
"@deepseek-ai/dsh-app-boot": "0.2.0-rc.2",
|
|
169
|
-
"@deepseek-ai/dsh-config-editor": "0.2.0-rc.2",
|
|
170
166
|
"@deepseek-ai/dsh-attachment": "0.2.0-rc.2",
|
|
171
167
|
"@deepseek-ai/dsh-authorization": "0.2.0-rc.2",
|
|
172
168
|
"@deepseek-ai/dsh-client-connection": "0.2.0-rc.2",
|
|
173
169
|
"@deepseek-ai/dsh-client-ui-renderer": "0.2.0-rc.2",
|
|
174
170
|
"@deepseek-ai/dsh-client-ui-settings-models": "0.2.0-rc.2",
|
|
175
171
|
"@deepseek-ai/dsh-client-ui-slots": "0.2.0-rc.2",
|
|
172
|
+
"@deepseek-ai/dsh-commands": "0.2.0-rc.2",
|
|
173
|
+
"@deepseek-ai/dsh-compaction": "0.2.0-rc.2",
|
|
174
|
+
"@deepseek-ai/dsh-compaction-basic": "0.2.0-rc.2",
|
|
175
|
+
"@deepseek-ai/dsh-config-editor": "0.2.0-rc.2",
|
|
176
176
|
"@deepseek-ai/dsh-credentials": "0.2.0-rc.2",
|
|
177
177
|
"@deepseek-ai/dsh-fs": "0.2.0-rc.2",
|
|
178
|
+
"@deepseek-ai/dsh-jobs": "0.2.0-rc.2",
|
|
178
179
|
"@deepseek-ai/dsh-launch-environment": "0.2.0-rc.2",
|
|
179
180
|
"@deepseek-ai/dsh-llm": "0.2.0-rc.2",
|
|
180
181
|
"@deepseek-ai/dsh-llm-pi-ai": "0.2.0-rc.2",
|