dsh-github-copilot 0.4.2-alpha.6 → 0.4.2-alpha.8
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 +11 -1
- package/CHANGELOG.md +31 -0
- package/README.md +17 -7
- package/README.zh.md +15 -7
- package/deployment-baseline.json +12 -2
- package/docs/auto-iteration-review.json +5 -5
- package/docs/auto-task-routing.md +64 -5
- package/docs/copilot-accounts.md +6 -0
- package/docs/plugin-diagnostics.md +45 -5
- package/lib/client.js +93 -14
- package/lib/client.js.map +1 -1
- package/lib/diagnostics-analysis.js +1 -1
- package/lib/{diagnostics-types-BDIc78T4.js → diagnostics-types-C1BD6ayS.js} +35 -2
- package/lib/index.js +1840 -1654
- package/lib/manual-compaction-recovery.js +1 -1
- package/lib/remote.js +34 -1
- 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 +1 -1
- package/lib/types/config.d.ts +10 -2
- package/lib/types/copilot-auth.d.ts +2 -1
- package/lib/types/diagnostics-analysis.d.ts +1 -1
- package/lib/types/diagnostics-card.d.ts +1 -0
- package/lib/types/diagnostics-collector.d.ts +3 -1
- package/lib/types/diagnostics-host.d.ts +21 -3
- package/lib/types/diagnostics-remote.d.ts +2 -2
- package/lib/types/diagnostics-types.d.ts +77 -9
- package/lib/types/preview-route.d.ts +1 -1
- package/lib/types/request-diagnostics.d.ts +82 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./copilot-identity-DRZY_d2X.js";
|
|
2
|
-
import { d as diagnosticsReason, u as diagnosticsOutcome } from "./diagnostics-types-
|
|
2
|
+
import { d as diagnosticsReason, u as diagnosticsOutcome } from "./diagnostics-types-C1BD6ayS.js";
|
|
3
3
|
import { i as resolveRequestBudgetPolicy, r as calculateRequestBudget } from "./request-budget-DLY_aRq0.js";
|
|
4
4
|
import z from "@deepseek-ai/schemastery";
|
|
5
5
|
import { LlmError, createUserMessage } from "@deepseek-ai/dsh-llm";
|
package/lib/remote.js
CHANGED
|
@@ -893,6 +893,32 @@ const upload = z.discriminatedUnion("state", [
|
|
|
893
893
|
requestCount: integer$1
|
|
894
894
|
}).strict()
|
|
895
895
|
]);
|
|
896
|
+
const CredentialChangeReasonSchema = z.enum([
|
|
897
|
+
"qualified",
|
|
898
|
+
"unknown-source",
|
|
899
|
+
"account-changed",
|
|
900
|
+
"endpoint-changed",
|
|
901
|
+
"entitlements-changed",
|
|
902
|
+
"expired",
|
|
903
|
+
"auth-mismatch",
|
|
904
|
+
"duplicate-notification",
|
|
905
|
+
"missing-notification",
|
|
906
|
+
"commit-mismatch",
|
|
907
|
+
"write-failed",
|
|
908
|
+
"write-conflict"
|
|
909
|
+
]);
|
|
910
|
+
const CredentialChangeSchema = z.object({
|
|
911
|
+
changeId: z.string().uuid(),
|
|
912
|
+
observedAt: integer$1,
|
|
913
|
+
version: z.string().max(64).regex(/^\d+\.\d+\.\d+(?:-[a-zA-Z0-9.-]+)?$/),
|
|
914
|
+
phase: z.enum(["notification", "commit"]),
|
|
915
|
+
reason: CredentialChangeReasonSchema,
|
|
916
|
+
preparing: integer$1,
|
|
917
|
+
dispatched: integer$1,
|
|
918
|
+
alreadyAborted: integer$1,
|
|
919
|
+
preserved: integer$1,
|
|
920
|
+
revoked: integer$1
|
|
921
|
+
}).strict();
|
|
896
922
|
const RequestDiagnosticSchema = z.object({
|
|
897
923
|
streamId: z.string().uuid(),
|
|
898
924
|
dispatchIndex: integer$1.min(1),
|
|
@@ -939,7 +965,14 @@ const RequestDiagnosticsSchema = z.object({
|
|
|
939
965
|
dropped: integer$1,
|
|
940
966
|
evicted: integer$1,
|
|
941
967
|
pending: integer$1.max(128).optional(),
|
|
942
|
-
interruptedOnReopen: integer$1.optional()
|
|
968
|
+
interruptedOnReopen: integer$1.optional(),
|
|
969
|
+
credentialChanges: z.object({
|
|
970
|
+
rows: z.array(CredentialChangeSchema).max(128),
|
|
971
|
+
dropped: integer$1,
|
|
972
|
+
evicted: integer$1,
|
|
973
|
+
pending: integer$1.max(128).optional(),
|
|
974
|
+
interruptedOnReopen: integer$1.optional()
|
|
975
|
+
}).strict().optional()
|
|
943
976
|
}).strict();
|
|
944
977
|
//#endregion
|
|
945
978
|
//#region lib/types/diagnostics-types.js
|
|
@@ -19,6 +19,7 @@ export interface AutoModelHostDependencies {
|
|
|
19
19
|
followParentModel?: () => boolean;
|
|
20
20
|
admitModel?: (agent: Agent, turn: number, model: string, signal: AbortSignal) => void;
|
|
21
21
|
semanticAssessment?: () => boolean;
|
|
22
|
+
assessmentTimeoutMs?: () => number | undefined;
|
|
22
23
|
highCostModelIds?: () => readonly string[];
|
|
23
24
|
allocationEvidence?: () => boolean;
|
|
24
25
|
classifyTask?: TaskAssessmentDependencies['classify'];
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import type { SemanticAssessmentEvidence, TaskClassifierObserver } from './auto-assessment-evidence.ts';
|
|
3
|
+
export declare const DEFAULT_AUTO_ASSESSMENT_TIMEOUT_MS = 30000;
|
|
3
4
|
export declare const TaskAssessmentSchema: z.ZodObject<{
|
|
4
5
|
demand: z.ZodEnum<{
|
|
5
6
|
unknown: "unknown";
|
|
@@ -3,7 +3,7 @@ import type { AccountModelDescriptor } from './account-model-catalog.ts';
|
|
|
3
3
|
import type { AssessmentInput } from './auto-task-assessment.ts';
|
|
4
4
|
import type { TaskClassifierObserver } from './auto-assessment-evidence.ts';
|
|
5
5
|
export declare const TASK_CLASSIFIER_MAX_TOKENS = 128;
|
|
6
|
-
export declare function taskClassifierModel(models: readonly AccountModelDescriptor[], highCostModelIds?: readonly string[]): AccountModelDescriptor | undefined;
|
|
6
|
+
export declare function taskClassifierModel(models: readonly AccountModelDescriptor[], highCostModelIds?: readonly string[], modelId?: string): AccountModelDescriptor | undefined;
|
|
7
7
|
/** One auxiliary concrete-model call; no Auto recursion, tools, history writes or retry loop. */
|
|
8
8
|
export declare function classifyTaskWithAdapter(model: AccountModelDescriptor, input: AssessmentInput, signal: AbortSignal, stream: (request: GenerateOptions) => AsyncIterable<StreamChunk>, observe?: TaskClassifierObserver, reasoningOffSupported?: boolean, checkpoint?: () => void): Promise<string>;
|
|
9
9
|
//# sourceMappingURL=auto-task-classifier.d.ts.map
|
package/lib/types/config.d.ts
CHANGED
|
@@ -69,6 +69,10 @@ export interface InlineConfig {
|
|
|
69
69
|
followParentModel?: boolean;
|
|
70
70
|
/** Default-on bounded task assessment; explicit false opts out of auxiliary inference. */
|
|
71
71
|
autoSemanticAssessment?: boolean;
|
|
72
|
+
/** Total preparation/response budget; finite wait, independent of native Chat deadlines. */
|
|
73
|
+
autoSemanticAssessmentTimeoutMs?: number;
|
|
74
|
+
/** Exact account classifier ID; empty keeps metadata-driven automatic selection. */
|
|
75
|
+
autoSemanticAssessmentModel?: string;
|
|
72
76
|
/** Capture bounded local candidate opportunities for future policy review. */
|
|
73
77
|
autoAllocationEvidence?: boolean;
|
|
74
78
|
/** Estimated managed-route input headroom, separate from truthful catalog capacities. */
|
|
@@ -88,7 +92,9 @@ export interface InlineConfig {
|
|
|
88
92
|
/** Internal JSON backup of route leaves temporarily owned by the GPT-6 overlay. */
|
|
89
93
|
temporaryRouteBackup?: string;
|
|
90
94
|
}
|
|
91
|
-
export type LiveInlineConfig = Omit<InlineConfig, 'diagnosticsEnabled' | 'autoAllocationDiagnosticsEnabled' | 'requestDiagnosticsEnabled' | 'searchModel' | 'searchRouting' | 'temporaryRouteBackup' | 'excludedModelIds' | 'highCostModelIds' | 'parentModelFollow' | 'followParentModel' | 'activeAccountId' | 'sessionAccounts' | 'sessionContinuation' | 'continuationDefaultHistory'> & {
|
|
95
|
+
export type LiveInlineConfig = Omit<InlineConfig, 'diagnosticsEnabled' | 'autoAllocationDiagnosticsEnabled' | 'requestDiagnosticsEnabled' | 'searchModel' | 'searchRouting' | 'temporaryRouteBackup' | 'excludedModelIds' | 'highCostModelIds' | 'parentModelFollow' | 'followParentModel' | 'activeAccountId' | 'sessionAccounts' | 'sessionContinuation' | 'continuationDefaultHistory' | 'autoSemanticAssessmentTimeoutMs' | 'autoSemanticAssessmentModel'> & {
|
|
96
|
+
autoSemanticAssessmentTimeoutMs?: number | LiveSetting<number>;
|
|
97
|
+
autoSemanticAssessmentModel?: string | LiveSetting<string>;
|
|
92
98
|
continuationDefaultHistory?: InlineConfig['continuationDefaultHistory'] | LiveSetting<ArrayLike<{
|
|
93
99
|
enabled: boolean;
|
|
94
100
|
changedAt: number;
|
|
@@ -107,7 +113,9 @@ export type LiveInlineConfig = Omit<InlineConfig, 'diagnosticsEnabled' | 'autoAl
|
|
|
107
113
|
searchRouting?: WebSearchRoutingConfig | LiveSetting<WebSearchRoutingConfig | undefined>;
|
|
108
114
|
temporaryRouteBackup?: string | LiveSetting<string | undefined>;
|
|
109
115
|
};
|
|
110
|
-
export type ResolvedInlineConfig = Omit<InlineConfig, 'diagnosticsEnabled' | 'autoAllocationDiagnosticsEnabled' | 'requestDiagnosticsEnabled' | 'searchModel' | 'searchRouting' | 'temporaryRouteBackup' | 'excludedModelIds' | 'highCostModelIds' | 'parentModelFollow' | 'followParentModel' | 'activeAccountId' | 'sessionAccounts' | 'sessionContinuation' | 'continuationDefaultHistory'> & {
|
|
116
|
+
export type ResolvedInlineConfig = Omit<InlineConfig, 'diagnosticsEnabled' | 'autoAllocationDiagnosticsEnabled' | 'requestDiagnosticsEnabled' | 'searchModel' | 'searchRouting' | 'temporaryRouteBackup' | 'excludedModelIds' | 'highCostModelIds' | 'parentModelFollow' | 'followParentModel' | 'activeAccountId' | 'sessionAccounts' | 'sessionContinuation' | 'continuationDefaultHistory' | 'autoSemanticAssessmentTimeoutMs' | 'autoSemanticAssessmentModel'> & {
|
|
117
|
+
autoSemanticAssessmentTimeoutMs: LiveSetting<number>;
|
|
118
|
+
autoSemanticAssessmentModel: LiveSetting<string>;
|
|
111
119
|
diagnosticsEnabled: LiveSetting<boolean>;
|
|
112
120
|
autoAllocationDiagnosticsEnabled: LiveSetting<boolean>;
|
|
113
121
|
requestDiagnosticsEnabled: LiveSetting<boolean>;
|
|
@@ -7,11 +7,12 @@ import { type CredentialStore, type OAuthAuth } from '@earendil-works/pi-ai';
|
|
|
7
7
|
import { GITHUB_COPILOT_PROVIDER_ID, GITHUB_COPILOT_PREVIEW_PROVIDER_ID } from './copilot-identity.ts';
|
|
8
8
|
import type { GitHubCopilotOAuthCredential } from './copilot-grant.ts';
|
|
9
9
|
import type { CopilotAccountBinding } from './copilot-accounts-types.ts';
|
|
10
|
+
import type { CredentialChangeReason } from './request-diagnostics.ts';
|
|
10
11
|
export { normalizeGitHubCopilotOAuthCredential } from './copilot-grant.ts';
|
|
11
12
|
/** Only a validated native OAuth refresh may certify its exact returned object. */
|
|
12
13
|
export declare function certifyCopilotNativeRefresh(previous: GitHubCopilotOAuthCredential, result: GitHubCopilotOAuthCredential, derive: OAuthAuth['toAuth'], signal?: AbortSignal): Promise<void>;
|
|
13
14
|
/** Consume exactly one notification from the serialized, certified write. */
|
|
14
|
-
export declare function observeCopilotNativeRefresh(ctx: Context, key: string): Promise<boolean> | undefined;
|
|
15
|
+
export declare function observeCopilotNativeRefresh(ctx: Context, key: string, diagnostic?: (phase: 'notification' | 'commit', reason: CredentialChangeReason) => void): Promise<boolean> | undefined;
|
|
15
16
|
export declare function captureActiveGitHubCopilotBinding(ctx: Context): CopilotAccountBinding | undefined;
|
|
16
17
|
/** Bind exactly one logical route to the canonical Host-owned credential record. */
|
|
17
18
|
export declare function createGitHubCopilotCredentialStore(ctx: Context, logicalProviderId?: typeof GITHUB_COPILOT_PROVIDER_ID | typeof GITHUB_COPILOT_PREVIEW_PROVIDER_ID, binding?: CopilotAccountBinding): CredentialStore;
|
|
@@ -195,6 +195,7 @@ export declare const DiagnosticsAnalysisReportSchema: z.ZodObject<{
|
|
|
195
195
|
}>;
|
|
196
196
|
stage: z.ZodEnum<{
|
|
197
197
|
ended: "ended";
|
|
198
|
+
dispatched: "dispatched";
|
|
198
199
|
admitted: "admitted";
|
|
199
200
|
"rpc-invoked": "rpc-invoked";
|
|
200
201
|
"host-received": "host-received";
|
|
@@ -210,7 +211,6 @@ export declare const DiagnosticsAnalysisReportSchema: z.ZodObject<{
|
|
|
210
211
|
"cache-hit": "cache-hit";
|
|
211
212
|
"joined-flight": "joined-flight";
|
|
212
213
|
cooldown: "cooldown";
|
|
213
|
-
dispatched: "dispatched";
|
|
214
214
|
}>;
|
|
215
215
|
bucket: z.ZodNumber;
|
|
216
216
|
count: z.ZodNumber;
|
|
@@ -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,6 +1,6 @@
|
|
|
1
1
|
import type { DiagnosticsOperation, DiagnosticsStage, DiagnosticsOutcome, DiagnosticsReason, DiagnosticsRow, DiagnosticsSnapshot } from './diagnostics-types.ts';
|
|
2
2
|
import type { AutoSelectionExplanation } from './auto-model-routing.ts';
|
|
3
|
-
import type { RequestDiagnosticHandle, RequestDiagnosticStart } from './request-diagnostics.ts';
|
|
3
|
+
import type { RequestDiagnosticHandle, RequestDiagnosticStart, CredentialChangeHandle } from './request-diagnostics.ts';
|
|
4
4
|
export interface DiagnosticsHandle {
|
|
5
5
|
stage(stage: DiagnosticsStage): void;
|
|
6
6
|
finish(outcome: DiagnosticsOutcome, reason?: DiagnosticsReason): void;
|
|
@@ -19,6 +19,7 @@ export declare class DiagnosticsCollector {
|
|
|
19
19
|
private autoAllocationEnabled;
|
|
20
20
|
private requestEnabled;
|
|
21
21
|
private readonly requestHandles;
|
|
22
|
+
private readonly credentialHandles;
|
|
22
23
|
private requestGeneration;
|
|
23
24
|
private lastWall;
|
|
24
25
|
private readonly autoAllocation;
|
|
@@ -37,6 +38,7 @@ export declare class DiagnosticsCollector {
|
|
|
37
38
|
snapshot(): DiagnosticsSnapshot;
|
|
38
39
|
close(): void;
|
|
39
40
|
setRequestEnabled(enabled: boolean): void;
|
|
41
|
+
beginCredentialChange(): CredentialChangeHandle | undefined;
|
|
40
42
|
beginRequest(start: RequestDiagnosticStart): RequestDiagnosticHandle | undefined;
|
|
41
43
|
isRequestEnabled(): boolean;
|
|
42
44
|
noteDropped(): void;
|
|
@@ -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" | "success" | "stage" | "failed" | "dropped" | "expired" | "cancelled" | "interrupted" | "started" | "no-op" | "policy-rejected" | "
|
|
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
|
}[];
|
|
@@ -126,6 +126,24 @@ export declare const diagnosticsDomain: {
|
|
|
126
126
|
evicted: number;
|
|
127
127
|
pending?: number | undefined;
|
|
128
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;
|
|
129
147
|
} | undefined;
|
|
130
148
|
}>;
|
|
131
149
|
};
|
|
@@ -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,7 +38,6 @@ 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";
|
|
@@ -48,11 +48,11 @@ export declare const ClientDiagnosticsBatchSchema: z.ZodObject<{
|
|
|
48
48
|
dropped: "dropped";
|
|
49
49
|
expired: "expired";
|
|
50
50
|
cancelled: "cancelled";
|
|
51
|
+
revoked: "revoked";
|
|
51
52
|
interrupted: "interrupted";
|
|
52
53
|
started: "started";
|
|
53
54
|
"no-op": "no-op";
|
|
54
55
|
"policy-rejected": "policy-rejected";
|
|
55
|
-
revoked: "revoked";
|
|
56
56
|
"environment-fault": "environment-fault";
|
|
57
57
|
"clock-discontinuity": "clock-discontinuity";
|
|
58
58
|
"pending-sample": "pending-sample";
|
|
@@ -26,6 +26,7 @@ export declare const DiagnosticsRowSchema: z.ZodObject<{
|
|
|
26
26
|
}>;
|
|
27
27
|
stage: z.ZodEnum<{
|
|
28
28
|
ended: "ended";
|
|
29
|
+
dispatched: "dispatched";
|
|
29
30
|
admitted: "admitted";
|
|
30
31
|
"rpc-invoked": "rpc-invoked";
|
|
31
32
|
"host-received": "host-received";
|
|
@@ -41,7 +42,6 @@ export declare const DiagnosticsRowSchema: z.ZodObject<{
|
|
|
41
42
|
"cache-hit": "cache-hit";
|
|
42
43
|
"joined-flight": "joined-flight";
|
|
43
44
|
cooldown: "cooldown";
|
|
44
|
-
dispatched: "dispatched";
|
|
45
45
|
}>;
|
|
46
46
|
metric: z.ZodEnum<{
|
|
47
47
|
paused: "paused";
|
|
@@ -52,11 +52,11 @@ export declare const DiagnosticsRowSchema: z.ZodObject<{
|
|
|
52
52
|
dropped: "dropped";
|
|
53
53
|
expired: "expired";
|
|
54
54
|
cancelled: "cancelled";
|
|
55
|
+
revoked: "revoked";
|
|
55
56
|
interrupted: "interrupted";
|
|
56
57
|
started: "started";
|
|
57
58
|
"no-op": "no-op";
|
|
58
59
|
"policy-rejected": "policy-rejected";
|
|
59
|
-
revoked: "revoked";
|
|
60
60
|
"environment-fault": "environment-fault";
|
|
61
61
|
"clock-discontinuity": "clock-discontinuity";
|
|
62
62
|
"pending-sample": "pending-sample";
|
|
@@ -108,6 +108,7 @@ export declare const DiagnosticsPendingSchema: z.ZodObject<{
|
|
|
108
108
|
}>;
|
|
109
109
|
stage: z.ZodEnum<{
|
|
110
110
|
ended: "ended";
|
|
111
|
+
dispatched: "dispatched";
|
|
111
112
|
admitted: "admitted";
|
|
112
113
|
"rpc-invoked": "rpc-invoked";
|
|
113
114
|
"host-received": "host-received";
|
|
@@ -123,7 +124,6 @@ export declare const DiagnosticsPendingSchema: z.ZodObject<{
|
|
|
123
124
|
"cache-hit": "cache-hit";
|
|
124
125
|
"joined-flight": "joined-flight";
|
|
125
126
|
cooldown: "cooldown";
|
|
126
|
-
dispatched: "dispatched";
|
|
127
127
|
}>;
|
|
128
128
|
bucket: z.ZodNumber;
|
|
129
129
|
count: z.ZodNumber;
|
|
@@ -152,6 +152,7 @@ export declare const DiagnosticsSnapshotSchema: z.ZodObject<{
|
|
|
152
152
|
}>;
|
|
153
153
|
stage: z.ZodEnum<{
|
|
154
154
|
ended: "ended";
|
|
155
|
+
dispatched: "dispatched";
|
|
155
156
|
admitted: "admitted";
|
|
156
157
|
"rpc-invoked": "rpc-invoked";
|
|
157
158
|
"host-received": "host-received";
|
|
@@ -167,7 +168,6 @@ export declare const DiagnosticsSnapshotSchema: z.ZodObject<{
|
|
|
167
168
|
"cache-hit": "cache-hit";
|
|
168
169
|
"joined-flight": "joined-flight";
|
|
169
170
|
cooldown: "cooldown";
|
|
170
|
-
dispatched: "dispatched";
|
|
171
171
|
}>;
|
|
172
172
|
metric: z.ZodEnum<{
|
|
173
173
|
paused: "paused";
|
|
@@ -178,11 +178,11 @@ export declare const DiagnosticsSnapshotSchema: z.ZodObject<{
|
|
|
178
178
|
dropped: "dropped";
|
|
179
179
|
expired: "expired";
|
|
180
180
|
cancelled: "cancelled";
|
|
181
|
+
revoked: "revoked";
|
|
181
182
|
interrupted: "interrupted";
|
|
182
183
|
started: "started";
|
|
183
184
|
"no-op": "no-op";
|
|
184
185
|
"policy-rejected": "policy-rejected";
|
|
185
|
-
revoked: "revoked";
|
|
186
186
|
"environment-fault": "environment-fault";
|
|
187
187
|
"clock-discontinuity": "clock-discontinuity";
|
|
188
188
|
"pending-sample": "pending-sample";
|
|
@@ -412,6 +412,40 @@ export declare const DiagnosticsSnapshotSchema: z.ZodObject<{
|
|
|
412
412
|
evicted: z.ZodNumber;
|
|
413
413
|
pending: z.ZodOptional<z.ZodNumber>;
|
|
414
414
|
interruptedOnReopen: z.ZodOptional<z.ZodNumber>;
|
|
415
|
+
credentialChanges: z.ZodOptional<z.ZodObject<{
|
|
416
|
+
rows: z.ZodArray<z.ZodObject<{
|
|
417
|
+
changeId: z.ZodString;
|
|
418
|
+
observedAt: z.ZodNumber;
|
|
419
|
+
version: z.ZodString;
|
|
420
|
+
phase: z.ZodEnum<{
|
|
421
|
+
notification: "notification";
|
|
422
|
+
commit: "commit";
|
|
423
|
+
}>;
|
|
424
|
+
reason: z.ZodEnum<{
|
|
425
|
+
expired: "expired";
|
|
426
|
+
qualified: "qualified";
|
|
427
|
+
"unknown-source": "unknown-source";
|
|
428
|
+
"account-changed": "account-changed";
|
|
429
|
+
"endpoint-changed": "endpoint-changed";
|
|
430
|
+
"entitlements-changed": "entitlements-changed";
|
|
431
|
+
"auth-mismatch": "auth-mismatch";
|
|
432
|
+
"duplicate-notification": "duplicate-notification";
|
|
433
|
+
"missing-notification": "missing-notification";
|
|
434
|
+
"commit-mismatch": "commit-mismatch";
|
|
435
|
+
"write-failed": "write-failed";
|
|
436
|
+
"write-conflict": "write-conflict";
|
|
437
|
+
}>;
|
|
438
|
+
preparing: z.ZodNumber;
|
|
439
|
+
dispatched: z.ZodNumber;
|
|
440
|
+
alreadyAborted: z.ZodNumber;
|
|
441
|
+
preserved: z.ZodNumber;
|
|
442
|
+
revoked: z.ZodNumber;
|
|
443
|
+
}, z.core.$strict>>;
|
|
444
|
+
dropped: z.ZodNumber;
|
|
445
|
+
evicted: z.ZodNumber;
|
|
446
|
+
pending: z.ZodOptional<z.ZodNumber>;
|
|
447
|
+
interruptedOnReopen: z.ZodOptional<z.ZodNumber>;
|
|
448
|
+
}, z.core.$strict>>;
|
|
415
449
|
}, z.core.$strict>>;
|
|
416
450
|
pending: z.ZodArray<z.ZodObject<{
|
|
417
451
|
version: z.ZodString;
|
|
@@ -427,6 +461,7 @@ export declare const DiagnosticsSnapshotSchema: z.ZodObject<{
|
|
|
427
461
|
}>;
|
|
428
462
|
stage: z.ZodEnum<{
|
|
429
463
|
ended: "ended";
|
|
464
|
+
dispatched: "dispatched";
|
|
430
465
|
admitted: "admitted";
|
|
431
466
|
"rpc-invoked": "rpc-invoked";
|
|
432
467
|
"host-received": "host-received";
|
|
@@ -442,7 +477,6 @@ export declare const DiagnosticsSnapshotSchema: z.ZodObject<{
|
|
|
442
477
|
"cache-hit": "cache-hit";
|
|
443
478
|
"joined-flight": "joined-flight";
|
|
444
479
|
cooldown: "cooldown";
|
|
445
|
-
dispatched: "dispatched";
|
|
446
480
|
}>;
|
|
447
481
|
bucket: z.ZodNumber;
|
|
448
482
|
count: z.ZodNumber;
|
|
@@ -502,6 +536,7 @@ export declare const DiagnosticsViewSchema: z.ZodObject<{
|
|
|
502
536
|
}>;
|
|
503
537
|
stage: z.ZodEnum<{
|
|
504
538
|
ended: "ended";
|
|
539
|
+
dispatched: "dispatched";
|
|
505
540
|
admitted: "admitted";
|
|
506
541
|
"rpc-invoked": "rpc-invoked";
|
|
507
542
|
"host-received": "host-received";
|
|
@@ -517,7 +552,6 @@ export declare const DiagnosticsViewSchema: z.ZodObject<{
|
|
|
517
552
|
"cache-hit": "cache-hit";
|
|
518
553
|
"joined-flight": "joined-flight";
|
|
519
554
|
cooldown: "cooldown";
|
|
520
|
-
dispatched: "dispatched";
|
|
521
555
|
}>;
|
|
522
556
|
metric: z.ZodEnum<{
|
|
523
557
|
paused: "paused";
|
|
@@ -528,11 +562,11 @@ export declare const DiagnosticsViewSchema: z.ZodObject<{
|
|
|
528
562
|
dropped: "dropped";
|
|
529
563
|
expired: "expired";
|
|
530
564
|
cancelled: "cancelled";
|
|
565
|
+
revoked: "revoked";
|
|
531
566
|
interrupted: "interrupted";
|
|
532
567
|
started: "started";
|
|
533
568
|
"no-op": "no-op";
|
|
534
569
|
"policy-rejected": "policy-rejected";
|
|
535
|
-
revoked: "revoked";
|
|
536
570
|
"environment-fault": "environment-fault";
|
|
537
571
|
"clock-discontinuity": "clock-discontinuity";
|
|
538
572
|
"pending-sample": "pending-sample";
|
|
@@ -762,6 +796,40 @@ export declare const DiagnosticsViewSchema: z.ZodObject<{
|
|
|
762
796
|
evicted: z.ZodNumber;
|
|
763
797
|
pending: z.ZodOptional<z.ZodNumber>;
|
|
764
798
|
interruptedOnReopen: z.ZodOptional<z.ZodNumber>;
|
|
799
|
+
credentialChanges: z.ZodOptional<z.ZodObject<{
|
|
800
|
+
rows: z.ZodArray<z.ZodObject<{
|
|
801
|
+
changeId: z.ZodString;
|
|
802
|
+
observedAt: z.ZodNumber;
|
|
803
|
+
version: z.ZodString;
|
|
804
|
+
phase: z.ZodEnum<{
|
|
805
|
+
notification: "notification";
|
|
806
|
+
commit: "commit";
|
|
807
|
+
}>;
|
|
808
|
+
reason: z.ZodEnum<{
|
|
809
|
+
expired: "expired";
|
|
810
|
+
qualified: "qualified";
|
|
811
|
+
"unknown-source": "unknown-source";
|
|
812
|
+
"account-changed": "account-changed";
|
|
813
|
+
"endpoint-changed": "endpoint-changed";
|
|
814
|
+
"entitlements-changed": "entitlements-changed";
|
|
815
|
+
"auth-mismatch": "auth-mismatch";
|
|
816
|
+
"duplicate-notification": "duplicate-notification";
|
|
817
|
+
"missing-notification": "missing-notification";
|
|
818
|
+
"commit-mismatch": "commit-mismatch";
|
|
819
|
+
"write-failed": "write-failed";
|
|
820
|
+
"write-conflict": "write-conflict";
|
|
821
|
+
}>;
|
|
822
|
+
preparing: z.ZodNumber;
|
|
823
|
+
dispatched: z.ZodNumber;
|
|
824
|
+
alreadyAborted: z.ZodNumber;
|
|
825
|
+
preserved: z.ZodNumber;
|
|
826
|
+
revoked: z.ZodNumber;
|
|
827
|
+
}, z.core.$strict>>;
|
|
828
|
+
dropped: z.ZodNumber;
|
|
829
|
+
evicted: z.ZodNumber;
|
|
830
|
+
pending: z.ZodOptional<z.ZodNumber>;
|
|
831
|
+
interruptedOnReopen: z.ZodOptional<z.ZodNumber>;
|
|
832
|
+
}, z.core.$strict>>;
|
|
765
833
|
}, z.core.$strict>>;
|
|
766
834
|
pending: z.ZodArray<z.ZodObject<{
|
|
767
835
|
version: z.ZodString;
|
|
@@ -777,6 +845,7 @@ export declare const DiagnosticsViewSchema: z.ZodObject<{
|
|
|
777
845
|
}>;
|
|
778
846
|
stage: z.ZodEnum<{
|
|
779
847
|
ended: "ended";
|
|
848
|
+
dispatched: "dispatched";
|
|
780
849
|
admitted: "admitted";
|
|
781
850
|
"rpc-invoked": "rpc-invoked";
|
|
782
851
|
"host-received": "host-received";
|
|
@@ -792,7 +861,6 @@ export declare const DiagnosticsViewSchema: z.ZodObject<{
|
|
|
792
861
|
"cache-hit": "cache-hit";
|
|
793
862
|
"joined-flight": "joined-flight";
|
|
794
863
|
cooldown: "cooldown";
|
|
795
|
-
dispatched: "dispatched";
|
|
796
864
|
}>;
|
|
797
865
|
bucket: z.ZodNumber;
|
|
798
866
|
count: z.ZodNumber;
|
|
@@ -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
|
};
|
|
@@ -3,6 +3,54 @@ import type { RequestBodyEvidence } from './request-body-evidence.ts';
|
|
|
3
3
|
import type { RequestUploadEvidence } from './request-upload-evidence.ts';
|
|
4
4
|
export declare const REQUEST_DIAGNOSTICS_MAX_ROWS = 128;
|
|
5
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
|
+
}
|
|
6
54
|
export declare const RequestDiagnosticSchema: z.ZodObject<{
|
|
7
55
|
streamId: z.ZodString;
|
|
8
56
|
dispatchIndex: z.ZodNumber;
|
|
@@ -176,6 +224,40 @@ export declare const RequestDiagnosticsSchema: z.ZodObject<{
|
|
|
176
224
|
evicted: z.ZodNumber;
|
|
177
225
|
pending: z.ZodOptional<z.ZodNumber>;
|
|
178
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>>;
|
|
179
261
|
}, z.core.$strict>;
|
|
180
262
|
export type RequestDiagnostic = z.infer<typeof RequestDiagnosticSchema>;
|
|
181
263
|
export interface RequestDiagnosticHandle {
|
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.2-alpha.
|
|
4
|
+
"version": "0.4.2-alpha.8",
|
|
5
5
|
"releaseNotes": "CHANGELOG.md",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public",
|