dsh-github-copilot 0.4.2-alpha.5 → 0.4.2-alpha.6

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.
@@ -1,4 +1,4 @@
1
- import { a as DiagnosticsPendingSchema, c as DiagnosticsViewSchema, n as DIAGNOSTICS_OPERATIONS, r as DIAGNOSTICS_REASONS, s as DiagnosticsSnapshotSchema } from "./diagnostics-types-Cd4BmeOe.js";
1
+ import { a as DiagnosticsPendingSchema, c as DiagnosticsViewSchema, n as DIAGNOSTICS_OPERATIONS, r as DIAGNOSTICS_REASONS, s as DiagnosticsSnapshotSchema } from "./diagnostics-types-BDIc78T4.js";
2
2
  import { z } from "zod";
3
3
  //#region lib/types/diagnostics-analysis.js
4
4
  const RETENTION_MS = 12096e5;
@@ -113,6 +113,18 @@ const AUTO_ALLOCATION_DIAGNOSTIC_RETENTION_MS = 12096e5;
113
113
  const dayMs = 864e5;
114
114
  const integer$2 = z.number().int().min(0).max(Number.MAX_SAFE_INTEGER);
115
115
  const version$1 = z.string().max(64).regex(/^\d+\.\d+\.\d+(?:-[a-zA-Z0-9.-]+)?$/);
116
+ const assessmentOutcome = z.enum([
117
+ "local-known",
118
+ "local-unknown",
119
+ "semantic-known",
120
+ "semantic-unknown",
121
+ "disabled",
122
+ "unavailable",
123
+ "invalid-result",
124
+ "timeout",
125
+ "failed",
126
+ "context-omitted"
127
+ ]);
116
128
  const allocationRow = z.object({
117
129
  day: integer$2.multipleOf(dayMs),
118
130
  version: version$1,
@@ -136,6 +148,7 @@ const allocationRow = z.object({
136
148
  "unknown"
137
149
  ]),
138
150
  assessmentSource: z.enum(["local", "semantic"]),
151
+ assessmentOutcome: assessmentOutcome.optional(),
139
152
  method: z.enum(["weighted-distribution", "only-candidate"]),
140
153
  fallback: z.boolean(),
141
154
  highCost: z.boolean(),
@@ -167,6 +180,7 @@ const noFitRow = z.object({
167
180
  "unknown"
168
181
  ]),
169
182
  assessmentSource: z.enum(["local", "semantic"]),
183
+ assessmentOutcome: assessmentOutcome.optional(),
170
184
  decisions: integer$2.min(1)
171
185
  }).strict();
