mcp-react-toolkit 1.3.0 → 1.4.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.
- package/README.md +28 -28
- package/node_modules/@mcp-showcase/shared/build/McpServerBase.d.ts +13 -0
- package/node_modules/@mcp-showcase/shared/build/McpServerBase.d.ts.map +1 -1
- package/node_modules/@mcp-showcase/shared/build/McpServerBase.js +40 -0
- package/node_modules/@mcp-showcase/shared/build/McpServerBase.js.map +1 -1
- package/node_modules/@mcp-showcase/shared/build/types.d.ts +11 -0
- package/node_modules/@mcp-showcase/shared/build/types.d.ts.map +1 -1
- package/node_modules/@mcp-showcase/shared/src/McpServerBase.ts +45 -0
- package/node_modules/@mcp-showcase/shared/src/types.ts +12 -0
- package/node_modules/@mcp-showcase/ui-kit/README.md +30 -0
- package/node_modules/@mcp-showcase/ui-kit/build/components.d.ts +10 -0
- package/node_modules/@mcp-showcase/ui-kit/build/components.d.ts.map +1 -0
- package/node_modules/@mcp-showcase/ui-kit/build/components.js +177 -0
- package/node_modules/@mcp-showcase/ui-kit/build/components.js.map +1 -0
- package/node_modules/@mcp-showcase/ui-kit/build/escape.d.ts +3 -0
- package/node_modules/@mcp-showcase/ui-kit/build/escape.d.ts.map +1 -0
- package/node_modules/@mcp-showcase/ui-kit/build/escape.js +10 -0
- package/node_modules/@mcp-showcase/ui-kit/build/escape.js.map +1 -0
- package/node_modules/@mcp-showcase/ui-kit/build/fixture.d.ts +4 -0
- package/node_modules/@mcp-showcase/ui-kit/build/fixture.d.ts.map +1 -0
- package/node_modules/@mcp-showcase/ui-kit/build/fixture.js +52 -0
- package/node_modules/@mcp-showcase/ui-kit/build/fixture.js.map +1 -0
- package/node_modules/@mcp-showcase/ui-kit/build/generate-template.d.ts +2 -0
- package/node_modules/@mcp-showcase/ui-kit/build/generate-template.d.ts.map +1 -0
- package/node_modules/@mcp-showcase/ui-kit/build/generate-template.js +19 -0
- package/node_modules/@mcp-showcase/ui-kit/build/generate-template.js.map +1 -0
- package/node_modules/@mcp-showcase/ui-kit/build/index.d.ts +6 -0
- package/node_modules/@mcp-showcase/ui-kit/build/index.d.ts.map +1 -0
- package/node_modules/@mcp-showcase/ui-kit/build/index.js +7 -0
- package/node_modules/@mcp-showcase/ui-kit/build/index.js.map +1 -0
- package/node_modules/@mcp-showcase/ui-kit/build/render.d.ts +3 -0
- package/node_modules/@mcp-showcase/ui-kit/build/render.d.ts.map +1 -0
- package/node_modules/@mcp-showcase/ui-kit/build/render.js +38 -0
- package/node_modules/@mcp-showcase/ui-kit/build/render.js.map +1 -0
- package/node_modules/@mcp-showcase/ui-kit/build/result-components.d.ts +9 -0
- package/node_modules/@mcp-showcase/ui-kit/build/result-components.d.ts.map +1 -0
- package/node_modules/@mcp-showcase/ui-kit/build/result-components.js +105 -0
- package/node_modules/@mcp-showcase/ui-kit/build/result-components.js.map +1 -0
- package/node_modules/@mcp-showcase/ui-kit/build/result-fixture.d.ts +4 -0
- package/node_modules/@mcp-showcase/ui-kit/build/result-fixture.d.ts.map +1 -0
- package/node_modules/@mcp-showcase/ui-kit/build/result-fixture.js +39 -0
- package/node_modules/@mcp-showcase/ui-kit/build/result-fixture.js.map +1 -0
- package/node_modules/@mcp-showcase/ui-kit/build/result-render.d.ts +3 -0
- package/node_modules/@mcp-showcase/ui-kit/build/result-render.d.ts.map +1 -0
- package/node_modules/@mcp-showcase/ui-kit/build/result-render.js +37 -0
- package/node_modules/@mcp-showcase/ui-kit/build/result-render.js.map +1 -0
- package/node_modules/@mcp-showcase/ui-kit/build/result-runtime.d.ts +2 -0
- package/node_modules/@mcp-showcase/ui-kit/build/result-runtime.d.ts.map +1 -0
- package/node_modules/@mcp-showcase/ui-kit/build/result-runtime.js +72 -0
- package/node_modules/@mcp-showcase/ui-kit/build/result-runtime.js.map +1 -0
- package/node_modules/@mcp-showcase/ui-kit/build/runtime.d.ts +2 -0
- package/node_modules/@mcp-showcase/ui-kit/build/runtime.d.ts.map +1 -0
- package/node_modules/@mcp-showcase/ui-kit/build/runtime.js +221 -0
- package/node_modules/@mcp-showcase/ui-kit/build/runtime.js.map +1 -0
- package/node_modules/@mcp-showcase/ui-kit/build/theme.d.ts +2 -0
- package/node_modules/@mcp-showcase/ui-kit/build/theme.d.ts.map +1 -0
- package/node_modules/@mcp-showcase/ui-kit/build/theme.js +278 -0
- package/node_modules/@mcp-showcase/ui-kit/build/theme.js.map +1 -0
- package/node_modules/@mcp-showcase/ui-kit/build/types.d.ts +113 -0
- package/node_modules/@mcp-showcase/ui-kit/build/types.d.ts.map +1 -0
- package/node_modules/@mcp-showcase/ui-kit/build/types.js +35 -0
- package/node_modules/@mcp-showcase/ui-kit/build/types.js.map +1 -0
- package/node_modules/@mcp-showcase/ui-kit/demo/index.html +653 -0
- package/node_modules/@mcp-showcase/ui-kit/demo/result.html +445 -0
- package/node_modules/@mcp-showcase/ui-kit/package.json +19 -0
- package/node_modules/@mcp-showcase/ui-kit/src/components.ts +191 -0
- package/node_modules/@mcp-showcase/ui-kit/src/escape.ts +9 -0
- package/node_modules/@mcp-showcase/ui-kit/src/fixture.ts +53 -0
- package/node_modules/@mcp-showcase/ui-kit/src/generate-template.ts +21 -0
- package/node_modules/@mcp-showcase/ui-kit/src/index.test.ts +72 -0
- package/node_modules/@mcp-showcase/ui-kit/src/index.ts +6 -0
- package/node_modules/@mcp-showcase/ui-kit/src/render.ts +48 -0
- package/node_modules/@mcp-showcase/ui-kit/src/result-components.ts +112 -0
- package/node_modules/@mcp-showcase/ui-kit/src/result-fixture.ts +40 -0
- package/node_modules/@mcp-showcase/ui-kit/src/result-render.test.ts +47 -0
- package/node_modules/@mcp-showcase/ui-kit/src/result-render.ts +47 -0
- package/node_modules/@mcp-showcase/ui-kit/src/result-runtime.ts +72 -0
- package/node_modules/@mcp-showcase/ui-kit/src/runtime.smoke.test.ts +103 -0
- package/node_modules/@mcp-showcase/ui-kit/src/runtime.ts +221 -0
- package/node_modules/@mcp-showcase/ui-kit/src/theme.ts +278 -0
- package/node_modules/@mcp-showcase/ui-kit/src/types.ts +140 -0
- package/node_modules/@mcp-showcase/ui-kit/tsconfig.json +9 -0
- package/package.json +16 -5
- package/tools/accessibility-checker/build/health-report.d.ts +27 -0
- package/tools/accessibility-checker/build/health-report.d.ts.map +1 -0
- package/tools/accessibility-checker/build/health-report.js +140 -0
- package/tools/accessibility-checker/build/health-report.js.map +1 -0
- package/tools/accessibility-checker/build/index.js +7 -1
- package/tools/accessibility-checker/build/index.js.map +1 -1
- package/tools/accessibility-checker/package.json +1 -0
- package/tools/code-modernizer/build/index.js +60 -44
- package/tools/code-modernizer/build/index.js.map +1 -1
- package/tools/code-modernizer/build/result-report.d.ts +24 -0
- package/tools/code-modernizer/build/result-report.d.ts.map +1 -0
- package/tools/code-modernizer/build/result-report.js +101 -0
- package/tools/code-modernizer/build/result-report.js.map +1 -0
- package/tools/code-modernizer/package.json +2 -0
- package/tools/component-factory/build/index.js +7 -1
- package/tools/component-factory/build/index.js.map +1 -1
- package/tools/component-factory/build/result-report.d.ts +11 -0
- package/tools/component-factory/build/result-report.d.ts.map +1 -0
- package/tools/component-factory/build/result-report.js +104 -0
- package/tools/component-factory/build/result-report.js.map +1 -0
- package/tools/component-factory/package.json +1 -0
- package/tools/component-fixer/build/index.js +6 -6
- package/tools/component-fixer/build/index.js.map +1 -1
- package/tools/component-fixer/build/result-report.d.ts +37 -0
- package/tools/component-fixer/build/result-report.d.ts.map +1 -0
- package/tools/component-fixer/build/result-report.js +106 -0
- package/tools/component-fixer/build/result-report.js.map +1 -0
- package/tools/component-fixer/package.json +1 -0
- package/tools/component-reviewer/build/health-report.d.ts +37 -0
- package/tools/component-reviewer/build/health-report.d.ts.map +1 -0
- package/tools/component-reviewer/build/health-report.js +116 -0
- package/tools/component-reviewer/build/health-report.js.map +1 -0
- package/tools/component-reviewer/build/index.d.ts.map +1 -1
- package/tools/component-reviewer/build/index.js +7 -6
- package/tools/component-reviewer/build/index.js.map +1 -1
- package/tools/component-reviewer/package.json +1 -0
- package/tools/dep-auditor/build/health-report.d.ts +16 -0
- package/tools/dep-auditor/build/health-report.d.ts.map +1 -0
- package/tools/dep-auditor/build/health-report.js +187 -0
- package/tools/dep-auditor/build/health-report.js.map +1 -0
- package/tools/dep-auditor/build/index.d.ts.map +1 -1
- package/tools/dep-auditor/build/index.js +7 -1
- package/tools/dep-auditor/build/index.js.map +1 -1
- package/tools/dep-auditor/package.json +1 -0
- package/tools/generate-tests/build/index.js +8 -1
- package/tools/generate-tests/build/index.js.map +1 -1
- package/tools/generate-tests/build/result-report.d.ts +14 -0
- package/tools/generate-tests/build/result-report.d.ts.map +1 -0
- package/tools/generate-tests/build/result-report.js +124 -0
- package/tools/generate-tests/build/result-report.js.map +1 -0
- package/tools/generate-tests/package.json +1 -0
- package/tools/legacy-analyzer/build/health-report.d.ts +4 -0
- package/tools/legacy-analyzer/build/health-report.d.ts.map +1 -0
- package/tools/legacy-analyzer/build/health-report.js +164 -0
- package/tools/legacy-analyzer/build/health-report.js.map +1 -0
- package/tools/legacy-analyzer/build/index.js +15 -1
- package/tools/legacy-analyzer/build/index.js.map +1 -1
- package/tools/legacy-analyzer/build/tools/01-detect-project-tech.d.ts.map +1 -1
- package/tools/legacy-analyzer/build/tools/01-detect-project-tech.js +3 -8
- package/tools/legacy-analyzer/build/tools/01-detect-project-tech.js.map +1 -1
- package/tools/legacy-analyzer/build/tools/05-analyze-api-layer.d.ts.map +1 -1
- package/tools/legacy-analyzer/build/tools/05-analyze-api-layer.js +25 -3
- package/tools/legacy-analyzer/build/tools/05-analyze-api-layer.js.map +1 -1
- package/tools/legacy-analyzer/package.json +1 -0
- package/tools/lighthouse-runner/build/health-report.d.ts +14 -0
- package/tools/lighthouse-runner/build/health-report.d.ts.map +1 -0
- package/tools/lighthouse-runner/build/health-report.js +138 -0
- package/tools/lighthouse-runner/build/health-report.js.map +1 -0
- package/tools/lighthouse-runner/build/index.d.ts.map +1 -1
- package/tools/lighthouse-runner/build/index.js +7 -1
- package/tools/lighthouse-runner/build/index.js.map +1 -1
- package/tools/lighthouse-runner/package.json +1 -0
- package/tools/monorepo-manager/build/index.js +9 -1
- package/tools/monorepo-manager/build/index.js.map +1 -1
- package/tools/monorepo-manager/build/result-report.d.ts +20 -0
- package/tools/monorepo-manager/build/result-report.d.ts.map +1 -0
- package/tools/monorepo-manager/build/result-report.js +84 -0
- package/tools/monorepo-manager/build/result-report.js.map +1 -0
- package/tools/monorepo-manager/package.json +1 -0
- package/tools/performance-audit/build/health-report.d.ts +30 -0
- package/tools/performance-audit/build/health-report.d.ts.map +1 -0
- package/tools/performance-audit/build/health-report.js +152 -0
- package/tools/performance-audit/build/health-report.js.map +1 -0
- package/tools/performance-audit/build/index.d.ts.map +1 -1
- package/tools/performance-audit/build/index.js +7 -1
- package/tools/performance-audit/build/index.js.map +1 -1
- package/tools/performance-audit/package.json +1 -0
- package/tools/quality-pipeline/build/health-report.d.ts +11 -0
- package/tools/quality-pipeline/build/health-report.d.ts.map +1 -0
- package/tools/quality-pipeline/build/health-report.js +137 -0
- package/tools/quality-pipeline/build/health-report.js.map +1 -0
- package/tools/quality-pipeline/build/index.js +7 -1
- package/tools/quality-pipeline/build/index.js.map +1 -1
- package/tools/quality-pipeline/package.json +1 -0
- package/tools/render-analyzer/build/health-report.d.ts +33 -0
- package/tools/render-analyzer/build/health-report.d.ts.map +1 -0
- package/tools/render-analyzer/build/health-report.js +142 -0
- package/tools/render-analyzer/build/health-report.js.map +1 -0
- package/tools/render-analyzer/build/index.d.ts.map +1 -1
- package/tools/render-analyzer/build/index.js +7 -1
- package/tools/render-analyzer/build/index.js.map +1 -1
- package/tools/render-analyzer/package.json +1 -0
- package/tools/shared/build/McpServerBase.d.ts +13 -0
- package/tools/shared/build/McpServerBase.d.ts.map +1 -1
- package/tools/shared/build/McpServerBase.js +40 -0
- package/tools/shared/build/McpServerBase.js.map +1 -1
- package/tools/shared/build/types.d.ts +11 -0
- package/tools/shared/build/types.d.ts.map +1 -1
- package/tools/storybook-generator/build/index.d.ts.map +1 -1
- package/tools/storybook-generator/build/index.js +9 -1
- package/tools/storybook-generator/build/index.js.map +1 -1
- package/tools/storybook-generator/build/result-report.d.ts +22 -0
- package/tools/storybook-generator/build/result-report.d.ts.map +1 -0
- package/tools/storybook-generator/build/result-report.js +77 -0
- package/tools/storybook-generator/build/result-report.js.map +1 -0
- package/tools/storybook-generator/package.json +1 -0
- package/tools/test-gap-analyzer/build/health-report.d.ts +34 -0
- package/tools/test-gap-analyzer/build/health-report.d.ts.map +1 -0
- package/tools/test-gap-analyzer/build/health-report.js +190 -0
- package/tools/test-gap-analyzer/build/health-report.js.map +1 -0
- package/tools/test-gap-analyzer/build/index.d.ts.map +1 -1
- package/tools/test-gap-analyzer/build/index.js +7 -1
- package/tools/test-gap-analyzer/build/index.js.map +1 -1
- package/tools/test-gap-analyzer/package.json +1 -0
- package/tools/typescript-enforcer/build/health-report.d.ts +33 -0
- package/tools/typescript-enforcer/build/health-report.d.ts.map +1 -0
- package/tools/typescript-enforcer/build/health-report.js +143 -0
- package/tools/typescript-enforcer/build/health-report.js.map +1 -0
- package/tools/typescript-enforcer/build/index.js +6 -1
- package/tools/typescript-enforcer/build/index.js.map +1 -1
- package/tools/typescript-enforcer/package.json +1 -0
- package/tools/ui-kit/README.md +30 -0
- package/tools/ui-kit/build/components.d.ts +10 -0
- package/tools/ui-kit/build/components.d.ts.map +1 -0
- package/tools/ui-kit/build/components.js +177 -0
- package/tools/ui-kit/build/components.js.map +1 -0
- package/tools/ui-kit/build/escape.d.ts +3 -0
- package/tools/ui-kit/build/escape.d.ts.map +1 -0
- package/tools/ui-kit/build/escape.js +10 -0
- package/tools/ui-kit/build/escape.js.map +1 -0
- package/tools/ui-kit/build/fixture.d.ts +4 -0
- package/tools/ui-kit/build/fixture.d.ts.map +1 -0
- package/tools/ui-kit/build/fixture.js +52 -0
- package/tools/ui-kit/build/fixture.js.map +1 -0
- package/tools/ui-kit/build/generate-template.d.ts +2 -0
- package/tools/ui-kit/build/generate-template.d.ts.map +1 -0
- package/tools/ui-kit/build/generate-template.js +19 -0
- package/tools/ui-kit/build/generate-template.js.map +1 -0
- package/tools/ui-kit/build/index.d.ts +6 -0
- package/tools/ui-kit/build/index.d.ts.map +1 -0
- package/tools/ui-kit/build/index.js +7 -0
- package/tools/ui-kit/build/index.js.map +1 -0
- package/tools/ui-kit/build/render.d.ts +3 -0
- package/tools/ui-kit/build/render.d.ts.map +1 -0
- package/tools/ui-kit/build/render.js +38 -0
- package/tools/ui-kit/build/render.js.map +1 -0
- package/tools/ui-kit/build/result-components.d.ts +9 -0
- package/tools/ui-kit/build/result-components.d.ts.map +1 -0
- package/tools/ui-kit/build/result-components.js +105 -0
- package/tools/ui-kit/build/result-components.js.map +1 -0
- package/tools/ui-kit/build/result-fixture.d.ts +4 -0
- package/tools/ui-kit/build/result-fixture.d.ts.map +1 -0
- package/tools/ui-kit/build/result-fixture.js +39 -0
- package/tools/ui-kit/build/result-fixture.js.map +1 -0
- package/tools/ui-kit/build/result-render.d.ts +3 -0
- package/tools/ui-kit/build/result-render.d.ts.map +1 -0
- package/tools/ui-kit/build/result-render.js +37 -0
- package/tools/ui-kit/build/result-render.js.map +1 -0
- package/tools/ui-kit/build/result-runtime.d.ts +2 -0
- package/tools/ui-kit/build/result-runtime.d.ts.map +1 -0
- package/tools/ui-kit/build/result-runtime.js +72 -0
- package/tools/ui-kit/build/result-runtime.js.map +1 -0
- package/tools/ui-kit/build/runtime.d.ts +2 -0
- package/tools/ui-kit/build/runtime.d.ts.map +1 -0
- package/tools/ui-kit/build/runtime.js +221 -0
- package/tools/ui-kit/build/runtime.js.map +1 -0
- package/tools/ui-kit/build/theme.d.ts +2 -0
- package/tools/ui-kit/build/theme.d.ts.map +1 -0
- package/tools/ui-kit/build/theme.js +278 -0
- package/tools/ui-kit/build/theme.js.map +1 -0
- package/tools/ui-kit/build/types.d.ts +113 -0
- package/tools/ui-kit/build/types.d.ts.map +1 -0
- package/tools/ui-kit/build/types.js +35 -0
- package/tools/ui-kit/build/types.js.map +1 -0
- package/tools/ui-kit/package.json +19 -0
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
export type Severity = "critical" | "high" | "medium" | "low";
|
|
2
|
+
export type CategoryStatus = "good" | "warn" | "bad";
|
|
3
|
+
/** An agentic action a UI element can trigger back in the host (or fall back to in a browser). */
|
|
4
|
+
export type ReportAction = {
|
|
5
|
+
id: string;
|
|
6
|
+
label: string;
|
|
7
|
+
kind: "tool";
|
|
8
|
+
tool: string;
|
|
9
|
+
params?: Record<string, unknown>;
|
|
10
|
+
fallback: string;
|
|
11
|
+
} | {
|
|
12
|
+
id: string;
|
|
13
|
+
label: string;
|
|
14
|
+
kind: "prompt";
|
|
15
|
+
prompt: string;
|
|
16
|
+
fallback?: string;
|
|
17
|
+
} | {
|
|
18
|
+
id: string;
|
|
19
|
+
label: string;
|
|
20
|
+
kind: "link";
|
|
21
|
+
href: string;
|
|
22
|
+
};
|
|
23
|
+
export interface LabelValue {
|
|
24
|
+
label: string;
|
|
25
|
+
value: string;
|
|
26
|
+
}
|
|
27
|
+
export interface ReportCategory {
|
|
28
|
+
id: string;
|
|
29
|
+
name: string;
|
|
30
|
+
/** 0-100; omit when a numeric score is not meaningful. */
|
|
31
|
+
score?: number;
|
|
32
|
+
status: CategoryStatus;
|
|
33
|
+
summary: string;
|
|
34
|
+
issueCount: number;
|
|
35
|
+
details?: LabelValue[];
|
|
36
|
+
}
|
|
37
|
+
export interface ReportIssue {
|
|
38
|
+
id: string;
|
|
39
|
+
/** Matches a ReportCategory.id. */
|
|
40
|
+
category: string;
|
|
41
|
+
severity: Severity;
|
|
42
|
+
title: string;
|
|
43
|
+
description?: string;
|
|
44
|
+
file?: string;
|
|
45
|
+
meta?: LabelValue[];
|
|
46
|
+
actions?: ReportAction[];
|
|
47
|
+
}
|
|
48
|
+
export interface ReportMeta {
|
|
49
|
+
title: string;
|
|
50
|
+
subtitle?: string;
|
|
51
|
+
/** The thing being analysed (repo path, package name). */
|
|
52
|
+
target: string;
|
|
53
|
+
/** ISO date string. */
|
|
54
|
+
generatedAt: string;
|
|
55
|
+
/** Producing tool name, e.g. "legacy-analyzer". */
|
|
56
|
+
tool: string;
|
|
57
|
+
}
|
|
58
|
+
export interface HealthReport {
|
|
59
|
+
meta: ReportMeta;
|
|
60
|
+
/** 0-100 headline score. */
|
|
61
|
+
score: number;
|
|
62
|
+
totalIssues: number;
|
|
63
|
+
/** Tech/context chips shown in the hero. */
|
|
64
|
+
chips?: LabelValue[];
|
|
65
|
+
categories: ReportCategory[];
|
|
66
|
+
issues: ReportIssue[];
|
|
67
|
+
/** Top prioritised actions ("Fix-First Queue"). */
|
|
68
|
+
topActions?: ReportAction[];
|
|
69
|
+
}
|
|
70
|
+
export type Grade = "A+" | "A" | "B" | "C" | "D" | "F";
|
|
71
|
+
export declare function scoreToGrade(score: number): Grade;
|
|
72
|
+
/** Health band drives the accent colour in both themes. */
|
|
73
|
+
export declare function scoreToBand(score: number): CategoryStatus;
|
|
74
|
+
export type FileChangeKind = "created" | "modified" | "deleted" | "renamed";
|
|
75
|
+
export type ResultStatus = "success" | "partial" | "noop";
|
|
76
|
+
export type ItemStatus = "ok" | "warn" | "error";
|
|
77
|
+
export interface FileChange {
|
|
78
|
+
path: string;
|
|
79
|
+
kind: FileChangeKind;
|
|
80
|
+
/** One-line description of what changed. */
|
|
81
|
+
summary?: string;
|
|
82
|
+
additions?: number;
|
|
83
|
+
deletions?: number;
|
|
84
|
+
language?: string;
|
|
85
|
+
/** Optional unified-diff or code snippet shown in the detail drawer. */
|
|
86
|
+
diff?: string;
|
|
87
|
+
}
|
|
88
|
+
export interface ResultSectionItem {
|
|
89
|
+
title: string;
|
|
90
|
+
detail?: string;
|
|
91
|
+
status?: ItemStatus;
|
|
92
|
+
}
|
|
93
|
+
/** A grouped list — e.g. "Steps", "Workspaces", "Warnings". */
|
|
94
|
+
export interface ResultSection {
|
|
95
|
+
title: string;
|
|
96
|
+
items: ResultSectionItem[];
|
|
97
|
+
}
|
|
98
|
+
export interface ResultReport {
|
|
99
|
+
meta: ReportMeta;
|
|
100
|
+
/** Headline outcome, e.g. "Created 3 files", "Applied 7 fixes". */
|
|
101
|
+
headline: string;
|
|
102
|
+
status: ResultStatus;
|
|
103
|
+
/** Context metrics shown as chips in the hero. */
|
|
104
|
+
stats?: LabelValue[];
|
|
105
|
+
/** File-level changes — the main grid. */
|
|
106
|
+
changes?: FileChange[];
|
|
107
|
+
/** Optional grouped detail lists. */
|
|
108
|
+
sections?: ResultSection[];
|
|
109
|
+
/** Follow-up actions (review, run tests, open file). */
|
|
110
|
+
nextActions?: ReportAction[];
|
|
111
|
+
}
|
|
112
|
+
export declare function statusToBand(status: ResultStatus): CategoryStatus;
|
|
113
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAOA,MAAM,MAAM,QAAQ,GAAG,UAAU,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,CAAC;AAC9D,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,CAAC;AAErD,kGAAkG;AAClG,MAAM,MAAM,YAAY,GACpB;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GAC7G;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,GAChF;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAA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AClD,KAAK,CAAC,EAAE,UAAU,EAAE,CAAC;IACrB,0CAA0C;IAC1C,OAAO,CAAC,EAAE,UAAU,EAAE,CAAC;IACvB,qCAAqC;IACrC,QAAQ,CAAC,EAAE,aAAa,EAAE,CAAC;IAC3B,wDAAwD;IACxD,WAAW,CAAC,EAAE,YAAY,EAAE,CAAC;CAC9B;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,YAAY,GAAG,cAAc,CAIjE"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// ============================================================================
|
|
2
|
+
// HEALTH REPORT SCHEMA — the generic, tool-agnostic contract.
|
|
3
|
+
// Any MCP tool that maps its output to this shape gets the full premium UI.
|
|
4
|
+
// legacy-analyzer is the flagship producer; component-reviewer, dep-auditor,
|
|
5
|
+
// quality-pipeline etc. can map into the same schema later.
|
|
6
|
+
// ============================================================================
|
|
7
|
+
export function scoreToGrade(score) {
|
|
8
|
+
if (score >= 95)
|
|
9
|
+
return "A+";
|
|
10
|
+
if (score >= 85)
|
|
11
|
+
return "A";
|
|
12
|
+
if (score >= 70)
|
|
13
|
+
return "B";
|
|
14
|
+
if (score >= 55)
|
|
15
|
+
return "C";
|
|
16
|
+
if (score >= 40)
|
|
17
|
+
return "D";
|
|
18
|
+
return "F";
|
|
19
|
+
}
|
|
20
|
+
/** Health band drives the accent colour in both themes. */
|
|
21
|
+
export function scoreToBand(score) {
|
|
22
|
+
if (score >= 70)
|
|
23
|
+
return "good";
|
|
24
|
+
if (score >= 45)
|
|
25
|
+
return "warn";
|
|
26
|
+
return "bad";
|
|
27
|
+
}
|
|
28
|
+
export function statusToBand(status) {
|
|
29
|
+
if (status === "success")
|
|
30
|
+
return "good";
|
|
31
|
+
if (status === "partial")
|
|
32
|
+
return "warn";
|
|
33
|
+
return "good";
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,8DAA8D;AAC9D,4EAA4E;AAC5E,6EAA6E;AAC7E,4DAA4D;AAC5D,+EAA+E;AAiE/E,MAAM,UAAU,YAAY,CAAC,KAAa;IACxC,IAAI,KAAK,IAAI,EAAE;QAAE,OAAO,IAAI,CAAC;IAC7B,IAAI,KAAK,IAAI,EAAE;QAAE,OAAO,GAAG,CAAC;IAC5B,IAAI,KAAK,IAAI,EAAE;QAAE,OAAO,GAAG,CAAC;IAC5B,IAAI,KAAK,IAAI,EAAE;QAAE,OAAO,GAAG,CAAC;IAC5B,IAAI,KAAK,IAAI,EAAE;QAAE,OAAO,GAAG,CAAC;IAC5B,OAAO,GAAG,CAAC;AACb,CAAC;AAED,2DAA2D;AAC3D,MAAM,UAAU,WAAW,CAAC,KAAa;IACvC,IAAI,KAAK,IAAI,EAAE;QAAE,OAAO,MAAM,CAAC;IAC/B,IAAI,KAAK,IAAI,EAAE;QAAE,OAAO,MAAM,CAAC;IAC/B,OAAO,KAAK,CAAC;AACf,CAAC;AAmDD,MAAM,UAAU,YAAY,CAAC,MAAoB;IAC/C,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,MAAM,CAAC;IACxC,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,MAAM,CAAC;IACxC,OAAO,MAAM,CAAC;AAChB,CAAC"}
|