dsh-github-copilot 0.4.0 → 0.4.2-alpha.2

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/lib/remote.js CHANGED
@@ -761,6 +761,81 @@ const contribution$2 = {
761
761
  }))
762
762
  };
763
763
  //#endregion
764
+ //#region lib/types/auto-allocation-diagnostics.js
765
+ const AUTO_ALLOCATION_DIAGNOSTIC_MAX_ROWS = 1024;
766
+ const dayMs = 864e5;
767
+ const integer$1 = z.number().int().min(0).max(Number.MAX_SAFE_INTEGER);
768
+ const version$1 = z.string().max(64).regex(/^\d+\.\d+\.\d+(?:-[a-zA-Z0-9.-]+)?$/);
769
+ const allocationRow = z.object({
770
+ day: integer$1.multipleOf(dayMs),
771
+ version: version$1,
772
+ policyVersion: z.string().min(1).max(64),
773
+ modelId: z.string().min(1).max(512),
774
+ targetCategory: z.enum([
775
+ "powerful",
776
+ "versatile",
777
+ "lightweight"
778
+ ]),
779
+ category: z.enum([
780
+ "powerful",
781
+ "versatile",
782
+ "lightweight",
783
+ "unknown"
784
+ ]),
785
+ demand: z.enum([
786
+ "simple",
787
+ "routine",
788
+ "complex",
789
+ "unknown"
790
+ ]),
791
+ assessmentSource: z.enum(["local", "semantic"]),
792
+ method: z.enum(["weighted-distribution", "only-candidate"]),
793
+ fallback: z.boolean(),
794
+ highCost: z.boolean(),
795
+ previous: z.boolean(),
796
+ weight: z.number().positive().max(1.5),
797
+ opportunities: integer$1.min(1),
798
+ expectedSelections: z.number().finite().nonnegative().max(Number.MAX_SAFE_INTEGER),
799
+ selections: integer$1
800
+ }).strict();
801
+ const noFitRow = z.object({
802
+ day: integer$1.multipleOf(dayMs),
803
+ version: version$1,
804
+ policyVersion: z.string().min(1).max(64),
805
+ targetCategory: z.enum([
806
+ "powerful",
807
+ "versatile",
808
+ "lightweight"
809
+ ]),
810
+ category: z.enum([
811
+ "powerful",
812
+ "versatile",
813
+ "lightweight",
814
+ "unknown"
815
+ ]),
816
+ demand: z.enum([
817
+ "simple",
818
+ "routine",
819
+ "complex",
820
+ "unknown"
821
+ ]),
822
+ assessmentSource: z.enum(["local", "semantic"]),
823
+ decisions: integer$1.min(1)
824
+ }).strict();
825
+ const AutoAllocationDiagnosticsSchema = z.object({
826
+ status: z.enum(["observed", "not-collected"]),
827
+ rows: z.array(allocationRow).max(AUTO_ALLOCATION_DIAGNOSTIC_MAX_ROWS),
828
+ noFitRows: z.array(noFitRow).max(AUTO_ALLOCATION_DIAGNOSTIC_MAX_ROWS),
829
+ observationStart: integer$1.nullable(),
830
+ observationEnd: integer$1.nullable(),
831
+ completeHistory: z.literal(false),
832
+ rowsTruncated: z.boolean(),
833
+ dropped: integer$1,
834
+ expired: integer$1,
835
+ saturated: integer$1,
836
+ restarts: integer$1
837
+ }).strict().refine((value) => JSON.stringify(value).length <= 15e5, "Auto allocation diagnostic capacity exceeded").refine((value) => value.rows.length + value.noFitRows.length <= AUTO_ALLOCATION_DIAGNOSTIC_MAX_ROWS, "Auto allocation row capacity exceeded").refine(({ observationStart, observationEnd }) => observationStart === null ? observationEnd === null : observationEnd !== null && observationEnd >= observationStart, "Auto allocation observation window is inconsistent");
838
+ //#endregion
764
839
  //#region lib/types/diagnostics-types.js
