dsh-github-copilot 0.4.2-alpha.5 → 0.4.2-alpha.7
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 +6 -1
- package/CHANGELOG.md +30 -0
- package/README.md +16 -8
- package/README.zh.md +15 -8
- package/deployment-baseline.json +11 -2
- package/docs/auto-iteration-review.json +12 -12
- package/docs/auto-task-routing.md +64 -5
- package/docs/plugin-diagnostics.md +12 -0
- package/lib/client.js +21 -5
- package/lib/client.js.map +1 -1
- package/lib/diagnostics-analysis.js +1 -1
- package/lib/{diagnostics-types-Cd4BmeOe.js → diagnostics-types-BDIc78T4.js} +21 -3
- package/lib/index.js +4005 -3989
- package/lib/manual-compaction-recovery.js +1 -1
- package/lib/remote.js +14 -0
- package/lib/types/auto-allocation-diagnostics.d.ts +25 -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/diagnostics-host.d.ts +2 -0
- package/lib/types/diagnostics-types.d.ts +48 -0
- package/lib/types/preview-route.d.ts +1 -1
- package/package.json +1 -1
|
@@ -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-
|
|
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,
|