dsh-github-copilot 0.4.1 → 0.4.2-alpha.11

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.
Files changed (51) hide show
  1. package/AGENTS.md +42 -6
  2. package/CHANGELOG.md +126 -0
  3. package/README.md +75 -25
  4. package/README.zh.md +55 -20
  5. package/deployment-baseline.json +30 -3
  6. package/docs/auto-high-cost.md +51 -20
  7. package/docs/auto-iteration-review.json +13 -13
  8. package/docs/auto-task-routing.md +118 -19
  9. package/docs/automatic-model-routing.md +2 -1
  10. package/docs/copilot-accounts.md +6 -0
  11. package/docs/copilot-compaction.md +1 -1
  12. package/docs/plugin-diagnostics.md +159 -6
  13. package/lib/client.js +814 -59
  14. package/lib/client.js.map +1 -1
  15. package/lib/diagnostics-analysis.js +4 -2
  16. package/lib/diagnostics-types-qvtuvM5E.js +661 -0
  17. package/lib/index.js +8775 -7934
  18. package/lib/manual-compaction-recovery.js +1 -1
  19. package/lib/remote.js +278 -6
  20. package/lib/routed-web.js +1 -1
  21. package/lib/types/auto-allocation-diagnostics.d.ts +126 -0
  22. package/lib/types/auto-allocation-evidence.d.ts +5 -1
  23. package/lib/types/auto-allocation.d.ts +7 -2
  24. package/lib/types/auto-assessment-evidence.d.ts +65 -0
  25. package/lib/types/auto-model-host.d.ts +1 -0
  26. package/lib/types/auto-model-routing.d.ts +1 -1
  27. package/lib/types/auto-task-assessment.d.ts +4 -2
  28. package/lib/types/auto-task-classifier.d.ts +2 -1
  29. package/lib/types/compaction-continuation.d.ts +1 -1
  30. package/lib/types/config.d.ts +18 -2
  31. package/lib/types/context-evidence.d.ts +4 -4
  32. package/lib/types/copilot-auth.d.ts +2 -1
  33. package/lib/types/copilot-usage-remote.d.ts +1 -1
  34. package/lib/types/diagnostics-analysis.d.ts +3 -2
  35. package/lib/types/diagnostics-card.d.ts +1 -0
  36. package/lib/types/diagnostics-collector.d.ts +14 -0
  37. package/lib/types/diagnostics-host.d.ts +114 -3
  38. package/lib/types/diagnostics-remote.d.ts +11 -9
  39. package/lib/types/diagnostics-types.d.ts +486 -30
  40. package/lib/types/native-settings-style.d.ts +1 -1
  41. package/lib/types/preview-provider.d.ts +8 -2
  42. package/lib/types/preview-route.d.ts +1 -1
  43. package/lib/types/remote.d.ts +1 -1
  44. package/lib/types/request-body-composition.d.ts +17 -0
  45. package/lib/types/request-body-evidence.d.ts +2 -1
  46. package/lib/types/request-diagnostics.d.ts +278 -0
  47. package/lib/types/session-continuation-types.d.ts +2 -2
  48. package/lib/types/turn-selection-host.d.ts +2 -1
  49. package/lib/types/turn-selection.d.ts +39 -2
  50. package/package.json +2 -2
  51. package/lib/diagnostics-types-FVf6zjob.js +0 -182