172
186
  const AutoAllocationDiagnosticsSchema = z.object({
@@ -197,7 +211,7 @@ function emptyAutoAllocationDiagnostics() {
197
211
  restarts: 0
198
212
  };
199
213
  }
200
- /** Profile-local rolling aggregates; no per-turn, Session, prompt, or outcome records. */
214
+ /** Profile-local rolling aggregates; no per-turn, Session, prompt, or execution-outcome records. */
201
215
  var AutoAllocationDiagnosticsCollector = class {
202
216
  version;
203
217
  changed;
@@ -229,10 +243,12 @@ var AutoAllocationDiagnosticsCollector = class {
229
243
  const now = this.wall();
230
244
  this.expire(now);
231
245
  const day = Math.floor(now / dayMs) * dayMs;
246
+ const assessment = explanation.assessment;
247
+ const outcome = assessment.diagnostic ?? (assessment.source === "local" ? assessment.demand === "unknown" ? "local-unknown" : "local-known" : assessment.demand === "unknown" ? "semantic-unknown" : "semantic-known");
232
248
  this.data.observationStart = this.data.observationStart === null ? day : Math.min(this.data.observationStart, day);
233
249
  this.data.observationEnd = this.data.observationEnd === null ? day : Math.max(this.data.observationEnd, day);
234
250
  if (explanation.method === "no-fit") {
235
- const row = this.data.noFitRows.find((item) => item.day === day && item.version === this.version && item.policyVersion === "high-cost-v1" && item.targetCategory === explanation.targetCategory && item.category === explanation.selectedCategory && item.demand === explanation.assessment.demand && item.assessmentSource === explanation.assessment.source);
251
+ const row = this.data.noFitRows.find((item) => item.day === day && item.version === this.version && item.policyVersion === "high-cost-v1" && item.targetCategory === explanation.targetCategory && item.category === explanation.selectedCategory && item.demand === explanation.assessment.demand && item.assessmentSource === explanation.assessment.source && item.assessmentOutcome === outcome);
236
252
  if (row) row.decisions = this.add(row.decisions, 1);
237
253
  else if (this.data.rows.length + this.data.noFitRows.length < 1024) this.data.noFitRows.push({
238
254
  day,
@@ -242,6 +258,7 @@ var AutoAllocationDiagnosticsCollector = class {
242
258
  category: explanation.selectedCategory,
243
259
  demand: explanation.assessment.demand,
244
260
  assessmentSource: explanation.assessment.source,
261
+ assessmentOutcome: outcome,
245
262
  decisions: 1
246
263
  });
247
264
  else {
@@ -261,7 +278,7 @@ var AutoAllocationDiagnosticsCollector = class {
261
278
  }
262
279
  const allocation = parsed.data;
263
280
  for (const candidate of allocation.candidates) {
264
- const row = this.data.rows.find((item) => item.day === day && item.version === this.version && item.policyVersion === allocation.policyVersion && item.modelId === candidate.modelId && item.targetCategory === explanation.targetCategory && item.category === explanation.selectedCategory && item.demand === explanation.assessment.demand && item.assessmentSource === explanation.assessment.source && item.method === explanation.method && item.fallback === explanation.fallback && item.highCost === candidate.highCost && item.previous === candidate.previous && item.weight === candidate.weight);
281
+ const row = this.data.rows.find((item) => item.day === day && item.version === this.version && item.policyVersion === allocation.policyVersion && item.modelId === candidate.modelId && item.targetCategory === explanation.targetCategory && item.category === explanation.selectedCategory && item.demand === explanation.assessment.demand && item.assessmentSource === explanation.assessment.source && item.assessmentOutcome === outcome && item.method === explanation.method && item.fallback === explanation.fallback && item.highCost === candidate.highCost && item.previous === candidate.previous && item.weight === candidate.weight);
265
282
  if (row) {
266
283
  row.opportunities = this.add(row.opportunities, 1);
267
284
  row.expectedSelections = Math.min(Number.MAX_SAFE_INTEGER, row.expectedSelections + candidate.expectedShare);
@@ -277,6 +294,7 @@ var AutoAllocationDiagnosticsCollector = class {
277
294
  assessmentSource: explanation.assessment.source,
278
295
  method: explanation.method,
279
296
  fallback: explanation.fallback,
297
+ assessmentOutcome: outcome,
280
298
  highCost: candidate.highCost,
281
299
  previous: candidate.previous,
282
300
  weight: candidate.weight,
package/lib/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { a as GITHUB_COPILOT_PREVIEW_PROVIDER_ID, i as GITHUB_COPILOT_CREDENTIAL_KEY, n as GITHUB_COPILOT_AUTO_INTELLIGENCE_MODEL_ID, o as GITHUB_COPILOT_PROVIDER_ID, r as GITHUB_COPILOT_AUTO_MODEL_ID, s as autoModelPreference, t as GITHUB_COPILOT_AUTO_EFFICIENCY_MODEL_ID } from "./copilot-identity-DRZY_d2X.js";
2
- import { S as normalizeExcludedModelIds, _ as AutoAllocationSchema, b as ModelExclusionTurns, c as DiagnosticsViewSchema, d as diagnosticsReason, f as REQUEST_DIAGNOSTICS_RETENTION_MS, g as AUTO_ALLOCATION_POLICY, h as emptyAutoAllocationDiagnostics, i as DIAGNOSTICS_RETENTION_MS, l as diagnosticsBucket, m as AutoAllocationDiagnosticsCollector, o as DiagnosticsRowSchema, p as RequestDiagnosticSchema, s as DiagnosticsSnapshotSchema, u as diagnosticsOutcome, v as allocateAutoModel, x as excludedModelSet, y as normalizeHighCostModelIds } from "./diagnostics-types-Cd4BmeOe.js";
2
+ import { S as normalizeExcludedModelIds, _ as AutoAllocationSchema, b as ModelExclusionTurns, c as DiagnosticsViewSchema, d as diagnosticsReason, f as REQUEST_DIAGNOSTICS_RETENTION_MS, g as AUTO_ALLOCATION_POLICY, h as emptyAutoAllocationDiagnostics, i as DIAGNOSTICS_RETENTION_MS, l as diagnosticsBucket, m as AutoAllocationDiagnosticsCollector, o as DiagnosticsRowSchema, p as RequestDiagnosticSchema, s as DiagnosticsSnapshotSchema, u as diagnosticsOutcome, v as allocateAutoModel, x as excludedModelSet, y as normalizeHighCostModelIds } from "./diagnostics-types-BDIc78T4.js";
3
3
  import { C as providerErrorMessage, D as onSettingsNamespaceUpdated, E as readCopilotCatalog, O as readConfigValue, S as isAbortError, T as isPluginPreviewProvider, _ as sameCandidates, a as COPILOT_HOSTED_SEARCH_PROVIDER_ID, b as currentSearchSelection, c as applyRequestAuth, d as ANTHROPIC_WEB_SEARCH_TOOL_TYPE, f as GITHUB_COPILOT_CREDENTIAL_KEY$1, g as candidatesForRoute, h as WEB_SEARCH_TOOL_TYPE, i as describeSearchBackend, k as readSettingsNamespace, l as normalizeRequestAuth, m as SearchPlan, n as routeSessionSearch, o as GITHUB_COPILOT_HOSTED_SEARCH_PROVIDER_ID, p as RESPONSES_WEB_SEARCH_TOOL_TYPE, r as DescribedSearchFallbackError, s as createTraditionalSearchProvider, t as isCopilotSearchSelection, u as providerRequestHeaders, v as currentChatRoute, w as readBounded, x as abortable$1, y as currentSearchInitiator } from "./search-routing-CV2hs8as.js";
4
4
  import { a as selectCompactionReasoning, i as resolveRequestBudgetPolicy, n as assessRequestBudget, r as calculateRequestBudget, t as DEFAULT_REQUEST_BUDGET_POLICY } from "./request-budget-DLY_aRq0.js";
5
5
  import { Remote, RemoteError, TypertRemoteService } from "@deepseek-ai/dsh-typert-protocol";
@@ -493,7 +493,7 @@ const result$1 = strictRemoteCodec("dsh-github-copilot#DiagnosticsView", Diagnos
493
493
  var package_default = {
494
494
  name: "dsh-github-copilot",
495
495
  description: "DSH companion for GitHub Copilot sign-in, account-aware model profiles, tool compatibility, and provider-hosted search.",
496
- version: "0.4.2-alpha.5",
496
+ version: "0.4.2-alpha.6",
497
497
  releaseNotes: "CHANGELOG.md",
498
498
  publishConfig: {
499
499
  "access": "public",
@@ -1,5 +1,5 @@
1
1
  import "./copilot-identity-DRZY_d2X.js";
2
- import { d as diagnosticsReason, u as diagnosticsOutcome } from "./diagnostics-types-Cd4BmeOe.js";
2
+ import { d as diagnosticsReason, u as diagnosticsOutcome } from "./diagnostics-types-BDIc78T4.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
@@ -766,6 +766,18 @@ const AUTO_ALLOCATION_DIAGNOSTIC_MAX_ROWS = 1024;
766
766
  const dayMs = 864e5;
767
767
  const integer$2 = z.number().int().min(0).max(Number.MAX_SAFE_INTEGER);
768
768
  const version$1 = z.string().max(64).regex(/^\d+\.\d+\.\d+(?:-[a-zA-Z0-9.-]+)?$/);
769
+ const assessmentOutcome = z.enum([
770
+ "local-known",
771
+ "local-unknown",
772
+ "semantic-known",
773
+ "semantic-unknown",
774
+ "disabled",
775
+ "unavailable",
776
+ "invalid-result",
777
+ "timeout",
778
+ "failed",
779
+ "context-omitted"
780
+ ]);
769
781
  const allocationRow = z.object({
770
782
  day: integer$2.multipleOf(dayMs),
771
783
  version: version$1,
@@ -789,6 +801,7 @@ const allocationRow = z.object({
789
801
  "unknown"
790
802
  ]),
791
803
  assessmentSource: z.enum(["local", "semantic"]),
804
+ assessmentOutcome: assessmentOutcome.optional(),
792
805
  method: z.enum(["weighted-distribution", "only-candidate"]),
793
806
  fallback: z.boolean(),
794
807
  highCost: z.boolean(),
@@ -820,6 +833,7 @@ const noFitRow = z.object({
820
833
  "unknown"
821
834
  ]),
822
835
  assessmentSource: z.enum(["local", "semantic"]),
836
+ assessmentOutcome: assessmentOutcome.optional(),
823
837
  decisions: integer$2.min(1)
824
838
  }).strict();
825
839
  const AutoAllocationDiagnosticsSchema = z.object({
@@ -33,6 +33,18 @@ export declare const AutoAllocationDiagnosticsSchema: z.ZodObject<{
33
33
  local: "local";
34
34
  semantic: "semantic";
35
35
  }>;
36
+ assessmentOutcome: z.ZodOptional<z.ZodEnum<{
37
+ disabled: "disabled";
38
+ unavailable: "unavailable";
39
+ "context-omitted": "context-omitted";
40
+ "invalid-result": "invalid-result";
41
+ timeout: "timeout";
42
+ failed: "failed";
43
+ "local-known": "local-known";
44
+ "local-unknown": "local-unknown";
45
+ "semantic-known": "semantic-known";
46
+ "semantic-unknown": "semantic-unknown";
47
+ }>>;
36
48
  method: z.ZodEnum<{
37
49
  "weighted-distribution": "weighted-distribution";
38
50
  "only-candidate": "only-candidate";
@@ -70,6 +82,18 @@ export declare const AutoAllocationDiagnosticsSchema: z.ZodObject<{
70
82
  local: "local";
71
83
  semantic: "semantic";
72
84
  }>;
85
+ assessmentOutcome: z.ZodOptional<z.ZodEnum<{
86
+ disabled: "disabled";
87
+ unavailable: "unavailable";
88
+ "context-omitted": "context-omitted";
89
+ "invalid-result": "invalid-result";
90
+ timeout: "timeout";
91
+ failed: "failed";
92
+ "local-known": "local-known";
93
+ "local-unknown": "local-unknown";
94
+ "semantic-known": "semantic-known";
95
+ "semantic-unknown": "semantic-unknown";
96
+ }>>;
73
97
  decisions: z.ZodNumber;
74
98
  }, z.core.$strict>>;
75
99
  observationStart: z.ZodNullable<z.ZodNumber>;
@@ -83,7 +107,7 @@ export declare const AutoAllocationDiagnosticsSchema: z.ZodObject<{
83
107
  }, z.core.$strict>;
84
108
  export type AutoAllocationDiagnostics = z.infer<typeof AutoAllocationDiagnosticsSchema>;
85
109
  export declare function emptyAutoAllocationDiagnostics(): AutoAllocationDiagnostics;
86
- /** Profile-local rolling aggregates; no per-turn, Session, prompt, or outcome records. */
110
+ /** Profile-local rolling aggregates; no per-turn, Session, prompt, or execution-outcome records. */
87
111
  export declare class AutoAllocationDiagnosticsCollector {
88
112
  private readonly version;
89
113
  private readonly changed;
@@ -57,6 +57,7 @@ export declare const diagnosticsDomain: {
57
57
  opportunities: number;
58
58
  expectedSelections: number;
59
59
  selections: number;
60
+ assessmentOutcome?: "disabled" | "unavailable" | "context-omitted" | "invalid-result" | "timeout" | "failed" | "local-known" | "local-unknown" | "semantic-known" | "semantic-unknown" | undefined;
60
61
  }[];
61
62
  noFitRows: {
62
63
  day: number;
@@ -67,6 +68,7 @@ export declare const diagnosticsDomain: {
67
68
  demand: "unknown" | "simple" | "routine" | "complex";
68
69
  assessmentSource: "local" | "semantic";
69
70
  decisions: number;
71
+ assessmentOutcome?: "disabled" | "unavailable" | "context-omitted" | "invalid-result" | "timeout" | "failed" | "local-known" | "local-unknown" | "semantic-known" | "semantic-unknown" | undefined;
70
72
  }[];
71
73
  observationStart: number | null;
72
74
  observationEnd: number | null;
@@ -251,6 +251,18 @@ export declare const DiagnosticsSnapshotSchema: z.ZodObject<{
251
251
  local: "local";
252
252
  semantic: "semantic";
253
253
  }>;
254
+ assessmentOutcome: z.ZodOptional<z.ZodEnum<{
255
+ disabled: "disabled";
256
+ unavailable: "unavailable";
257
+ "context-omitted": "context-omitted";
258
+ "invalid-result": "invalid-result";
259
+ timeout: "timeout";
260
+ failed: "failed";
261
+ "local-known": "local-known";
262
+ "local-unknown": "local-unknown";
263
+ "semantic-known": "semantic-known";
264
+ "semantic-unknown": "semantic-unknown";
265
+ }>>;
254
266
  method: z.ZodEnum<{
255
267
  "weighted-distribution": "weighted-distribution";
256
268
  "only-candidate": "only-candidate";
@@ -288,6 +300,18 @@ export declare const DiagnosticsSnapshotSchema: z.ZodObject<{
288
300
  local: "local";
289
301
  semantic: "semantic";
290
302
  }>;
303
+ assessmentOutcome: z.ZodOptional<z.ZodEnum<{
304
+ disabled: "disabled";
305
+ unavailable: "unavailable";
306
+ "context-omitted": "context-omitted";
307
+ "invalid-result": "invalid-result";
308
+ timeout: "timeout";
309
+ failed: "failed";
310
+ "local-known": "local-known";
311
+ "local-unknown": "local-unknown";
312
+ "semantic-known": "semantic-known";
313
+ "semantic-unknown": "semantic-unknown";
314
+ }>>;
291
315
  decisions: z.ZodNumber;
292
316
  }, z.core.$strict>>;
293
317
  observationStart: z.ZodNullable<z.ZodNumber>;
@@ -577,6 +601,18 @@ export declare const DiagnosticsViewSchema: z.ZodObject<{
577
601
  local: "local";
578
602
  semantic: "semantic";
579
603
  }>;
604
+ assessmentOutcome: z.ZodOptional<z.ZodEnum<{
605
+ disabled: "disabled";
606
+ unavailable: "unavailable";
607
+ "context-omitted": "context-omitted";
608
+ "invalid-result": "invalid-result";
609
+ timeout: "timeout";
610
+ failed: "failed";
611
+ "local-known": "local-known";
612
+ "local-unknown": "local-unknown";
613
+ "semantic-known": "semantic-known";
614
+ "semantic-unknown": "semantic-unknown";
615
+ }>>;
580
616
  method: z.ZodEnum<{
581
617
  "weighted-distribution": "weighted-distribution";
582
618
  "only-candidate": "only-candidate";
@@ -614,6 +650,18 @@ export declare const DiagnosticsViewSchema: z.ZodObject<{
614
650
  local: "local";
615
651
  semantic: "semantic";
616
652
  }>;
653
+ assessmentOutcome: z.ZodOptional<z.ZodEnum<{
654
+ disabled: "disabled";
655
+ unavailable: "unavailable";
656
+ "context-omitted": "context-omitted";
657
+ "invalid-result": "invalid-result";
658
+ timeout: "timeout";
659
+ failed: "failed";
660
+ "local-known": "local-known";
661
+ "local-unknown": "local-unknown";
662
+ "semantic-known": "semantic-known";
663
+ "semantic-unknown": "semantic-unknown";
664
+ }>>;
617
665
  decisions: z.ZodNumber;
618
666
  }, z.core.$strict>>;
619
667
  observationStart: z.ZodNullable<z.ZodNumber>;
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.5",
4
+ "version": "0.4.2-alpha.6",
5
5
  "releaseNotes": "CHANGELOG.md",
6
6
  "publishConfig": {
7
7
  "access": "public",