@qulib/core 0.10.0 → 0.11.0

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 (53) hide show
  1. package/README.md +2 -0
  2. package/dist/baseline/baseline.schema.d.ts +26 -26
  3. package/dist/baseline/baseline.schema.d.ts.map +1 -1
  4. package/dist/baseline/baseline.schema.js +1 -0
  5. package/dist/cli/confidence-run.js +5 -5
  6. package/dist/index.d.ts +6 -1
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.js +3 -0
  9. package/dist/llm/provider.interface.d.ts +4 -1
  10. package/dist/llm/provider.interface.d.ts.map +1 -1
  11. package/dist/llm/providers/anthropic.d.ts +2 -2
  12. package/dist/llm/providers/anthropic.d.ts.map +1 -1
  13. package/dist/llm/providers/anthropic.js +2 -1
  14. package/dist/phases/think.d.ts.map +1 -1
  15. package/dist/phases/think.js +4 -1
  16. package/dist/reporters/heatmap.d.ts +1 -1
  17. package/dist/reporters/heatmap.d.ts.map +1 -1
  18. package/dist/reporters/heatmap.js +2 -0
  19. package/dist/schemas/bug-report-score.schema.d.ts +163 -0
  20. package/dist/schemas/bug-report-score.schema.d.ts.map +1 -0
  21. package/dist/schemas/bug-report-score.schema.js +32 -0
  22. package/dist/schemas/confidence.schema.d.ts +35 -35
  23. package/dist/schemas/confidence.schema.d.ts.map +1 -1
  24. package/dist/schemas/confidence.schema.js +1 -0
  25. package/dist/schemas/decision-score.schema.d.ts +157 -0
  26. package/dist/schemas/decision-score.schema.d.ts.map +1 -0
  27. package/dist/schemas/decision-score.schema.js +39 -0
  28. package/dist/schemas/gap-analysis.schema.d.ts +8 -8
  29. package/dist/schemas/gap-analysis.schema.js +1 -1
  30. package/dist/schemas/golden-manifest.schema.d.ts +137 -0
  31. package/dist/schemas/golden-manifest.schema.d.ts.map +1 -0
  32. package/dist/schemas/golden-manifest.schema.js +25 -0
  33. package/dist/schemas/index.d.ts +3 -0
  34. package/dist/schemas/index.d.ts.map +1 -1
  35. package/dist/schemas/index.js +3 -0
  36. package/dist/schemas/public-surface.schema.d.ts +15 -5
  37. package/dist/schemas/public-surface.schema.d.ts.map +1 -1
  38. package/dist/schemas/route-inventory.schema.d.ts +20 -0
  39. package/dist/schemas/route-inventory.schema.d.ts.map +1 -1
  40. package/dist/schemas/route-inventory.schema.js +4 -0
  41. package/dist/schemas/views.schema.d.ts +12 -12
  42. package/dist/tools/scoring/bug-report-score.d.ts +34 -0
  43. package/dist/tools/scoring/bug-report-score.d.ts.map +1 -0
  44. package/dist/tools/scoring/bug-report-score.js +320 -0
  45. package/dist/tools/scoring/confidence.d.ts.map +1 -1
  46. package/dist/tools/scoring/confidence.js +140 -14
  47. package/dist/tools/scoring/prompt-leakage.d.ts +29 -0
  48. package/dist/tools/scoring/prompt-leakage.d.ts.map +1 -0
  49. package/dist/tools/scoring/prompt-leakage.js +256 -0
  50. package/dist/tools/scoring/score-decisions.d.ts +30 -0
  51. package/dist/tools/scoring/score-decisions.d.ts.map +1 -0
  52. package/dist/tools/scoring/score-decisions.js +348 -0
  53. package/package.json +2 -2
@@ -0,0 +1,32 @@
1
+ import { z } from 'zod';
2
+ export const BugReportSeveritySchema = z.enum(['critical', 'high', 'medium', 'low']);
3
+ export const BugReportInputSchema = z.object({
4
+ title: z.string().min(1).max(500),
5
+ description: z.string().min(1).max(8000),
6
+ steps: z.string().min(1).max(8000),
7
+ severity: BugReportSeveritySchema,
8
+ });
9
+ export const BugReportTargetSchema = z.object({
10
+ description: z.string().min(1).max(8000),
11
+ type: z.string().min(1).max(200),
12
+ severity: BugReportSeveritySchema,
13
+ expectedBehavior: z.string().min(1).max(8000),
14
+ });
15
+ export const ScoreBugReportInputSchema = z.object({
16
+ report: BugReportInputSchema,
17
+ target: BugReportTargetSchema,
18
+ });
19
+ export const BugReportRubricSchema = z.object({
20
+ coverage: z.number().min(0).max(25),
21
+ severity: z.number().min(0).max(25),
22
+ repro: z.number().min(0).max(25),
23
+ evidence: z.number().min(0).max(25),
24
+ });
25
+ export const BugReportScoringPathSchema = z.enum(['llm-judge', 'deterministic-fallback']);
26
+ export const BugReportScoreResultSchema = z.object({
27
+ matched: z.boolean(),
28
+ matchConfidence: z.number().min(0).max(1),
29
+ rubric: BugReportRubricSchema,
30
+ feedback: z.string(),
31
+ scoringPath: BugReportScoringPathSchema,
32
+ });
@@ -11,7 +11,7 @@
11
11
  * - tenantId on every record (CLAUDE.md rule 17 — multi-tenant from day one).
12
12
  */
13
13
  import { z } from 'zod';
14
- export declare const EvidenceSourceKindSchema: z.ZodEnum<["live-app-quality", "accessibility", "crawl-coverage", "test-automation", "api-coverage", "ci-results", "deploy-metadata", "error-telemetry", "feature-flags", "doc-health", "human-approval", "agent-evidence"]>;
14
+ export declare const EvidenceSourceKindSchema: z.ZodEnum<["live-app-quality", "accessibility", "crawl-coverage", "test-automation", "api-coverage", "ci-results", "deploy-metadata", "error-telemetry", "feature-flags", "doc-health", "human-approval", "agent-evidence", "decision-quality"]>;
15
15
  export type EvidenceSourceKind = z.infer<typeof EvidenceSourceKindSchema>;
