@vostride/agent-qa-dashboard 0.1.10 → 0.1.12
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/dist/{index-qDoSzi3O.d.cts → index-BL7OautO.d.cts} +4 -0
- package/dist/{index-qDoSzi3O.d.ts → index-BL7OautO.d.ts} +4 -0
- package/dist/index.cjs +33 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +33 -3
- package/dist/index.js.map +1 -1
- package/dist/server/index.d.cts +1 -1
- package/dist/server/index.d.ts +1 -1
- package/package.json +7 -7
|
@@ -447,6 +447,7 @@ declare class DashboardDatabase {
|
|
|
447
447
|
flakyScore: number;
|
|
448
448
|
}[];
|
|
449
449
|
getAccessibilitySummary(runId: string): {
|
|
450
|
+
enabled: boolean | null;
|
|
450
451
|
total: number;
|
|
451
452
|
bySeverity: Record<string, number>;
|
|
452
453
|
byRule: {
|
|
@@ -455,8 +456,11 @@ declare class DashboardDatabase {
|
|
|
455
456
|
ruleId: string;
|
|
456
457
|
}[];
|
|
457
458
|
stepsWithViolations: number;
|
|
459
|
+
scannedSteps: number;
|
|
460
|
+
unscannedSteps: number;
|
|
458
461
|
totalSteps: number;
|
|
459
462
|
};
|
|
463
|
+
private getRunAccessibilityEnabled;
|
|
460
464
|
getStep(stepId: string): StepRow | undefined;
|
|
461
465
|
insertReasoningTrace(trace: {
|
|
462
466
|
stepId: string;
|
|
@@ -447,6 +447,7 @@ declare class DashboardDatabase {
|
|
|
447
447
|
flakyScore: number;
|
|
448
448
|
}[];
|
|
449
449
|
getAccessibilitySummary(runId: string): {
|
|
450
|
+
enabled: boolean | null;
|
|
450
451
|
total: number;
|
|
451
452
|
bySeverity: Record<string, number>;
|
|
452
453
|
byRule: {
|
|
@@ -455,8 +456,11 @@ declare class DashboardDatabase {
|
|
|
455
456
|
ruleId: string;
|
|
456
457
|
}[];
|
|
457
458
|
stepsWithViolations: number;
|
|
459
|
+
scannedSteps: number;
|
|
460
|
+
unscannedSteps: number;
|
|
458
461
|
totalSteps: number;
|
|
459
462
|
};
|
|
463
|
+
private getRunAccessibilityEnabled;
|
|
460
464
|
getStep(stepId: string): StepRow | undefined;
|
|
461
465
|
insertReasoningTrace(trace: {
|
|
462
466
|
stepId: string;
|
package/dist/index.cjs
CHANGED
|
@@ -1204,10 +1204,14 @@ var DashboardDatabase = class {
|
|
|
1204
1204
|
const steps = this.getSteps(runId);
|
|
1205
1205
|
const allViolations = [];
|
|
1206
1206
|
let stepsWithViolations = 0;
|
|
1207
|
+
let scannedSteps = 0;
|
|
1207
1208
|
for (const step of steps) {
|
|
1208
|
-
if (
|
|
1209
|
-
|
|
1210
|
-
|
|
1209
|
+
if (Array.isArray(step.accessibilityViolations)) {
|
|
1210
|
+
scannedSteps++;
|
|
1211
|
+
if (step.accessibilityViolations.length > 0) {
|
|
1212
|
+
stepsWithViolations++;
|
|
1213
|
+
allViolations.push(...step.accessibilityViolations);
|
|
1214
|
+
}
|
|
1211
1215
|
}
|
|
1212
1216
|
}
|
|
1213
1217
|
const bySeverity = { critical: 0, serious: 0, moderate: 0, minor: 0 };
|
|
@@ -1218,13 +1222,39 @@ var DashboardDatabase = class {
|
|
|
1218
1222
|
byRule[v.ruleId].count++;
|
|
1219
1223
|
}
|
|
1220
1224
|
return {
|
|
1225
|
+
enabled: this.getRunAccessibilityEnabled(runId),
|
|
1221
1226
|
total: allViolations.length,
|
|
1222
1227
|
bySeverity,
|
|
1223
1228
|
byRule: Object.entries(byRule).map(([ruleId, data]) => ({ ruleId, ...data })).sort((a, b) => b.count - a.count),
|
|
1224
1229
|
stepsWithViolations,
|
|
1230
|
+
scannedSteps,
|
|
1231
|
+
unscannedSteps: Math.max(0, steps.length - scannedSteps),
|
|
1225
1232
|
totalSteps: steps.length
|
|
1226
1233
|
};
|
|
1227
1234
|
}
|
|
1235
|
+
getRunAccessibilityEnabled(runId) {
|
|
1236
|
+
const artifact = this.getRunArtifact(runId);
|
|
1237
|
+
const payload = artifact?.payload;
|
|
1238
|
+
if (!payload || typeof payload !== "object" || Array.isArray(payload)) return null;
|
|
1239
|
+
const config = payload.config;
|
|
1240
|
+
if (!config || typeof config !== "object" || Array.isArray(config)) return null;
|
|
1241
|
+
const configRecord = config;
|
|
1242
|
+
const candidates = [configRecord.effectiveConfig, configRecord.parsedConfig];
|
|
1243
|
+
let sawConfig = false;
|
|
1244
|
+
let sawAccessibility = false;
|
|
1245
|
+
for (const candidate of candidates) {
|
|
1246
|
+
if (!candidate || typeof candidate !== "object" || Array.isArray(candidate)) continue;
|
|
1247
|
+
sawConfig = true;
|
|
1248
|
+
const services = candidate.services;
|
|
1249
|
+
if (!services || typeof services !== "object" || Array.isArray(services)) continue;
|
|
1250
|
+
const accessibility = services.accessibility;
|
|
1251
|
+
if (!accessibility || typeof accessibility !== "object" || Array.isArray(accessibility)) continue;
|
|
1252
|
+
sawAccessibility = true;
|
|
1253
|
+
const enabled = accessibility.enabled;
|
|
1254
|
+
if (typeof enabled === "boolean") return enabled;
|
|
1255
|
+
}
|
|
1256
|
+
return sawConfig || sawAccessibility ? false : null;
|
|
1257
|
+
}
|
|
1228
1258
|
getStep(stepId) {
|
|
1229
1259
|
const row = this.db.prepare("SELECT * FROM steps WHERE id = ?").get(stepId);
|
|
1230
1260
|
return row ? this.mapStepRow(row) : void 0;
|