@@ -40,7 +40,7 @@ export declare const compactionContinuationDefinition: {
40
40
  export declare function installCompactionContinuation(ctx: Context, enabled: (agent: Agent) => boolean): {
41
41
  status(agent: Agent): {
42
42
  id: string;
43
- state: "running" | "cancelled" | "failed" | "completed" | "blocked";
43
+ state: "running" | "failed" | "cancelled" | "completed" | "blocked";
44
44
  } | undefined;
45
45
  prepare(request: GenerateOptions): ((payload: unknown) => Promise<unknown>) | undefined;
46
46
  dispose(): void;
@@ -14,6 +14,10 @@ import type { SessionContinuationPreference } from './session-continuation-types
14
14
  export interface InlineConfig {
15
15
  /** Opt-in local aggregate diagnostics; no uploads or scheduled analysis. */
16
16
  diagnosticsEnabled?: boolean;
17
+ /** Independent opt-in persistence of Auto allocation aggregates. */
18
+ autoAllocationDiagnosticsEnabled?: boolean;
19
+ /** Separate opt-in content-free physical request observations. */
20
+ requestDiagnosticsEnabled?: boolean;
17
21
  /** Hosted-search switch; managed chat requests remain enabled. */
18
22
  enabled: boolean;
19
23
  /**
@@ -65,6 +69,10 @@ export interface InlineConfig {
65
69
  followParentModel?: boolean;
66
70
  /** Default-on bounded task assessment; explicit false opts out of auxiliary inference. */
67
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;
68
76
  /** Capture bounded local candidate opportunities for future policy review. */
69
77
  autoAllocationEvidence?: boolean;
70
78
  /** Estimated managed-route input headroom, separate from truthful catalog capacities. */
@@ -84,7 +92,9 @@ export interface InlineConfig {
84
92
  /** Internal JSON backup of route leaves temporarily owned by the GPT-6 overlay. */
85
93
  temporaryRouteBackup?: string;
86
94
  }
87
- export type LiveInlineConfig = Omit<InlineConfig, 'diagnosticsEnabled' | '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>;
88
98
  continuationDefaultHistory?: InlineConfig['continuationDefaultHistory'] | LiveSetting<ArrayLike<{
89
99
  enabled: boolean;
90
100
  changedAt: number;
@@ -92,6 +102,8 @@ export type LiveInlineConfig = Omit<InlineConfig, 'diagnosticsEnabled' | 'search
92
102
  sessionContinuation?: SessionContinuationPreference[] | LiveSetting<ArrayLike<SessionContinuationPreference>>;
93
103
  sessionAccounts?: SessionAccountPreference[] | LiveSetting<ArrayLike<SessionAccountPreference>>;
94
104
  diagnosticsEnabled?: boolean | LiveSetting<boolean>;
105
+ autoAllocationDiagnosticsEnabled?: boolean | LiveSetting<boolean>;
106
+ requestDiagnosticsEnabled?: boolean | LiveSetting<boolean>;
95
107
  activeAccountId?: string | LiveSetting<string | undefined>;
96
108
  followParentModel?: boolean | LiveSetting<boolean>;
97
109
  parentModelFollow?: ParentModelBinding[] | LiveSetting<ArrayLike<ParentModelBinding>>;
@@ -101,8 +113,12 @@ export type LiveInlineConfig = Omit<InlineConfig, 'diagnosticsEnabled' | 'search
101
113
  searchRouting?: WebSearchRoutingConfig | LiveSetting<WebSearchRoutingConfig | undefined>;
102
114
  temporaryRouteBackup?: string | LiveSetting<string | undefined>;
103
115
  };
104
- export type ResolvedInlineConfig = Omit<InlineConfig, 'diagnosticsEnabled' | '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>;
105
119
  diagnosticsEnabled: LiveSetting<boolean>;
120
+ autoAllocationDiagnosticsEnabled: LiveSetting<boolean>;
121
+ requestDiagnosticsEnabled: LiveSetting<boolean>;
106
122
  continuationDefaultHistory: LiveSetting<ArrayLike<{
107
123
  enabled: boolean;
108
124
  changedAt: number;
@@ -52,8 +52,8 @@ export declare const ContextEvidenceSchema: z.ZodObject<{
52
52
  }, z.core.$strict>>;
53
53
  request: z.ZodEnum<{
54
54
  unknown: "unknown";
55
- cancelled: "cancelled";
56
55
  failed: "failed";
56
+ cancelled: "cancelled";
57
57
  pending: "pending";
58
58
  idle: "idle";
59
59
  succeeded: "succeeded";
@@ -131,8 +131,8 @@ export declare const contextEvidenceDefinition: {
131
131
  }, z.core.$strict>>;
132
132
  request: z.ZodEnum<{
133
133
  unknown: "unknown";
134
- cancelled: "cancelled";
135
134
  failed: "failed";
135
+ cancelled: "cancelled";
136
136
  pending: "pending";
137
137
  idle: "idle";
138
138
  succeeded: "succeeded";
@@ -197,8 +197,8 @@ export declare const contextEvidenceDefinition: {
197
197
  }, z.core.$strict>>;
198
198
  request: z.ZodEnum<{
199
199
  unknown: "unknown";
200
- cancelled: "cancelled";
201
200
  failed: "failed";
201
+ cancelled: "cancelled";
202
202
  pending: "pending";
203
203
  idle: "idle";
204
204
  succeeded: "succeeded";
@@ -243,7 +243,7 @@ export declare const contextEvidenceDefinition: {
243
243
  turn: number;
244
244
  step: number;
245
245
  } | null;
246
- request: "unknown" | "cancelled" | "failed" | "pending" | "idle" | "succeeded";
246
+ request: "unknown" | "failed" | "cancelled" | "pending" | "idle" | "succeeded";
247
247
  } | null | undefined;
248
248
  activeStep?: {
249
249
  turn: number;
@@ -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;
@@ -20,8 +20,8 @@ export declare const CopilotUsageViewSchema: z.ZodObject<{
20
20
  }>;
21
21
  billing: z.ZodEnum<{
22
22
  unknown: "unknown";
23
- credits: "credits";
24
23
  requests: "requests";
24
+ credits: "credits";
25
25
  }>;
26
26
  budget: z.ZodEnum<{
27
27
  unknown: "unknown";
@@ -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" | "dispatched";
23
- metric: "paused" | "unknown" | "started" | "stage" | "success" | "no-op" | "cancelled" | "policy-rejected" | "revoked" | "environment-fault" | "failed" | "interrupted" | "dropped" | "expired" | "clock-discontinuity" | "pending-sample";
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" | "dispatched";
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
- "no-op": "no-op";
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
  };