16
16
  export declare const ConfidencePolicySchema: z.ZodObject<{
17
17
  /**
@@ -30,28 +30,28 @@ export declare const ConfidencePolicySchema: z.ZodObject<{
30
30
  * Sources listed here produce verdict='caution' when their applicability is 'unknown'.
31
31
  * Empty by default — callers can require specific sources for stricter gates.
32
32
  */
33
- requiredSources: z.ZodDefault<z.ZodArray<z.ZodEnum<["live-app-quality", "accessibility", "crawl-coverage", "test-automation", "api-coverage", "ci-results", "deploy-metadata", "error-telemetry", "feature-flags", "doc-health", "human-approval", "agent-evidence"]>, "many">>;
33
+ requiredSources: z.ZodDefault<z.ZodArray<z.ZodEnum<["live-app-quality", "accessibility", "crawl-coverage", "test-automation", "api-coverage", "ci-results", "deploy-metadata", "error-telemetry", "feature-flags", "doc-health", "human-approval", "agent-evidence", "decision-quality"]>, "many">>;
34
34
  /**
35
35
  * Per-source weight overrides. When provided, these replace the scorer's default weights
36
36
  * for the named sources; unmentioned sources keep their defaults.
37
37
  */
38
- weights: z.ZodOptional<z.ZodRecord<z.ZodEnum<["live-app-quality", "accessibility", "crawl-coverage", "test-automation", "api-coverage", "ci-results", "deploy-metadata", "error-telemetry", "feature-flags", "doc-health", "human-approval", "agent-evidence"]>, z.ZodNumber>>;
38
+ weights: z.ZodOptional<z.ZodRecord<z.ZodEnum<["live-app-quality", "accessibility", "crawl-coverage", "test-automation", "api-coverage", "ci-results", "deploy-metadata", "error-telemetry", "feature-flags", "doc-health", "human-approval", "agent-evidence", "decision-quality"]>, z.ZodNumber>>;
39
39
  }, "strip", z.ZodTypeAny, {
40
40
  passThreshold: number;
41
41
  failThreshold: number;
42
42
  maxListLength: number;
43
- requiredSources: ("accessibility" | "live-app-quality" | "crawl-coverage" | "test-automation" | "api-coverage" | "ci-results" | "deploy-metadata" | "error-telemetry" | "feature-flags" | "doc-health" | "human-approval" | "agent-evidence")[];
44
- weights?: Partial<Record<"accessibility" | "live-app-quality" | "crawl-coverage" | "test-automation" | "api-coverage" | "ci-results" | "deploy-metadata" | "error-telemetry" | "feature-flags" | "doc-health" | "human-approval" | "agent-evidence", number>> | undefined;
43
+ requiredSources: ("accessibility" | "live-app-quality" | "crawl-coverage" | "test-automation" | "api-coverage" | "ci-results" | "deploy-metadata" | "error-telemetry" | "feature-flags" | "doc-health" | "human-approval" | "agent-evidence" | "decision-quality")[];
44
+ weights?: Partial<Record<"accessibility" | "live-app-quality" | "crawl-coverage" | "test-automation" | "api-coverage" | "ci-results" | "deploy-metadata" | "error-telemetry" | "feature-flags" | "doc-health" | "human-approval" | "agent-evidence" | "decision-quality", number>> | undefined;
45
45
  }, {
46
46
  passThreshold?: number | undefined;
47
47
  failThreshold?: number | undefined;
48
48
  maxListLength?: number | undefined;
49
- requiredSources?: ("accessibility" | "live-app-quality" | "crawl-coverage" | "test-automation" | "api-coverage" | "ci-results" | "deploy-metadata" | "error-telemetry" | "feature-flags" | "doc-health" | "human-approval" | "agent-evidence")[] | undefined;
50
- weights?: Partial<Record<"accessibility" | "live-app-quality" | "crawl-coverage" | "test-automation" | "api-coverage" | "ci-results" | "deploy-metadata" | "error-telemetry" | "feature-flags" | "doc-health" | "human-approval" | "agent-evidence", number>> | undefined;
49
+ requiredSources?: ("accessibility" | "live-app-quality" | "crawl-coverage" | "test-automation" | "api-coverage" | "ci-results" | "deploy-metadata" | "error-telemetry" | "feature-flags" | "doc-health" | "human-approval" | "agent-evidence" | "decision-quality")[] | undefined;
50
+ weights?: Partial<Record<"accessibility" | "live-app-quality" | "crawl-coverage" | "test-automation" | "api-coverage" | "ci-results" | "deploy-metadata" | "error-telemetry" | "feature-flags" | "doc-health" | "human-approval" | "agent-evidence" | "decision-quality", number>> | undefined;
51
51
  }>;
52
52
  export type ConfidencePolicy = z.infer<typeof ConfidencePolicySchema>;