765
840
  const DIAGNOSTICS_OPERATIONS = [
766
841
  "account-global-switch",
@@ -867,6 +942,7 @@ const DiagnosticsSnapshotSchema = z.object({
867
942
  epoch: integer,
868
943
  updatedAt: integer,
869
944
  rows: z.array(DiagnosticsRowSchema).max(DIAGNOSTICS_MAX_ROWS),
945
+ autoAllocation: AutoAllocationDiagnosticsSchema.optional(),
870
946
  pending: z.array(DiagnosticsPendingSchema).max(128),
871
947
  dropped: integer,
872
948
  clientDropped: integer,
@@ -877,6 +953,7 @@ const DiagnosticsSnapshotSchema = z.object({
877
953
  }).strict().refine((value) => value.pending.reduce((sum, row) => sum + row.count, 0) <= 128, "Diagnostics pending capacity exceeded").refine((value) => JSON.stringify(value).length <= DIAGNOSTICS_MAX_BYTES, "Diagnostics capacity exceeded");
878
954
  const DiagnosticsViewSchema = z.object({
879
955
  enabled: z.boolean(),
956
+ autoAllocationEnabled: z.boolean(),
880
957
  state: z.enum([
881
958
  "loading",
882
959
  "ready",
@@ -928,6 +1005,15 @@ const contribution$1 = {
928
1005
  codec: strictRemoteCodec("dsh-github-copilot#DiagnosticsEnabled", z.boolean())
929
1006
  }]
930
1007
  },
1008
+ {
1009
+ method: "setAutoAllocationEnabled",
1010
+ parameters: [{
1011
+ name: "enabled",
1012
+ wire: "enabled",
1013
+ source: "json",
1014
+ codec: strictRemoteCodec("dsh-github-copilot#AutoAllocationDiagnosticsEnabled", z.boolean())
1015
+ }]
1016
+ },
931
1017
  {
932
1018
  method: "recordClient",
933
1019
  parameters: [{
package/lib/routed-web.js CHANGED
@@ -1,5 +1,5 @@
1
- import { T as isPluginPreviewProvider, b as currentSearchSelection, t as isCopilotSearchSelection, y as currentSearchInitiator } from "./search-routing-CV2hs8as.js";
2
1
  import "./copilot-identity-DRZY_d2X.js";
2
+ import { T as isPluginPreviewProvider, b as currentSearchSelection, t as isCopilotSearchSelection, y as currentSearchInitiator } from "./search-routing-CV2hs8as.js";
3
3
  import { WebError, WebRuntime } from "@deepseek-ai/dsh-web";
4
4
  //#region lib/types/routed-web.js
5
5
  /**
@@ -0,0 +1,102 @@
1
+ import { z } from 'zod';
2
+ import type { AutoSelectionExplanation } from './auto-model-routing.ts';
3
+ export declare const AUTO_ALLOCATION_DIAGNOSTIC_MAX_ROWS = 1024;
4
+ export declare const AUTO_ALLOCATION_DIAGNOSTIC_RETENTION_MS: number;
5
+ export declare const AutoAllocationDiagnosticsSchema: z.ZodObject<{
6
+ status: z.ZodEnum<{
7
+ observed: "observed";
8
+ "not-collected": "not-collected";
9
+ }>;
10
+ rows: z.ZodArray<z.ZodObject<{
11
+ day: z.ZodNumber;
12
+ version: z.ZodString;
13
+ policyVersion: z.ZodString;
14
+ modelId: z.ZodString;
15
+ targetCategory: z.ZodEnum<{
16
+ powerful: "powerful";
17
+ versatile: "versatile";
18
+ lightweight: "lightweight";
19
+ }>;
20
+ category: z.ZodEnum<{
21
+ unknown: "unknown";
22
+ powerful: "powerful";
23
+ versatile: "versatile";
24
+ lightweight: "lightweight";
25
+ }>;
26
+ demand: z.ZodEnum<{
27
+ unknown: "unknown";
28
+ simple: "simple";
29
+ routine: "routine";
30
+ complex: "complex";
31
+ }>;
32
+ assessmentSource: z.ZodEnum<{
33
+ local: "local";
34
+ semantic: "semantic";
35
+ }>;
36
+ method: z.ZodEnum<{
37
+ "weighted-distribution": "weighted-distribution";
38
+ "only-candidate": "only-candidate";
39
+ }>;
40
+ fallback: z.ZodBoolean;
41
+ highCost: z.ZodBoolean;
42
+ previous: z.ZodBoolean;
43
+ weight: z.ZodNumber;
44
+ opportunities: z.ZodNumber;
45
+ expectedSelections: z.ZodNumber;
46
+ selections: z.ZodNumber;
47
+ }, z.core.$strict>>;
48
+ noFitRows: z.ZodArray<z.ZodObject<{
49
+ day: z.ZodNumber;
50
+ version: z.ZodString;
51
+ policyVersion: z.ZodString;
52
+ targetCategory: z.ZodEnum<{
53
+ powerful: "powerful";
54
+ versatile: "versatile";
55
+ lightweight: "lightweight";
56
+ }>;
57
+ category: z.ZodEnum<{
58
+ unknown: "unknown";
59
+ powerful: "powerful";
60
+ versatile: "versatile";
61
+ lightweight: "lightweight";
62
+ }>;
63
+ demand: z.ZodEnum<{
64
+ unknown: "unknown";
65
+ simple: "simple";
66
+ routine: "routine";
67
+ complex: "complex";
68
+ }>;
69
+ assessmentSource: z.ZodEnum<{
70
+ local: "local";
71
+ semantic: "semantic";
72
+ }>;
73
+ decisions: z.ZodNumber;
74
+ }, z.core.$strict>>;
75
+ observationStart: z.ZodNullable<z.ZodNumber>;
76
+ observationEnd: z.ZodNullable<z.ZodNumber>;
77
+ completeHistory: z.ZodLiteral<false>;
78
+ rowsTruncated: z.ZodBoolean;
79
+ dropped: z.ZodNumber;
80
+ expired: z.ZodNumber;
81
+ saturated: z.ZodNumber;
82
+ restarts: z.ZodNumber;
83
+ }, z.core.$strict>;
84
+ export type AutoAllocationDiagnostics = z.infer<typeof AutoAllocationDiagnosticsSchema>;
85
+ export declare function emptyAutoAllocationDiagnostics(): AutoAllocationDiagnostics;
86
+ /** Profile-local rolling aggregates; no per-turn, Session, prompt, or outcome records. */
87
+ export declare class AutoAllocationDiagnosticsCollector {
88
+ private readonly version;
89
+ private readonly changed;
90
+ private readonly wall;
91
+ private data;
92
+ private enabled;
93
+ constructor(version: string, changed?: () => void, wall?: () => number);
94
+ restore(value: unknown, countRestart?: boolean): void;
95
+ setEnabled(enabled: boolean): void;
96
+ clear(): void;
97
+ record(explanation: AutoSelectionExplanation): void;
98
+ snapshot(): AutoAllocationDiagnostics;
99
+ private expire;
100
+ private add;
101
+ }
102
+ //# sourceMappingURL=auto-allocation-diagnostics.d.ts.map
@@ -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,8 @@ 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;
17
19
  /** Hosted-search switch; managed chat requests remain enabled. */
18
20
  enabled: boolean;
19
21
  /**
@@ -84,7 +86,7 @@ export interface InlineConfig {
84
86
  /** Internal JSON backup of route leaves temporarily owned by the GPT-6 overlay. */
85
87
  temporaryRouteBackup?: string;
86
88
  }
87
- export type LiveInlineConfig = Omit<InlineConfig, 'diagnosticsEnabled' | 'searchModel' | 'searchRouting' | 'temporaryRouteBackup' | 'excludedModelIds' | 'highCostModelIds' | 'parentModelFollow' | 'followParentModel' | 'activeAccountId' | 'sessionAccounts' | 'sessionContinuation' | 'continuationDefaultHistory'> & {
89
+ export type LiveInlineConfig = Omit<InlineConfig, 'diagnosticsEnabled' | 'autoAllocationDiagnosticsEnabled' | 'searchModel' | 'searchRouting' | 'temporaryRouteBackup' | 'excludedModelIds' | 'highCostModelIds' | 'parentModelFollow' | 'followParentModel' | 'activeAccountId' | 'sessionAccounts' | 'sessionContinuation' | 'continuationDefaultHistory'> & {
88
90
  continuationDefaultHistory?: InlineConfig['continuationDefaultHistory'] | LiveSetting<ArrayLike<{
89
91
  enabled: boolean;
90
92
  changedAt: number;
@@ -92,6 +94,7 @@ export type LiveInlineConfig = Omit<InlineConfig, 'diagnosticsEnabled' | 'search
92
94
  sessionContinuation?: SessionContinuationPreference[] | LiveSetting<ArrayLike<SessionContinuationPreference>>;
93
95
  sessionAccounts?: SessionAccountPreference[] | LiveSetting<ArrayLike<SessionAccountPreference>>;
94
96
  diagnosticsEnabled?: boolean | LiveSetting<boolean>;
97
+ autoAllocationDiagnosticsEnabled?: boolean | LiveSetting<boolean>;
95
98
  activeAccountId?: string | LiveSetting<string | undefined>;
96
99
  followParentModel?: boolean | LiveSetting<boolean>;
97
100
  parentModelFollow?: ParentModelBinding[] | LiveSetting<ArrayLike<ParentModelBinding>>;
@@ -101,8 +104,9 @@ export type LiveInlineConfig = Omit<InlineConfig, 'diagnosticsEnabled' | 'search
101
104
  searchRouting?: WebSearchRoutingConfig | LiveSetting<WebSearchRoutingConfig | undefined>;
102
105
  temporaryRouteBackup?: string | LiveSetting<string | undefined>;
103
106
  };
104
- export type ResolvedInlineConfig = Omit<InlineConfig, 'diagnosticsEnabled' | 'searchModel' | 'searchRouting' | 'temporaryRouteBackup' | 'excludedModelIds' | 'highCostModelIds' | 'parentModelFollow' | 'followParentModel' | 'activeAccountId' | 'sessionAccounts' | 'sessionContinuation' | 'continuationDefaultHistory'> & {
107
+ export type ResolvedInlineConfig = Omit<InlineConfig, 'diagnosticsEnabled' | 'autoAllocationDiagnosticsEnabled' | 'searchModel' | 'searchRouting' | 'temporaryRouteBackup' | 'excludedModelIds' | 'highCostModelIds' | 'parentModelFollow' | 'followParentModel' | 'activeAccountId' | 'sessionAccounts' | 'sessionContinuation' | 'continuationDefaultHistory'> & {
105
108
  diagnosticsEnabled: LiveSetting<boolean>;
109
+ autoAllocationDiagnosticsEnabled: LiveSetting<boolean>;
106
110
  continuationDefaultHistory: LiveSetting<ArrayLike<{
107
111
  enabled: boolean;
108
112
  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;
@@ -3,10 +3,15 @@
3
3
  * that DSH's built-in llm-pi-ai adapter owns.
4
4
  */
5
5
  import type { Context } from '@deepseek-ai/cordis';
6
- import { type CredentialStore } from '@earendil-works/pi-ai';
6
+ 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
+ import type { GitHubCopilotOAuthCredential } from './copilot-grant.ts';
8
9
  import type { CopilotAccountBinding } from './copilot-accounts-types.ts';
9
10
  export { normalizeGitHubCopilotOAuthCredential } from './copilot-grant.ts';
11
+ /** Only a validated native OAuth refresh may certify its exact returned object. */
12
+ export declare function certifyCopilotNativeRefresh(previous: GitHubCopilotOAuthCredential, result: GitHubCopilotOAuthCredential, derive: OAuthAuth['toAuth'], signal?: AbortSignal): Promise<void>;
13
+ /** Consume exactly one notification from the serialized, certified write. */
14
+ export declare function observeCopilotNativeRefresh(ctx: Context, key: string): Promise<boolean> | undefined;
10
15
  export declare function captureActiveGitHubCopilotBinding(ctx: Context): CopilotAccountBinding | undefined;
11
16
  /** Bind exactly one logical route to the canonical Host-owned credential record. */
12
17
  export declare function createGitHubCopilotCredentialStore(ctx: Context, logicalProviderId?: typeof GITHUB_COPILOT_PROVIDER_ID | typeof GITHUB_COPILOT_PREVIEW_PROVIDER_ID, binding?: CopilotAccountBinding): CredentialStore;
@@ -236,8 +236,8 @@ export declare const DiagnosticsAnalysisReportSchema: z.ZodObject<{
236
236
  }>;
237
237
  metric: z.ZodEnum<{
238
238
  unknown: "unknown";
239
- "environment-fault": "environment-fault";
240
239
  failed: "failed";
240
+ "environment-fault": "environment-fault";
241
241
  }>;
242
242
  reason: z.ZodEnum<{
243
243
  none: "none";
@@ -1,4 +1,5 @@
1
1
  import type { DiagnosticsOperation, DiagnosticsStage, DiagnosticsOutcome, DiagnosticsReason, DiagnosticsRow, DiagnosticsSnapshot } from './diagnostics-types.ts';
2
+ import type { AutoSelectionExplanation } from './auto-model-routing.ts';
2
3
  export interface DiagnosticsHandle {
3
4
  stage(stage: DiagnosticsStage): void;
4
5
  finish(outcome: DiagnosticsOutcome, reason?: DiagnosticsReason): void;
@@ -14,7 +15,9 @@ export declare class DiagnosticsCollector {
14
15
  private data;
15
16
  private readonly live;
16
17
  private enabled;
18
+ private autoAllocationEnabled;
17
19
  private lastWall;
20
+ private readonly autoAllocation;
18
21
  constructor(version: string, layer: 'client' | 'host', changed?: () => void, wall?: () => number, mono?: () => number);
19
22
  restore(snapshot: DiagnosticsSnapshot): void;
20
23
  setEnabled(enabled: boolean): void;
@@ -31,6 +34,8 @@ export declare class DiagnosticsCollector {
31
34
  close(): void;
32
35
  noteDropped(): void;
33
36
  noteClientGaps(dropped: number, unconfirmed: number): void;
37
+ recordAutoAllocation(explanation: AutoSelectionExplanation): void;
38
+ setAutoAllocationEnabled(enabled: boolean): void;
34
39
  mergeClient(rows: readonly DiagnosticsRow[]): void;
35
40
  }
36
41
  //# sourceMappingURL=diagnostics-collector.d.ts.map
@@ -20,7 +20,7 @@ export declare const diagnosticsDomain: {
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
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";
23
+ metric: "paused" | "unknown" | "success" | "stage" | "failed" | "dropped" | "expired" | "started" | "no-op" | "cancelled" | "policy-rejected" | "revoked" | "environment-fault" | "interrupted" | "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;
@@ -38,6 +38,45 @@ 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
+ }[];
61
+ noFitRows: {
62
+ day: number;
63
+ version: string;
64
+ policyVersion: string;
65
+ targetCategory: "powerful" | "versatile" | "lightweight";
66
+ category: "unknown" | "powerful" | "versatile" | "lightweight";
67
+ demand: "unknown" | "simple" | "routine" | "complex";
68
+ assessmentSource: "local" | "semantic";
69
+ decisions: number;
70
+ }[];
71
+ observationStart: number | null;
72
+ observationEnd: number | null;
73
+ completeHistory: false;
74
+ rowsTruncated: boolean;
75
+ dropped: number;
76
+ expired: number;
77
+ saturated: number;
78
+ restarts: number;
79
+ } | undefined;
41
80
  }>;
42
81
  };
43
82
  export declare function diagnosticsDomainForProfile(profileId: string): typeof diagnosticsDomain;
@@ -54,6 +93,7 @@ export declare class DiagnosticsController extends TypertRemoteService {
54
93
  private state;
55
94
  private problem;
56
95
  private enabled;
96
+ private autoAllocationEnabled;
57
97
  private dirty;
58
98
  private persistedAt;
59
99
  private revision;
@@ -66,6 +106,7 @@ export declare class DiagnosticsController extends TypertRemoteService {
66
106
  markCompactionCancelled(session: object): void;
67
107
  get(): DiagnosticsView;
68
108
  setEnabled(enabled: boolean): Promise<DiagnosticsView>;
109
+ setAutoAllocationEnabled(enabled: boolean): Promise<DiagnosticsView>;
69
110
  clear(): Promise<DiagnosticsView>;
70
111
  recordClient(batch: ClientDiagnosticsBatch): Promise<DiagnosticsView>;
71
112
  }
@@ -42,18 +42,18 @@ export declare const ClientDiagnosticsBatchSchema: z.ZodObject<{
42
42
  metric: z.ZodEnum<{
43
43
  paused: "paused";
44
44
  unknown: "unknown";
45
- started: "started";
46
- stage: "stage";
47
45
  success: "success";
46
+ stage: "stage";
47
+ failed: "failed";
48
+ dropped: "dropped";
49
+ expired: "expired";
50
+ started: "started";
48
51
  "no-op": "no-op";
49
52
  cancelled: "cancelled";
50
53
  "policy-rejected": "policy-rejected";
51
54
  revoked: "revoked";
52
55
  "environment-fault": "environment-fault";
53
- failed: "failed";
54
56
  interrupted: "interrupted";
55
- dropped: "dropped";
56
- expired: "expired";
57
57
  "clock-discontinuity": "clock-discontinuity";
58
58
  "pending-sample": "pending-sample";
59
59
  }>;
@@ -99,6 +99,7 @@ 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>>;
102
103
  clear(): Promise<RemoteResult<DiagnosticsView>>;
103
104
  recordClient(batch: ClientDiagnosticsBatch): Promise<RemoteResult<DiagnosticsView>>;
104
105
  };