53
53
  export declare const EvidenceItemSchema: z.ZodObject<{
54
- source: z.ZodEnum<["live-app-quality", "accessibility", "crawl-coverage", "test-automation", "api-coverage", "ci-results", "deploy-metadata", "error-telemetry", "feature-flags", "doc-health", "human-approval", "agent-evidence"]>;
54
+ source: z.ZodEnum<["live-app-quality", "accessibility", "crawl-coverage", "test-automation", "api-coverage", "ci-results", "deploy-metadata", "error-telemetry", "feature-flags", "doc-health", "human-approval", "agent-evidence", "decision-quality"]>;
55
55
  /**
56
56
  * 0–100 normalized score, or null when the source ran but could not produce
57
57
  * an honest score (e.g. auth-blocked crawl). null → excluded from denominator
@@ -114,7 +114,7 @@ export declare const EvidenceItemSchema: z.ZodObject<{
114
114
  } | undefined;
115
115
  }>;
116
116
  }, "strip", z.ZodTypeAny, {
117
- source: "accessibility" | "live-app-quality" | "crawl-coverage" | "test-automation" | "api-coverage" | "ci-results" | "deploy-metadata" | "error-telemetry" | "feature-flags" | "doc-health" | "human-approval" | "agent-evidence";
117
+ source: "accessibility" | "live-app-quality" | "crawl-coverage" | "test-automation" | "api-coverage" | "ci-results" | "deploy-metadata" | "error-telemetry" | "feature-flags" | "doc-health" | "human-approval" | "agent-evidence" | "decision-quality";
118
118
  recommendations: string[];
119
119
  score: number | null;
120
120
  weight: number;
@@ -133,7 +133,7 @@ export declare const EvidenceItemSchema: z.ZodObject<{
133
133
  };
134
134
  reason?: string | undefined;
135
135
  }, {
136
- source: "accessibility" | "live-app-quality" | "crawl-coverage" | "test-automation" | "api-coverage" | "ci-results" | "deploy-metadata" | "error-telemetry" | "feature-flags" | "doc-health" | "human-approval" | "agent-evidence";
136
+ source: "accessibility" | "live-app-quality" | "crawl-coverage" | "test-automation" | "api-coverage" | "ci-results" | "deploy-metadata" | "error-telemetry" | "feature-flags" | "doc-health" | "human-approval" | "agent-evidence" | "decision-quality";
137
137
  score: number | null;
138
138
  weight: number;
139
139
  evidence: string[];
@@ -184,7 +184,7 @@ export declare const ConfidenceInputSchema: z.ZodObject<{
184
184
  tenantId?: string | undefined;
185
185
  }>;
186
186
  evidence: z.ZodArray<z.ZodObject<{
187
- source: z.ZodEnum<["live-app-quality", "accessibility", "crawl-coverage", "test-automation", "api-coverage", "ci-results", "deploy-metadata", "error-telemetry", "feature-flags", "doc-health", "human-approval", "agent-evidence"]>;
187
+ source: z.ZodEnum<["live-app-quality", "accessibility", "crawl-coverage", "test-automation", "api-coverage", "ci-results", "deploy-metadata", "error-telemetry", "feature-flags", "doc-health", "human-approval", "agent-evidence", "decision-quality"]>;
188
188
  /**
189
189
  * 0–100 normalized score, or null when the source ran but could not produce
190
190
  * an honest score (e.g. auth-blocked crawl). null → excluded from denominator
@@ -247,7 +247,7 @@ export declare const ConfidenceInputSchema: z.ZodObject<{
247
247
  } | undefined;
248
248
  }>;
249
249
  }, "strip", z.ZodTypeAny, {
250
- source: "accessibility" | "live-app-quality" | "crawl-coverage" | "test-automation" | "api-coverage" | "ci-results" | "deploy-metadata" | "error-telemetry" | "feature-flags" | "doc-health" | "human-approval" | "agent-evidence";
250
+ source: "accessibility" | "live-app-quality" | "crawl-coverage" | "test-automation" | "api-coverage" | "ci-results" | "deploy-metadata" | "error-telemetry" | "feature-flags" | "doc-health" | "human-approval" | "agent-evidence" | "decision-quality";
251
251
  recommendations: string[];
252
252
  score: number | null;
253
253
  weight: number;
@@ -266,7 +266,7 @@ export declare const ConfidenceInputSchema: z.ZodObject<{
266
266
  };
267
267
  reason?: string | undefined;
268
268
  }, {
269
- source: "accessibility" | "live-app-quality" | "crawl-coverage" | "test-automation" | "api-coverage" | "ci-results" | "deploy-metadata" | "error-telemetry" | "feature-flags" | "doc-health" | "human-approval" | "agent-evidence";
269
+ source: "accessibility" | "live-app-quality" | "crawl-coverage" | "test-automation" | "api-coverage" | "ci-results" | "deploy-metadata" | "error-telemetry" | "feature-flags" | "doc-health" | "human-approval" | "agent-evidence" | "decision-quality";
270
270
  score: number | null;
271
271
  weight: number;
272
272
  evidence: string[];
@@ -302,28 +302,28 @@ export declare const ConfidenceInputSchema: z.ZodObject<{
302
302
  * Sources listed here produce verdict='caution' when their applicability is 'unknown'.
303
303
  * Empty by default — callers can require specific sources for stricter gates.
304
304
  */
305
- requiredSources: z.ZodDefault<z.ZodArray<z.ZodEnum<["live-app-quality", "accessibility", "crawl-coverage", "test-automation", "api-coverage", "ci-results", "deploy-metadata", "error-telemetry", "feature-flags", "doc-health", "human-approval", "agent-evidence"]>, "many">>;
305
+ requiredSources: z.ZodDefault<z.ZodArray<z.ZodEnum<["live-app-quality", "accessibility", "crawl-coverage", "test-automation", "api-coverage", "ci-results", "deploy-metadata", "error-telemetry", "feature-flags", "doc-health", "human-approval", "agent-evidence", "decision-quality"]>, "many">>;
306
306
  /**
307
307
  * Per-source weight overrides. When provided, these replace the scorer's default weights
308
308
  * for the named sources; unmentioned sources keep their defaults.
309
309
  */
310
- weights: z.ZodOptional<z.ZodRecord<z.ZodEnum<["live-app-quality", "accessibility", "crawl-coverage", "test-automation", "api-coverage", "ci-results", "deploy-metadata", "error-telemetry", "feature-flags", "doc-health", "human-approval", "agent-evidence"]>, z.ZodNumber>>;
310
+ weights: z.ZodOptional<z.ZodRecord<z.ZodEnum<["live-app-quality", "accessibility", "crawl-coverage", "test-automation", "api-coverage", "ci-results", "deploy-metadata", "error-telemetry", "feature-flags", "doc-health", "human-approval", "agent-evidence", "decision-quality"]>, z.ZodNumber>>;
311
311
  }, "strip", z.ZodTypeAny, {
312
312
  passThreshold: number;
313
313
  failThreshold: number;
314
314
  maxListLength: number;
315
- requiredSources: ("accessibility" | "live-app-quality" | "crawl-coverage" | "test-automation" | "api-coverage" | "ci-results" | "deploy-metadata" | "error-telemetry" | "feature-flags" | "doc-health" | "human-approval" | "agent-evidence")[];
316
- weights?: Partial<Record<"accessibility" | "live-app-quality" | "crawl-coverage" | "test-automation" | "api-coverage" | "ci-results" | "deploy-metadata" | "error-telemetry" | "feature-flags" | "doc-health" | "human-approval" | "agent-evidence", number>> | undefined;
315
+ requiredSources: ("accessibility" | "live-app-quality" | "crawl-coverage" | "test-automation" | "api-coverage" | "ci-results" | "deploy-metadata" | "error-telemetry" | "feature-flags" | "doc-health" | "human-approval" | "agent-evidence" | "decision-quality")[];
316
+ weights?: Partial<Record<"accessibility" | "live-app-quality" | "crawl-coverage" | "test-automation" | "api-coverage" | "ci-results" | "deploy-metadata" | "error-telemetry" | "feature-flags" | "doc-health" | "human-approval" | "agent-evidence" | "decision-quality", number>> | undefined;
317
317
  }, {
318
318
  passThreshold?: number | undefined;
319
319
  failThreshold?: number | undefined;
320
320
  maxListLength?: number | undefined;
321
- requiredSources?: ("accessibility" | "live-app-quality" | "crawl-coverage" | "test-automation" | "api-coverage" | "ci-results" | "deploy-metadata" | "error-telemetry" | "feature-flags" | "doc-health" | "human-approval" | "agent-evidence")[] | undefined;
322
- weights?: Partial<Record<"accessibility" | "live-app-quality" | "crawl-coverage" | "test-automation" | "api-coverage" | "ci-results" | "deploy-metadata" | "error-telemetry" | "feature-flags" | "doc-health" | "human-approval" | "agent-evidence", number>> | undefined;
321
+ requiredSources?: ("accessibility" | "live-app-quality" | "crawl-coverage" | "test-automation" | "api-coverage" | "ci-results" | "deploy-metadata" | "error-telemetry" | "feature-flags" | "doc-health" | "human-approval" | "agent-evidence" | "decision-quality")[] | undefined;
322
+ weights?: Partial<Record<"accessibility" | "live-app-quality" | "crawl-coverage" | "test-automation" | "api-coverage" | "ci-results" | "deploy-metadata" | "error-telemetry" | "feature-flags" | "doc-health" | "human-approval" | "agent-evidence" | "decision-quality", number>> | undefined;
323
323
  }>>;
324
324
  }, "strip", z.ZodTypeAny, {
325
325
  evidence: {
326
- source: "accessibility" | "live-app-quality" | "crawl-coverage" | "test-automation" | "api-coverage" | "ci-results" | "deploy-metadata" | "error-telemetry" | "feature-flags" | "doc-health" | "human-approval" | "agent-evidence";
326
+ source: "accessibility" | "live-app-quality" | "crawl-coverage" | "test-automation" | "api-coverage" | "ci-results" | "deploy-metadata" | "error-telemetry" | "feature-flags" | "doc-health" | "human-approval" | "agent-evidence" | "decision-quality";
327
327
  recommendations: string[];
328
328
  score: number | null;
329
329
  weight: number;
@@ -351,12 +351,12 @@ export declare const ConfidenceInputSchema: z.ZodObject<{
351
351
  passThreshold: number;
352
352
  failThreshold: number;
353
353
  maxListLength: number;
354
- requiredSources: ("accessibility" | "live-app-quality" | "crawl-coverage" | "test-automation" | "api-coverage" | "ci-results" | "deploy-metadata" | "error-telemetry" | "feature-flags" | "doc-health" | "human-approval" | "agent-evidence")[];
355
- weights?: Partial<Record<"accessibility" | "live-app-quality" | "crawl-coverage" | "test-automation" | "api-coverage" | "ci-results" | "deploy-metadata" | "error-telemetry" | "feature-flags" | "doc-health" | "human-approval" | "agent-evidence", number>> | undefined;
354
+ requiredSources: ("accessibility" | "live-app-quality" | "crawl-coverage" | "test-automation" | "api-coverage" | "ci-results" | "deploy-metadata" | "error-telemetry" | "feature-flags" | "doc-health" | "human-approval" | "agent-evidence" | "decision-quality")[];
355
+ weights?: Partial<Record<"accessibility" | "live-app-quality" | "crawl-coverage" | "test-automation" | "api-coverage" | "ci-results" | "deploy-metadata" | "error-telemetry" | "feature-flags" | "doc-health" | "human-approval" | "agent-evidence" | "decision-quality", number>> | undefined;
356
356
  } | undefined;
357
357
  }, {
358
358
  evidence: {
359
- source: "accessibility" | "live-app-quality" | "crawl-coverage" | "test-automation" | "api-coverage" | "ci-results" | "deploy-metadata" | "error-telemetry" | "feature-flags" | "doc-health" | "human-approval" | "agent-evidence";
359
+ source: "accessibility" | "live-app-quality" | "crawl-coverage" | "test-automation" | "api-coverage" | "ci-results" | "deploy-metadata" | "error-telemetry" | "feature-flags" | "doc-health" | "human-approval" | "agent-evidence" | "decision-quality";
360
360
  score: number | null;
361
361
  weight: number;
362
362
  evidence: string[];
@@ -384,15 +384,15 @@ export declare const ConfidenceInputSchema: z.ZodObject<{
384
384
  passThreshold?: number | undefined;
385
385
  failThreshold?: number | undefined;
386
386
  maxListLength?: number | undefined;
387
- requiredSources?: ("accessibility" | "live-app-quality" | "crawl-coverage" | "test-automation" | "api-coverage" | "ci-results" | "deploy-metadata" | "error-telemetry" | "feature-flags" | "doc-health" | "human-approval" | "agent-evidence")[] | undefined;
388
- weights?: Partial<Record<"accessibility" | "live-app-quality" | "crawl-coverage" | "test-automation" | "api-coverage" | "ci-results" | "deploy-metadata" | "error-telemetry" | "feature-flags" | "doc-health" | "human-approval" | "agent-evidence", number>> | undefined;
387
+ requiredSources?: ("accessibility" | "live-app-quality" | "crawl-coverage" | "test-automation" | "api-coverage" | "ci-results" | "deploy-metadata" | "error-telemetry" | "feature-flags" | "doc-health" | "human-approval" | "agent-evidence" | "decision-quality")[] | undefined;
388
+ weights?: Partial<Record<"accessibility" | "live-app-quality" | "crawl-coverage" | "test-automation" | "api-coverage" | "ci-results" | "deploy-metadata" | "error-telemetry" | "feature-flags" | "doc-health" | "human-approval" | "agent-evidence" | "decision-quality", number>> | undefined;
389
389
  } | undefined;
390
390
  }>;
391
391
  export type ConfidenceInput = z.infer<typeof ConfidenceInputSchema>;
392
392
  export declare const ConfidenceVerdictSchema: z.ZodEnum<["ship", "caution", "hold", "block"]>;
393
393
  export type ConfidenceVerdict = z.infer<typeof ConfidenceVerdictSchema>;
394
394
  export declare const ConfidenceContributionSchema: z.ZodObject<{
395
- source: z.ZodEnum<["live-app-quality", "accessibility", "crawl-coverage", "test-automation", "api-coverage", "ci-results", "deploy-metadata", "error-telemetry", "feature-flags", "doc-health", "human-approval", "agent-evidence"]>;
395
+ source: z.ZodEnum<["live-app-quality", "accessibility", "crawl-coverage", "test-automation", "api-coverage", "ci-results", "deploy-metadata", "error-telemetry", "feature-flags", "doc-health", "human-approval", "agent-evidence", "decision-quality"]>;
396
396
  score: z.ZodNullable<z.ZodNumber>;
397
397
  weight: z.ZodNumber;
398
398
  /** Renormalized weight over the applicable set (sums to 1.0 across applicable items). */
@@ -400,14 +400,14 @@ export declare const ConfidenceContributionSchema: z.ZodObject<{
400
400
  applicability: z.ZodEnum<["applicable", "not_applicable", "unknown"]>;
401
401
  blocking: z.ZodBoolean;
402
402
  }, "strip", z.ZodTypeAny, {
403
- source: "accessibility" | "live-app-quality" | "crawl-coverage" | "test-automation" | "api-coverage" | "ci-results" | "deploy-metadata" | "error-telemetry" | "feature-flags" | "doc-health" | "human-approval" | "agent-evidence";
403
+ source: "accessibility" | "live-app-quality" | "crawl-coverage" | "test-automation" | "api-coverage" | "ci-results" | "deploy-metadata" | "error-telemetry" | "feature-flags" | "doc-health" | "human-approval" | "agent-evidence" | "decision-quality";
404
404
  score: number | null;
405
405
  weight: number;
406
406
  applicability: "unknown" | "applicable" | "not_applicable";
407
407
  blocking: boolean;
408
408
  effectiveWeight: number;
409
409
  }, {
410
- source: "accessibility" | "live-app-quality" | "crawl-coverage" | "test-automation" | "api-coverage" | "ci-results" | "deploy-metadata" | "error-telemetry" | "feature-flags" | "doc-health" | "human-approval" | "agent-evidence";
410
+ source: "accessibility" | "live-app-quality" | "crawl-coverage" | "test-automation" | "api-coverage" | "ci-results" | "deploy-metadata" | "error-telemetry" | "feature-flags" | "doc-health" | "human-approval" | "agent-evidence" | "decision-quality";
411
411
  score: number | null;
412
412
  weight: number;
413
413
  applicability: "unknown" | "applicable" | "not_applicable";
@@ -442,7 +442,7 @@ export declare const ReleaseConfidenceSchema: z.ZodObject<{
442
442
  label: z.ZodString;
443
443
  /** Per-source breakdown including excluded (not_applicable / unknown) items. */
444
444
  contributions: z.ZodArray<z.ZodObject<{
445
- source: z.ZodEnum<["live-app-quality", "accessibility", "crawl-coverage", "test-automation", "api-coverage", "ci-results", "deploy-metadata", "error-telemetry", "feature-flags", "doc-health", "human-approval", "agent-evidence"]>;
445
+ source: z.ZodEnum<["live-app-quality", "accessibility", "crawl-coverage", "test-automation", "api-coverage", "ci-results", "deploy-metadata", "error-telemetry", "feature-flags", "doc-health", "human-approval", "agent-evidence", "decision-quality"]>;
446
446
  score: z.ZodNullable<z.ZodNumber>;
447
447
  weight: z.ZodNumber;
448
448
  /** Renormalized weight over the applicable set (sums to 1.0 across applicable items). */
@@ -450,14 +450,14 @@ export declare const ReleaseConfidenceSchema: z.ZodObject<{
450
450
  applicability: z.ZodEnum<["applicable", "not_applicable", "unknown"]>;
451
451
  blocking: z.ZodBoolean;
452
452
  }, "strip", z.ZodTypeAny, {
453
- source: "accessibility" | "live-app-quality" | "crawl-coverage" | "test-automation" | "api-coverage" | "ci-results" | "deploy-metadata" | "error-telemetry" | "feature-flags" | "doc-health" | "human-approval" | "agent-evidence";
453
+ source: "accessibility" | "live-app-quality" | "crawl-coverage" | "test-automation" | "api-coverage" | "ci-results" | "deploy-metadata" | "error-telemetry" | "feature-flags" | "doc-health" | "human-approval" | "agent-evidence" | "decision-quality";
454
454
  score: number | null;
455
455
  weight: number;
456
456
  applicability: "unknown" | "applicable" | "not_applicable";
457
457
  blocking: boolean;
458
458
  effectiveWeight: number;
459
459
  }, {
460
- source: "accessibility" | "live-app-quality" | "crawl-coverage" | "test-automation" | "api-coverage" | "ci-results" | "deploy-metadata" | "error-telemetry" | "feature-flags" | "doc-health" | "human-approval" | "agent-evidence";
460
+ source: "accessibility" | "live-app-quality" | "crawl-coverage" | "test-automation" | "api-coverage" | "ci-results" | "deploy-metadata" | "error-telemetry" | "feature-flags" | "doc-health" | "human-approval" | "agent-evidence" | "decision-quality";
461
461
  score: number | null;
462
462
  weight: number;
463
463
  applicability: "unknown" | "applicable" | "not_applicable";
@@ -476,16 +476,16 @@ export declare const ReleaseConfidenceSchema: z.ZodObject<{
476
476
  level: number;
477
477
  computedAt: string;
478
478
  scoreFormula: string;
479
+ schemaVersion: 1;
479
480
  subject: {
480
481
  kind: "app" | "repo" | "release" | "pr" | "deploy";
481
482
  ref: string;
482
483
  tenantId: string;
483
484
  };
484
- schemaVersion: 1;
485
485
  confidenceScore: number | null;
486
486
  verdict: "ship" | "caution" | "hold" | "block";
487
487
  contributions: {
488
- source: "accessibility" | "live-app-quality" | "crawl-coverage" | "test-automation" | "api-coverage" | "ci-results" | "deploy-metadata" | "error-telemetry" | "feature-flags" | "doc-health" | "human-approval" | "agent-evidence";
488
+ source: "accessibility" | "live-app-quality" | "crawl-coverage" | "test-automation" | "api-coverage" | "ci-results" | "deploy-metadata" | "error-telemetry" | "feature-flags" | "doc-health" | "human-approval" | "agent-evidence" | "decision-quality";
489
489
  score: number | null;
490
490
  weight: number;
491
491
  applicability: "unknown" | "applicable" | "not_applicable";
@@ -501,16 +501,16 @@ export declare const ReleaseConfidenceSchema: z.ZodObject<{
501
501
  level: number;
502
502
  computedAt: string;
503
503
  scoreFormula: string;
504
+ schemaVersion: 1;
504
505
  subject: {
505
506
  kind: "app" | "repo" | "release" | "pr" | "deploy";
506
507
  ref: string;
507
508
  tenantId?: string | undefined;
508
509
  };
509
- schemaVersion: 1;
510
510
  confidenceScore: number | null;
511
511
  verdict: "ship" | "caution" | "hold" | "block";
512
512
  contributions: {
513
- source: "accessibility" | "live-app-quality" | "crawl-coverage" | "test-automation" | "api-coverage" | "ci-results" | "deploy-metadata" | "error-telemetry" | "feature-flags" | "doc-health" | "human-approval" | "agent-evidence";
513
+ source: "accessibility" | "live-app-quality" | "crawl-coverage" | "test-automation" | "api-coverage" | "ci-results" | "deploy-metadata" | "error-telemetry" | "feature-flags" | "doc-health" | "human-approval" | "agent-evidence" | "decision-quality";
514
514
  score: number | null;
515
515
  weight: number;
516
516
  applicability: "unknown" | "applicable" | "not_applicable";
@@ -1 +1 @@
1
- {"version":3,"file":"confidence.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/confidence.schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,wBAAwB,8NAenC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAM1E,eAAO,MAAM,sBAAsB;IACjC;;;OAGG;;IAEH;;;OAGG;;IAEH,qFAAqF;;IAErF;;;OAGG;;IAEH;;;OAGG;;;;;;;;;;;;;;EAEH,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAMtE,eAAO,MAAM,kBAAkB;;IAE7B;;;;OAIG;;;IAGH;;;;;;OAMG;;IAEH;;;OAGG;;IAEH,qDAAqD;;;IAGrD,0FAA0F;;IAE1F,0DAA0D;;IAE1D;;OAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAYH,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAM9D,eAAO,MAAM,uBAAuB;;;IAGlC,qFAAqF;;;;;;;;;;EAErF,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAMxE,eAAO,MAAM,qBAAqB;;;;QAThC,qFAAqF;;;;;;;;;;;;;QAnDrF;;;;WAIG;;;QAGH;;;;;;WAMG;;QAEH;;;WAGG;;QAEH,qDAAqD;;;QAGrD,0FAA0F;;QAE1F,0DAA0D;;QAE1D;;WAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QA5DH;;;WAGG;;QAEH;;;WAGG;;QAEH,qFAAqF;;QAErF;;;WAGG;;QAEH;;;WAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2EH,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAMpE,eAAO,MAAM,uBAAuB,iDAA+C,CAAC;AACpF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAMxE,eAAO,MAAM,4BAA4B;;;;IAIvC,yFAAyF;;;;;;;;;;;;;;;;;;EAIzF,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAElF,eAAO,MAAM,uBAAuB;;;;;;QAtClC,qFAAqF;;;;;;;;;;;IA0CrF;;;OAGG;;;;;IAKH,gFAAgF;;;;;QAnBhF,yFAAyF;;;;;;;;;;;;;;;;;;;;;IAuBzF,yEAAyE;;IAEzE,2EAA2E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAG3E,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
1
+ {"version":3,"file":"confidence.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/confidence.schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,wBAAwB,kPAgBnC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAM1E,eAAO,MAAM,sBAAsB;IACjC;;;OAGG;;IAEH;;;OAGG;;IAEH,qFAAqF;;IAErF;;;OAGG;;IAEH;;;OAGG;;;;;;;;;;;;;;EAEH,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAMtE,eAAO,MAAM,kBAAkB;;IAE7B;;;;OAIG;;;IAGH;;;;;;OAMG;;IAEH;;;OAGG;;IAEH,qDAAqD;;;IAGrD,0FAA0F;;IAE1F,0DAA0D;;IAE1D;;OAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAYH,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAM9D,eAAO,MAAM,uBAAuB;;;IAGlC,qFAAqF;;;;;;;;;;EAErF,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAMxE,eAAO,MAAM,qBAAqB;;;;QAThC,qFAAqF;;;;;;;;;;;;;QAnDrF;;;;WAIG;;;QAGH;;;;;;WAMG;;QAEH;;;WAGG;;QAEH,qDAAqD;;;QAGrD,0FAA0F;;QAE1F,0DAA0D;;QAE1D;;WAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QA5DH;;;WAGG;;QAEH;;;WAGG;;QAEH,qFAAqF;;QAErF;;;WAGG;;QAEH;;;WAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2EH,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAMpE,eAAO,MAAM,uBAAuB,iDAA+C,CAAC;AACpF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAMxE,eAAO,MAAM,4BAA4B;;;;IAIvC,yFAAyF;;;;;;;;;;;;;;;;;;EAIzF,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAElF,eAAO,MAAM,uBAAuB;;;;;;QAtClC,qFAAqF;;;;;;;;;;;IA0CrF;;;OAGG;;;;;IAKH,gFAAgF;;;;;QAnBhF,yFAAyF;;;;;;;;;;;;;;;;;;;;;IAuBzF,yEAAyE;;IAEzE,2EAA2E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAG3E,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
@@ -29,6 +29,7 @@ export const EvidenceSourceKindSchema = z.enum([
29
29
  'doc-health',
30
30
  'human-approval',
31
31
  'agent-evidence',
32
+ 'decision-quality',
32
33
  ]);
33
34
  // ---------------------------------------------------------------------------
34
35
  // Policy
@@ -0,0 +1,157 @@
1
+ import { z } from 'zod';
2
+ export declare const ForkKindSchema: z.ZodEnum<["gate_block_vs_pass", "stop_vs_continue", "escalate_vs_proceed"]>;
3
+ export declare const DecisionForkSchema: z.ZodObject<{
4
+ fork_id: z.ZodString;
5
+ fork_kind: z.ZodEnum<["gate_block_vs_pass", "stop_vs_continue", "escalate_vs_proceed"]>;
6
+ options: z.ZodArray<z.ZodString, "many">;
7
+ choice: z.ZodString;
8
+ constraint: z.ZodString;
9
+ settleable: z.ZodBoolean;
10
+ source_event_id: z.ZodString;
11
+ ts: z.ZodString;
12
+ }, "strip", z.ZodTypeAny, {
13
+ options: string[];
14
+ fork_id: string;
15
+ fork_kind: "gate_block_vs_pass" | "stop_vs_continue" | "escalate_vs_proceed";
16
+ choice: string;
17
+ constraint: string;
18
+ settleable: boolean;
19
+ source_event_id: string;
20
+ ts: string;
21
+ }, {
22
+ options: string[];
23
+ fork_id: string;
24
+ fork_kind: "gate_block_vs_pass" | "stop_vs_continue" | "escalate_vs_proceed";
25
+ choice: string;
26
+ constraint: string;
27
+ settleable: boolean;
28
+ source_event_id: string;
29
+ ts: string;
30
+ }>;
31
+ export declare const ScoreDecisionsInputSchema: z.ZodObject<{
32
+ forksPath: z.ZodString;
33
+ enableLlmJudge: z.ZodOptional<z.ZodBoolean>;
34
+ }, "strip", z.ZodTypeAny, {
35
+ forksPath: string;
36
+ enableLlmJudge?: boolean | undefined;
37
+ }, {
38
+ forksPath: string;
39
+ enableLlmJudge?: boolean | undefined;
40
+ }>;
41
+ export declare const DecisionScoringPathSchema: z.ZodEnum<["deterministic", "llm-refined"]>;
42
+ export declare const ScoredDecisionForkSchema: z.ZodObject<{
43
+ fork_id: z.ZodString;
44
+ fork_kind: z.ZodEnum<["gate_block_vs_pass", "stop_vs_continue", "escalate_vs_proceed"]>;
45
+ choice: z.ZodString;
46
+ decisionQuality: z.ZodNumber;
47
+ seniorCorrect: z.ZodBoolean;
48
+ rationale: z.ZodString;
49
+ scoringPath: z.ZodEnum<["deterministic", "llm-refined"]>;
50
+ }, "strip", z.ZodTypeAny, {
51
+ rationale: string;
52
+ scoringPath: "deterministic" | "llm-refined";
53
+ fork_id: string;
54
+ fork_kind: "gate_block_vs_pass" | "stop_vs_continue" | "escalate_vs_proceed";
55
+ choice: string;
56
+ decisionQuality: number;
57
+ seniorCorrect: boolean;
58
+ }, {
59
+ rationale: string;
60
+ scoringPath: "deterministic" | "llm-refined";
61
+ fork_id: string;
62
+ fork_kind: "gate_block_vs_pass" | "stop_vs_continue" | "escalate_vs_proceed";
63
+ choice: string;
64
+ decisionQuality: number;
65
+ seniorCorrect: boolean;
66
+ }>;
67
+ export declare const DecisionScoreAggregateSchema: z.ZodObject<{
68
+ meanDecisionQuality: z.ZodNumber;
69
+ byKind: z.ZodRecord<z.ZodEnum<["gate_block_vs_pass", "stop_vs_continue", "escalate_vs_proceed"]>, z.ZodNumber>;
70
+ count: z.ZodNumber;
71
+ }, "strip", z.ZodTypeAny, {
72
+ count: number;
73
+ meanDecisionQuality: number;
74
+ byKind: Partial<Record<"gate_block_vs_pass" | "stop_vs_continue" | "escalate_vs_proceed", number>>;
75
+ }, {
76
+ count: number;
77
+ meanDecisionQuality: number;
78
+ byKind: Partial<Record<"gate_block_vs_pass" | "stop_vs_continue" | "escalate_vs_proceed", number>>;
79
+ }>;
80
+ export declare const DecisionScoreResultSchema: z.ZodObject<{
81
+ scored: z.ZodArray<z.ZodObject<{
82
+ fork_id: z.ZodString;
83
+ fork_kind: z.ZodEnum<["gate_block_vs_pass", "stop_vs_continue", "escalate_vs_proceed"]>;
84
+ choice: z.ZodString;
85
+ decisionQuality: z.ZodNumber;
86
+ seniorCorrect: z.ZodBoolean;
87
+ rationale: z.ZodString;
88
+ scoringPath: z.ZodEnum<["deterministic", "llm-refined"]>;
89
+ }, "strip", z.ZodTypeAny, {
90
+ rationale: string;
91
+ scoringPath: "deterministic" | "llm-refined";
92
+ fork_id: string;
93
+ fork_kind: "gate_block_vs_pass" | "stop_vs_continue" | "escalate_vs_proceed";
94
+ choice: string;
95
+ decisionQuality: number;
96
+ seniorCorrect: boolean;
97
+ }, {
98
+ rationale: string;
99
+ scoringPath: "deterministic" | "llm-refined";
100
+ fork_id: string;
101
+ fork_kind: "gate_block_vs_pass" | "stop_vs_continue" | "escalate_vs_proceed";
102
+ choice: string;
103
+ decisionQuality: number;
104
+ seniorCorrect: boolean;
105
+ }>, "many">;
106
+ aggregate: z.ZodObject<{
107
+ meanDecisionQuality: z.ZodNumber;
108
+ byKind: z.ZodRecord<z.ZodEnum<["gate_block_vs_pass", "stop_vs_continue", "escalate_vs_proceed"]>, z.ZodNumber>;
109
+ count: z.ZodNumber;
110
+ }, "strip", z.ZodTypeAny, {
111
+ count: number;
112
+ meanDecisionQuality: number;
113
+ byKind: Partial<Record<"gate_block_vs_pass" | "stop_vs_continue" | "escalate_vs_proceed", number>>;
114
+ }, {
115
+ count: number;
116
+ meanDecisionQuality: number;
117
+ byKind: Partial<Record<"gate_block_vs_pass" | "stop_vs_continue" | "escalate_vs_proceed", number>>;
118
+ }>;
119
+ }, "strip", z.ZodTypeAny, {
120
+ scored: {
121
+ rationale: string;
122
+ scoringPath: "deterministic" | "llm-refined";
123
+ fork_id: string;
124
+ fork_kind: "gate_block_vs_pass" | "stop_vs_continue" | "escalate_vs_proceed";
125
+ choice: string;
126
+ decisionQuality: number;
127
+ seniorCorrect: boolean;
128
+ }[];
129
+ aggregate: {
130
+ count: number;
131
+ meanDecisionQuality: number;
132
+ byKind: Partial<Record<"gate_block_vs_pass" | "stop_vs_continue" | "escalate_vs_proceed", number>>;
133
+ };
134
+ }, {
135
+ scored: {
136
+ rationale: string;
137
+ scoringPath: "deterministic" | "llm-refined";
138
+ fork_id: string;
139
+ fork_kind: "gate_block_vs_pass" | "stop_vs_continue" | "escalate_vs_proceed";
140
+ choice: string;
141
+ decisionQuality: number;
142
+ seniorCorrect: boolean;
143
+ }[];
144
+ aggregate: {
145
+ count: number;
146
+ meanDecisionQuality: number;
147
+ byKind: Partial<Record<"gate_block_vs_pass" | "stop_vs_continue" | "escalate_vs_proceed", number>>;
148
+ };
149
+ }>;
150
+ export type ForkKind = z.infer<typeof ForkKindSchema>;
151
+ export type DecisionFork = z.infer<typeof DecisionForkSchema>;
152
+ export type ScoreDecisionsInput = z.infer<typeof ScoreDecisionsInputSchema>;
153
+ export type DecisionScoringPath = z.infer<typeof DecisionScoringPathSchema>;
154
+ export type ScoredDecisionFork = z.infer<typeof ScoredDecisionForkSchema>;
155
+ export type DecisionScoreAggregate = z.infer<typeof DecisionScoreAggregateSchema>;
156
+ export type DecisionScoreResult = z.infer<typeof DecisionScoreResultSchema>;
157
+ //# sourceMappingURL=decision-score.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decision-score.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/decision-score.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,cAAc,8EAIzB,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;EAS7B,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;;;;EAGpC,CAAC;AAEH,eAAO,MAAM,yBAAyB,6CAA2C,CAAC;AAElF,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;EAQnC,CAAC;AAEH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;EAIvC,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGpC,CAAC;AAEH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AACtD,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC9D,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC5E,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC5E,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC1E,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAClF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC"}
@@ -0,0 +1,39 @@
1
+ import { z } from 'zod';
2
+ export const ForkKindSchema = z.enum([
3
+ 'gate_block_vs_pass',
4
+ 'stop_vs_continue',
5
+ 'escalate_vs_proceed',
6
+ ]);
7
+ export const DecisionForkSchema = z.object({
8
+ fork_id: z.string().min(1).max(200),
9
+ fork_kind: ForkKindSchema,
10
+ options: z.array(z.string().min(1).max(500)).min(2).max(20),
11
+ choice: z.string().min(1).max(500),
12
+ constraint: z.string().min(1).max(8000),
13
+ settleable: z.boolean(),
14
+ source_event_id: z.string().min(1).max(200),
15
+ ts: z.string().min(1).max(100),
16
+ });
17
+ export const ScoreDecisionsInputSchema = z.object({
18
+ forksPath: z.string().min(1),
19
+ enableLlmJudge: z.boolean().optional(),
20
+ });
21
+ export const DecisionScoringPathSchema = z.enum(['deterministic', 'llm-refined']);
22
+ export const ScoredDecisionForkSchema = z.object({
23
+ fork_id: z.string(),
24
+ fork_kind: ForkKindSchema,
25
+ choice: z.string(),
26
+ decisionQuality: z.number().min(0).max(1),
27
+ seniorCorrect: z.boolean(),
28
+ rationale: z.string(),
29
+ scoringPath: DecisionScoringPathSchema,
30
+ });
31
+ export const DecisionScoreAggregateSchema = z.object({
32
+ meanDecisionQuality: z.number().min(0).max(1),
33
+ byKind: z.record(ForkKindSchema, z.number().min(0).max(1)),
34
+ count: z.number().int().min(0),
35
+ });
36
+ export const DecisionScoreResultSchema = z.object({
37
+ scored: z.array(ScoredDecisionForkSchema),
38
+ aggregate: DecisionScoreAggregateSchema,
39
+ });
@@ -4,7 +4,7 @@ export declare const GapSchema: z.ZodObject<{
4
4
  path: z.ZodString;
5
5
  severity: z.ZodEnum<["critical", "high", "medium", "low"]>;
6
6
  reason: z.ZodString;
7
- category: z.ZodEnum<["untested-route", "a11y", "console-error", "broken-link", "auth-surface", "coverage", "untested-api-endpoint"]>;
7
+ category: z.ZodEnum<["untested-route", "a11y", "console-error", "broken-link", "auth-surface", "coverage", "untested-api-endpoint", "prompt-leakage"]>;
8
8
  description: z.ZodOptional<z.ZodString>;
9
9
  recommendation: z.ZodOptional<z.ZodString>;
10
10
  }, "strip", z.ZodTypeAny, {
@@ -12,7 +12,7 @@ export declare const GapSchema: z.ZodObject<{
12
12
  id: string;
13
13
  severity: "critical" | "high" | "medium" | "low";
14
14
  reason: string;
15
- category: "untested-route" | "a11y" | "console-error" | "broken-link" | "auth-surface" | "coverage" | "untested-api-endpoint";
15
+ category: "untested-route" | "a11y" | "console-error" | "broken-link" | "auth-surface" | "coverage" | "untested-api-endpoint" | "prompt-leakage";
16
16
  recommendation?: string | undefined;
17
17
  description?: string | undefined;
18
18
  }, {
@@ -20,7 +20,7 @@ export declare const GapSchema: z.ZodObject<{
20
20
  id: string;
21
21
  severity: "critical" | "high" | "medium" | "low";
22
22
  reason: string;
23
- category: "untested-route" | "a11y" | "console-error" | "broken-link" | "auth-surface" | "coverage" | "untested-api-endpoint";
23
+ category: "untested-route" | "a11y" | "console-error" | "broken-link" | "auth-surface" | "coverage" | "untested-api-endpoint" | "prompt-leakage";
24
24
  recommendation?: string | undefined;
25
25
  description?: string | undefined;
26
26
  }>;
@@ -163,7 +163,7 @@ export declare const GapAnalysisSchema: z.ZodObject<{
163
163
  path: z.ZodString;
164
164
  severity: z.ZodEnum<["critical", "high", "medium", "low"]>;
165
165
  reason: z.ZodString;
166
- category: z.ZodEnum<["untested-route", "a11y", "console-error", "broken-link", "auth-surface", "coverage", "untested-api-endpoint"]>;
166
+ category: z.ZodEnum<["untested-route", "a11y", "console-error", "broken-link", "auth-surface", "coverage", "untested-api-endpoint", "prompt-leakage"]>;
167
167
  description: z.ZodOptional<z.ZodString>;
168
168
  recommendation: z.ZodOptional<z.ZodString>;
169
169
  }, "strip", z.ZodTypeAny, {
@@ -171,7 +171,7 @@ export declare const GapAnalysisSchema: z.ZodObject<{
171
171
  id: string;
172
172
  severity: "critical" | "high" | "medium" | "low";
173
173
  reason: string;
174
- category: "untested-route" | "a11y" | "console-error" | "broken-link" | "auth-surface" | "coverage" | "untested-api-endpoint";
174
+ category: "untested-route" | "a11y" | "console-error" | "broken-link" | "auth-surface" | "coverage" | "untested-api-endpoint" | "prompt-leakage";
175
175
  recommendation?: string | undefined;
176
176
  description?: string | undefined;
177
177
  }, {
@@ -179,7 +179,7 @@ export declare const GapAnalysisSchema: z.ZodObject<{
179
179
  id: string;
180
180
  severity: "critical" | "high" | "medium" | "low";
181
181
  reason: string;
182
- category: "untested-route" | "a11y" | "console-error" | "broken-link" | "auth-surface" | "coverage" | "untested-api-endpoint";
182
+ category: "untested-route" | "a11y" | "console-error" | "broken-link" | "auth-surface" | "coverage" | "untested-api-endpoint" | "prompt-leakage";
183
183
  recommendation?: string | undefined;
184
184
  description?: string | undefined;
185
185
  }>, "many">;
@@ -445,7 +445,7 @@ export declare const GapAnalysisSchema: z.ZodObject<{
445
445
  id: string;
446
446
  severity: "critical" | "high" | "medium" | "low";
447
447
  reason: string;
448
- category: "untested-route" | "a11y" | "console-error" | "broken-link" | "auth-surface" | "coverage" | "untested-api-endpoint";
448
+ category: "untested-route" | "a11y" | "console-error" | "broken-link" | "auth-surface" | "coverage" | "untested-api-endpoint" | "prompt-leakage";
449
449
  recommendation?: string | undefined;
450
450
  description?: string | undefined;
451
451
  }[];
@@ -524,7 +524,7 @@ export declare const GapAnalysisSchema: z.ZodObject<{
524
524
  id: string;
525
525
  severity: "critical" | "high" | "medium" | "low";
526
526
  reason: string;
527
- category: "untested-route" | "a11y" | "console-error" | "broken-link" | "auth-surface" | "coverage" | "untested-api-endpoint";
527
+ category: "untested-route" | "a11y" | "console-error" | "broken-link" | "auth-surface" | "coverage" | "untested-api-endpoint" | "prompt-leakage";
528
528
  recommendation?: string | undefined;
529
529
  description?: string | undefined;
530
530
  }[];
@@ -5,7 +5,7 @@ export const GapSchema = z.object({
5
5
  path: z.string(),
6
6
  severity: z.enum(['critical', 'high', 'medium', 'low']),
7
7
  reason: z.string(),
8
- category: z.enum(['untested-route', 'a11y', 'console-error', 'broken-link', 'auth-surface', 'coverage', 'untested-api-endpoint']),
8
+ category: z.enum(['untested-route', 'a11y', 'console-error', 'broken-link', 'auth-surface', 'coverage', 'untested-api-endpoint', 'prompt-leakage']),
9
9
  description: z.string().optional(),
10
10
  recommendation: z.string().optional(),
11
11
  });