@thomasminh1995/depverdict 0.6.0-alpha.1
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/LICENSE +21 -0
- package/README.md +518 -0
- package/bin/depverdict.js +7 -0
- package/bin/upgradelens.js +7 -0
- package/docs/GR-01-Semantic-Grounding-Failure-Analysis.md +309 -0
- package/docs/GR-02-Versioned-Action-Evaluation-Criteria.md +187 -0
- package/docs/GR-03-Extractive-Contract-Safety-Experiment.md +242 -0
- package/docs/GR-04-Versioned-Production-Extractive-Contract.md +154 -0
- package/docs/IA-01-Repository-Usage-Discovery.md +122 -0
- package/docs/IA-02-Repository-Impact-Analysis.md +118 -0
- package/docs/IA-03-Repository-Impact-Evidence.md +160 -0
- package/docs/IA-04-CLI-Orchestration.md +235 -0
- package/docs/IA-05-Real-Provider-Validation.md +235 -0
- package/docs/IA-05-VinGrade-Validation.md +339 -0
- package/docs/MVP-01.md +48 -0
- package/docs/MVP-02-Architecture.md +536 -0
- package/docs/MVP-02-CLI-HTTP-Runtime.md +50 -0
- package/docs/MVP-02-HTTP-Lifecycle.md +37 -0
- package/docs/MVP-02-Knowledge-Manifest-Generation.md +75 -0
- package/docs/MVP-02-Knowledge-Manifest.md +279 -0
- package/docs/MVP-02-Knowledge-Research-Orchestration.md +62 -0
- package/docs/MVP-02-Knowledge-Store.md +87 -0
- package/docs/MVP-02-PyPI-Registry-Adapter.md +97 -0
- package/docs/MVP-02-Research-Planning.md +196 -0
- package/docs/MVP-02-Source-Provenance.md +81 -0
- package/docs/MVP-02-npm-Registry-Adapter.md +99 -0
- package/docs/RR-01-End-to-End-and-Real-Provider-Validation.md +393 -0
- package/docs/RR-01-RERUN-Extractive-Contract-Validation.md +566 -0
- package/docs/RR-02-Full-Product-Workflow-and-Developer-CLI-UX-Review.md +35 -0
- package/docs/RR02-FIX-01-Persistent-Qualification-Resolution.md +32 -0
- package/docs/RR02-FIX-02-Stage-aware-CLI-Progress-and-Heartbeat.md +28 -0
- package/docs/RR02-FIX-03-npm-Capture-Evidence-Exclusion.md +33 -0
- package/docs/RR02-FIX-03A-Complete-Package-Exclusion-and-Evidence-Commit.md +223 -0
- package/docs/RR02-FIX-04-Event-loop-safe-Heartbeat.md +393 -0
- package/docs/RR02-FIX-05-Materialize-Persisted-Qualification.md +207 -0
- package/docs/RR02-RERUN-CLI-Qualification-Progress-UX-and-Package-Validation.md +342 -0
- package/docs/VinGrade-MVP-02-Validation.md +480 -0
- package/docs/VinGrade-RC02-Live-Validation.md +273 -0
- package/docs/ai-capability-discovery.md +573 -0
- package/docs/ai-engineering-production-readiness.md +390 -0
- package/docs/ai-engineering-review.md +251 -0
- package/docs/ai-runtime-governance-discovery.md +754 -0
- package/docs/architecture-overview.md +78 -0
- package/docs/cli-progress.md +111 -0
- package/docs/decisions/diff-01-brand-distribution-identity.md +450 -0
- package/docs/decisions/diff-02-identity-compatibility-contract.md +274 -0
- package/docs/decisions/diff-03-repository-docs-community-migration.md +165 -0
- package/docs/decisions/diff-04-release-evidence-gap-acceptance.md +110 -0
- package/docs/discovery/mvp-05-ai-migration-planning-discovery.md +350 -0
- package/docs/gateway-runtime-discovery.md +614 -0
- package/docs/live-ai-validation.md +299 -0
- package/docs/migration-planning-qualification-resolution.md +99 -0
- package/docs/migrations/upgradelens-to-depverdict.md +97 -0
- package/docs/mp-r03-deterministic-upgrade-decision-architecture.md +135 -0
- package/docs/mp-r04-evidence-bounded-migration-handoff-architecture.md +116 -0
- package/docs/mp-r05-product-completion-and-decision-first-cli-architecture.md +162 -0
- package/docs/mvp-05-deterministic-context-runtime.md +127 -0
- package/docs/mvp-05-migration-checklist-contract.md +166 -0
- package/docs/mvp-05-migration-checklist-orchestration.md +105 -0
- package/docs/mvp-05-migration-evaluation-and-qualification.md +135 -0
- package/docs/mvp-05-provider-neutral-generator.md +79 -0
- package/docs/ollama-local-smoke-validation.md +156 -0
- package/docs/openai-compatible-runtime-discovery.md +789 -0
- package/docs/openrouter-one-dependency-validation.md +205 -0
- package/docs/oss-02-package-guard-hardening-architecture.md +131 -0
- package/docs/oss-04-public-ci-package-metadata-architecture.md +142 -0
- package/docs/package-content-policy.md +98 -0
- package/docs/releases/v0.5.0-technical-preview.md +114 -0
- package/docs/releases/v0.6.0-alpha.1-depverdict-preview.md +101 -0
- package/docs/reviews/diff-02-identity-contract-compatibility.md +413 -0
- package/docs/reviews/diff-03-repository-docs-community-migration.md +364 -0
- package/docs/reviews/diff-04-depverdict-distribution-identity-readiness-rereview.md +453 -0
- package/docs/reviews/diff-04-fix-post-rename-identity-release-remediation.md +310 -0
- package/docs/reviews/diff-05-final-preview-distribution-qualification.md +561 -0
- package/docs/reviews/mvp-05-final-product-value-workflow-rereview.md +471 -0
- package/docs/reviews/mvp-05-product-workflow-review.md +605 -0
- package/docs/reviews/oss-01-duplicate-artifact-investigation-cleanup.md +411 -0
- package/docs/reviews/oss-02-package-guard-hardening.md +303 -0
- package/docs/reviews/oss-03-community-scaffolding.md +378 -0
- package/docs/reviews/oss-04-public-ci-package-metadata.md +439 -0
- package/docs/reviews/oss-05-technical-preview-qualification.md +482 -0
- package/docs/reviews/upgradelens-vs-upgradedepdetective-source-comparison.md +355 -0
- package/docs/reviews/v0.5.0-pre-release-smoke.md +263 -0
- package/docs/reviews/v0.5.0-version-bump-release-verification.md +306 -0
- package/docs/runtime-contract-discovery.md +521 -0
- package/docs/structured-output-compatibility-report.md +100 -0
- package/docs/ts-fix-01-exact-duplicate-occurrence-target-selection-architecture.md +111 -0
- package/docs/version-analysis-architecture.md +827 -0
- package/eval/README.md +86 -0
- package/eval/datasets/generic/declared-constraint.json +59 -0
- package/eval/datasets/generic/evidence-conflict.json +73 -0
- package/eval/datasets/generic/major-breaking-release.json +66 -0
- package/eval/datasets/generic/missing-evidence.json +46 -0
- package/eval/datasets/generic/patch-release-low.json +59 -0
- package/eval/datasets/node/axios-patch-low.json +59 -0
- package/eval/datasets/node/react-major-breaking.json +66 -0
- package/eval/datasets/node/react-minor-compatibility.json +66 -0
- package/eval/datasets/python/fastapi-deprecation.json +66 -0
- package/eval/datasets/python/pydantic-major-breaking.json +66 -0
- package/eval/migration-planning/golden-dataset-v2.json +306 -0
- package/eval/migration-planning/golden-dataset.json +214 -0
- package/eval/schemas/expected-result.schema.json +88 -0
- package/eval/schemas/golden-case.schema.json +181 -0
- package/package.json +57 -0
- package/schemas/ai-scorecard.schema.json +132 -0
- package/schemas/benchmark-report.schema.json +189 -0
- package/schemas/benchmark.schema.json +55 -0
- package/schemas/capability-profile.schema.json +44 -0
- package/schemas/conformance-report.schema.json +150 -0
- package/schemas/deployment-profile.schema.json +64 -0
- package/schemas/evaluation-report.schema.json +158 -0
- package/schemas/knowledge-evidence-bundle.schema.json +150 -0
- package/schemas/knowledge-manifest.schema.json +548 -0
- package/schemas/metrics.schema.json +178 -0
- package/schemas/migration-checklist-extractive-candidate.schema.json +42 -0
- package/schemas/migration-checklist.schema.json +706 -0
- package/schemas/migration-evaluation-dataset-v2.schema.json +208 -0
- package/schemas/migration-evaluation-dataset.schema.json +204 -0
- package/schemas/migration-planning-qualification-record.schema.json +234 -0
- package/schemas/project-manifest.schema.json +308 -0
- package/schemas/qualification-record.schema.json +56 -0
- package/schemas/repository-impact-evidence.schema.json +232 -0
- package/schemas/repository-impact.schema.json +202 -0
- package/schemas/upgrade-decision.schema.json +273 -0
- package/schemas/usage-index.schema.json +179 -0
- package/schemas/version-analysis.schema.json +449 -0
- package/src/ai-runtime-debug.js +325 -0
- package/src/ai-runtime-error.js +42 -0
- package/src/ai-runtime.js +174 -0
- package/src/ai-scorecard.js +204 -0
- package/src/ai-version-analysis.js +484 -0
- package/src/artifact-root-compatibility.js +91 -0
- package/src/benchmark-report.js +111 -0
- package/src/benchmark-runner.js +191 -0
- package/src/canonical-json.js +69 -0
- package/src/cli.js +1299 -0
- package/src/conformance-report.js +158 -0
- package/src/conformance-runner.js +253 -0
- package/src/constants.js +73 -0
- package/src/cooperative-scheduler.js +79 -0
- package/src/dependencies.js +44 -0
- package/src/dependency-ai-context.js +625 -0
- package/src/detectors.js +253 -0
- package/src/discovery.js +234 -0
- package/src/ecosystem-version-adapter.js +294 -0
- package/src/environment-compatibility.js +77 -0
- package/src/evaluation-comparator.js +158 -0
- package/src/evaluation-report.js +76 -0
- package/src/evaluation-runner.js +248 -0
- package/src/evidence-source-adapter.js +472 -0
- package/src/files.js +89 -0
- package/src/governance-diagnostics.js +64 -0
- package/src/governance-loader.js +63 -0
- package/src/governance-metadata.js +346 -0
- package/src/governance-validator.js +360 -0
- package/src/http/bounded-fetch.js +278 -0
- package/src/http/cli-http-runtime.js +44 -0
- package/src/impact/input-loader.js +157 -0
- package/src/impact/matcher.js +40 -0
- package/src/impact/repository-impact.js +199 -0
- package/src/impact/runtime.js +24 -0
- package/src/impact/status.js +62 -0
- package/src/impact/writer.js +30 -0
- package/src/impact-evidence/input-loader.js +202 -0
- package/src/impact-evidence/repository-impact-evidence.js +234 -0
- package/src/impact-evidence/runtime.js +16 -0
- package/src/impact-evidence/writer.js +30 -0
- package/src/index.js +563 -0
- package/src/installed-version-baseline.js +196 -0
- package/src/knowledge-cache.js +324 -0
- package/src/knowledge-evidence-bundle.js +101 -0
- package/src/knowledge-evidence-producer.js +233 -0
- package/src/knowledge-manifest-builder.js +188 -0
- package/src/knowledge-manifest-writer.js +32 -0
- package/src/knowledge-manifest.js +255 -0
- package/src/knowledge-research.js +615 -0
- package/src/metrics-engine.js +205 -0
- package/src/migration-checklist/ai-candidate.js +320 -0
- package/src/migration-checklist/assembler.js +37 -0
- package/src/migration-checklist/context-runtime.js +828 -0
- package/src/migration-checklist/evaluation/action-criteria.js +244 -0
- package/src/migration-checklist/evaluation/comparator-v2.js +332 -0
- package/src/migration-checklist/evaluation/comparator.js +279 -0
- package/src/migration-checklist/evaluation/dataset-v2.js +227 -0
- package/src/migration-checklist/evaluation/dataset.js +336 -0
- package/src/migration-checklist/evaluation/extractive-fixtures-v2.js +148 -0
- package/src/migration-checklist/evaluation/metrics-v2.js +226 -0
- package/src/migration-checklist/evaluation/metrics.js +158 -0
- package/src/migration-checklist/evaluation/qualification-v2.js +321 -0
- package/src/migration-checklist/evaluation/qualification.js +239 -0
- package/src/migration-checklist/evaluation/runner-v2.js +294 -0
- package/src/migration-checklist/evaluation/runner.js +194 -0
- package/src/migration-checklist/evaluation/scorecard-v2.js +106 -0
- package/src/migration-checklist/evaluation/scorecard.js +86 -0
- package/src/migration-checklist/extractive-candidate.js +166 -0
- package/src/migration-checklist/extractive-prompt.js +62 -0
- package/src/migration-checklist/generator.js +702 -0
- package/src/migration-checklist/grounding-policy.js +117 -0
- package/src/migration-checklist/input-loader.js +613 -0
- package/src/migration-checklist/migration-checklist.js +635 -0
- package/src/migration-checklist/presentation.js +292 -0
- package/src/migration-checklist/progress.js +96 -0
- package/src/migration-checklist/prompt.js +83 -0
- package/src/migration-checklist/qualification-guard.js +462 -0
- package/src/migration-checklist/qualification-resolution.js +122 -0
- package/src/migration-checklist/qualification-store.js +225 -0
- package/src/migration-checklist/runtime.js +205 -0
- package/src/migration-checklist/verification.js +134 -0
- package/src/migration-checklist/writer.js +35 -0
- package/src/openai-compatible-provider.js +451 -0
- package/src/orchestration/failure-log.js +32 -0
- package/src/orchestration/pipeline.js +200 -0
- package/src/orchestration/progress-events.js +337 -0
- package/src/orchestration/progress-reporter.js +131 -0
- package/src/orchestration/text-writer.js +22 -0
- package/src/portable.js +13 -0
- package/src/product-completion.js +249 -0
- package/src/project-manifest-input.js +90 -0
- package/src/project-manifest.js +141 -0
- package/src/python-requirements.js +137 -0
- package/src/registry/npm-packument.js +256 -0
- package/src/registry/npm-registry-adapter.js +262 -0
- package/src/registry/pypi-project.js +300 -0
- package/src/registry/pypi-registry-adapter.js +235 -0
- package/src/registry/sanitize-registry-body.js +51 -0
- package/src/renderers/console.js +160 -0
- package/src/renderers/impact-presentation.js +278 -0
- package/src/renderers/markdown.js +172 -0
- package/src/research-plan.js +455 -0
- package/src/runtime-conformance.js +275 -0
- package/src/source-provenance.js +393 -0
- package/src/source-url.js +62 -0
- package/src/structured-output-schema.js +66 -0
- package/src/target-selector.js +306 -0
- package/src/upgrade-decision/input-loader.js +107 -0
- package/src/upgrade-decision/presentation.js +43 -0
- package/src/upgrade-decision/runtime.js +21 -0
- package/src/upgrade-decision/upgrade-decision.js +626 -0
- package/src/upgrade-decision/writer.js +30 -0
- package/src/usage/analyzer-registry.js +63 -0
- package/src/usage/coverage.js +116 -0
- package/src/usage/input-loader.js +139 -0
- package/src/usage/js/analyzer.js +240 -0
- package/src/usage/js/parser.js +21 -0
- package/src/usage/runtime.js +187 -0
- package/src/usage/scope.js +44 -0
- package/src/usage/source-files.js +50 -0
- package/src/usage/usage-index.js +217 -0
- package/src/usage/writer.js +31 -0
- package/src/version-analysis-loader.js +203 -0
- package/src/version-analysis-manifest.js +314 -0
- package/src/version-analysis-writer.js +30 -0
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/thomasMinh1995/UpgradeLens/main/schemas/repository-impact.schema.json",
|
|
4
|
+
"title": "UpgradeLens Repository Impact",
|
|
5
|
+
"description": "Deterministic matches between Version Analysis breaking changes and repository usage symbols.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["schemaVersion", "generatedAt", "generator", "input", "analysis", "summary", "dependencies"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"schemaVersion": { "const": "1.0.0" },
|
|
11
|
+
"generatedAt": { "type": "string", "format": "date-time" },
|
|
12
|
+
"generator": { "$ref": "#/$defs/generator" },
|
|
13
|
+
"input": { "$ref": "#/$defs/input" },
|
|
14
|
+
"analysis": { "$ref": "#/$defs/analysis" },
|
|
15
|
+
"summary": { "$ref": "#/$defs/summary" },
|
|
16
|
+
"dependencies": { "type": "array", "items": { "$ref": "#/$defs/dependencyImpact" } }
|
|
17
|
+
},
|
|
18
|
+
"$defs": {
|
|
19
|
+
"digest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
20
|
+
"relativePath": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"minLength": 1,
|
|
23
|
+
"pattern": "^(?!/)(?![A-Za-z]:)(?!.*(?:^|/)\\.\\.(?:/|$))[^\\\\]+$"
|
|
24
|
+
},
|
|
25
|
+
"generator": {
|
|
26
|
+
"type": "object",
|
|
27
|
+
"additionalProperties": false,
|
|
28
|
+
"required": ["name", "version"],
|
|
29
|
+
"properties": {
|
|
30
|
+
"name": { "const": "UpgradeLens" },
|
|
31
|
+
"version": { "type": "string", "minLength": 1 }
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"projectManifest": {
|
|
35
|
+
"type": "object",
|
|
36
|
+
"additionalProperties": false,
|
|
37
|
+
"required": ["schemaVersion", "artifact", "artifactDigest", "repository"],
|
|
38
|
+
"properties": {
|
|
39
|
+
"schemaVersion": { "const": "2.0.0" },
|
|
40
|
+
"artifact": { "$ref": "#/$defs/relativePath" },
|
|
41
|
+
"artifactDigest": { "$ref": "#/$defs/digest" },
|
|
42
|
+
"repository": {
|
|
43
|
+
"type": "object",
|
|
44
|
+
"additionalProperties": false,
|
|
45
|
+
"required": ["name", "root"],
|
|
46
|
+
"properties": {
|
|
47
|
+
"name": { "type": "string", "minLength": 1 },
|
|
48
|
+
"root": { "const": "." }
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"artifactLineage": {
|
|
54
|
+
"type": "object",
|
|
55
|
+
"additionalProperties": false,
|
|
56
|
+
"required": ["schemaVersion", "artifact", "artifactDigest"],
|
|
57
|
+
"properties": {
|
|
58
|
+
"schemaVersion": { "const": "1.0.0" },
|
|
59
|
+
"artifact": { "$ref": "#/$defs/relativePath" },
|
|
60
|
+
"artifactDigest": { "$ref": "#/$defs/digest" }
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"input": {
|
|
64
|
+
"type": "object",
|
|
65
|
+
"additionalProperties": false,
|
|
66
|
+
"required": ["projectManifest", "versionAnalysis", "usageIndex"],
|
|
67
|
+
"properties": {
|
|
68
|
+
"projectManifest": { "$ref": "#/$defs/projectManifest" },
|
|
69
|
+
"versionAnalysis": { "$ref": "#/$defs/artifactLineage" },
|
|
70
|
+
"usageIndex": { "$ref": "#/$defs/artifactLineage" }
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"matcher": {
|
|
74
|
+
"type": "object",
|
|
75
|
+
"additionalProperties": false,
|
|
76
|
+
"required": ["id", "version"],
|
|
77
|
+
"properties": {
|
|
78
|
+
"id": { "type": "string", "minLength": 1 },
|
|
79
|
+
"version": { "type": "string", "minLength": 1 }
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"analysis": {
|
|
83
|
+
"type": "object",
|
|
84
|
+
"additionalProperties": false,
|
|
85
|
+
"required": ["matcher", "resultCount"],
|
|
86
|
+
"properties": {
|
|
87
|
+
"matcher": { "$ref": "#/$defs/matcher" },
|
|
88
|
+
"resultCount": { "type": "integer", "minimum": 0 }
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"summary": {
|
|
92
|
+
"type": "object",
|
|
93
|
+
"additionalProperties": false,
|
|
94
|
+
"required": ["impacted", "dependencyCount", "impactedDependencyCount", "findingCount", "impactedFindingCount", "matchCount", "affectedFileCount"],
|
|
95
|
+
"properties": {
|
|
96
|
+
"impacted": { "type": "boolean" },
|
|
97
|
+
"dependencyCount": { "type": "integer", "minimum": 0 },
|
|
98
|
+
"impactedDependencyCount": { "type": "integer", "minimum": 0 },
|
|
99
|
+
"findingCount": { "type": "integer", "minimum": 0 },
|
|
100
|
+
"impactedFindingCount": { "type": "integer", "minimum": 0 },
|
|
101
|
+
"matchCount": { "type": "integer", "minimum": 0 },
|
|
102
|
+
"affectedFileCount": { "type": "integer", "minimum": 0 },
|
|
103
|
+
"notImpactedDependencyCount": { "type": "integer", "minimum": 0 },
|
|
104
|
+
"usageNotFoundDependencyCount": { "type": "integer", "minimum": 0 },
|
|
105
|
+
"coverageUnavailableDependencyCount": { "type": "integer", "minimum": 0 },
|
|
106
|
+
"notAnalyzedDependencyCount": { "type": "integer", "minimum": 0 }
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
"impactStatus": {
|
|
110
|
+
"enum": ["IMPACTED", "NOT_IMPACTED", "USAGE_NOT_FOUND", "COVERAGE_UNAVAILABLE", "NOT_ANALYZED"]
|
|
111
|
+
},
|
|
112
|
+
"impactReasonCode": {
|
|
113
|
+
"enum": [
|
|
114
|
+
"EXACT_SYMBOL_USAGE_FOUND", "NO_EXACT_SYMBOL_USAGE_FOUND", "NO_MATCHABLE_SYMBOL_FOUND",
|
|
115
|
+
"USAGE_NOT_FOUND", "VERSION_ANALYSIS_SKIPPED", "VERSION_ANALYSIS_FAILED",
|
|
116
|
+
"COVERAGE_COMPLETE", "ANALYZER_UNAVAILABLE", "ANALYZER_AMBIGUOUS",
|
|
117
|
+
"SOURCE_SCAN_INCOMPLETE", "SOURCE_PARSE_FAILED", "FILE_UNREADABLE",
|
|
118
|
+
"ANALYZER_FAILED", "MULTIPLE_ANALYSIS_FAILURES", "COVERAGE_METADATA_MISSING"
|
|
119
|
+
]
|
|
120
|
+
},
|
|
121
|
+
"usageCoverage": {
|
|
122
|
+
"type": "object",
|
|
123
|
+
"additionalProperties": false,
|
|
124
|
+
"required": [
|
|
125
|
+
"projectId", "projectPath", "ecosystem", "status", "analyzer",
|
|
126
|
+
"scannedFileCount", "analyzedFileCount", "parseFailureCount",
|
|
127
|
+
"analyzerFailureCount", "unreadableFileCount", "scanFailureCount", "reasonCode"
|
|
128
|
+
],
|
|
129
|
+
"properties": {
|
|
130
|
+
"projectId": { "type": "string", "minLength": 1 },
|
|
131
|
+
"projectPath": { "type": ["string", "null"] },
|
|
132
|
+
"ecosystem": { "type": ["string", "null"] },
|
|
133
|
+
"status": { "enum": ["complete", "partial", "unavailable", "failed"] },
|
|
134
|
+
"analyzer": {
|
|
135
|
+
"oneOf": [
|
|
136
|
+
{
|
|
137
|
+
"type": "object",
|
|
138
|
+
"additionalProperties": false,
|
|
139
|
+
"required": ["id", "version"],
|
|
140
|
+
"properties": {
|
|
141
|
+
"id": { "type": "string", "minLength": 1 },
|
|
142
|
+
"version": { "type": "string", "minLength": 1 }
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
{ "type": "null" }
|
|
146
|
+
]
|
|
147
|
+
},
|
|
148
|
+
"scannedFileCount": { "type": "integer", "minimum": 0 },
|
|
149
|
+
"analyzedFileCount": { "type": "integer", "minimum": 0 },
|
|
150
|
+
"parseFailureCount": { "type": "integer", "minimum": 0 },
|
|
151
|
+
"analyzerFailureCount": { "type": "integer", "minimum": 0 },
|
|
152
|
+
"unreadableFileCount": { "type": "integer", "minimum": 0 },
|
|
153
|
+
"scanFailureCount": { "type": "integer", "minimum": 0 },
|
|
154
|
+
"reasonCode": { "$ref": "#/$defs/impactReasonCode" }
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
"symbolMatch": {
|
|
158
|
+
"type": "object",
|
|
159
|
+
"additionalProperties": false,
|
|
160
|
+
"required": ["symbol", "files"],
|
|
161
|
+
"properties": {
|
|
162
|
+
"symbol": { "type": "string", "minLength": 1 },
|
|
163
|
+
"files": {
|
|
164
|
+
"type": "array",
|
|
165
|
+
"minItems": 1,
|
|
166
|
+
"uniqueItems": true,
|
|
167
|
+
"items": { "$ref": "#/$defs/relativePath" }
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
"findingImpact": {
|
|
172
|
+
"type": "object",
|
|
173
|
+
"additionalProperties": false,
|
|
174
|
+
"required": ["id", "kind", "summary", "impacted", "matches"],
|
|
175
|
+
"properties": {
|
|
176
|
+
"id": { "type": "string", "minLength": 1 },
|
|
177
|
+
"kind": { "const": "breakingChange" },
|
|
178
|
+
"summary": { "type": "string", "minLength": 1 },
|
|
179
|
+
"impacted": { "type": "boolean" },
|
|
180
|
+
"status": { "$ref": "#/$defs/impactStatus" },
|
|
181
|
+
"reasonCode": { "$ref": "#/$defs/impactReasonCode" },
|
|
182
|
+
"matches": { "type": "array", "items": { "$ref": "#/$defs/symbolMatch" } }
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
"dependencyImpact": {
|
|
186
|
+
"type": "object",
|
|
187
|
+
"additionalProperties": false,
|
|
188
|
+
"required": ["analysisResultId", "projectId", "packageId", "name", "impacted", "findings"],
|
|
189
|
+
"properties": {
|
|
190
|
+
"analysisResultId": { "$ref": "#/$defs/digest" },
|
|
191
|
+
"projectId": { "type": "string", "minLength": 1 },
|
|
192
|
+
"packageId": { "type": "string", "minLength": 1 },
|
|
193
|
+
"name": { "type": "string", "minLength": 1 },
|
|
194
|
+
"impacted": { "type": "boolean" },
|
|
195
|
+
"status": { "$ref": "#/$defs/impactStatus" },
|
|
196
|
+
"reasonCode": { "$ref": "#/$defs/impactReasonCode" },
|
|
197
|
+
"coverage": { "$ref": "#/$defs/usageCoverage" },
|
|
198
|
+
"findings": { "type": "array", "items": { "$ref": "#/$defs/findingImpact" } }
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/thomasMinh1995/UpgradeLens/main/schemas/upgrade-decision.schema.json",
|
|
4
|
+
"title": "UpgradeLens Deterministic Upgrade Decision",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "generatedAt", "generator", "input", "policy", "summary", "decisions"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": { "const": "1.0.0" },
|
|
10
|
+
"generatedAt": { "type": "string", "format": "date-time" },
|
|
11
|
+
"generator": { "$ref": "#/$defs/generator" },
|
|
12
|
+
"input": { "$ref": "#/$defs/input" },
|
|
13
|
+
"policy": { "$ref": "#/$defs/policy" },
|
|
14
|
+
"summary": { "$ref": "#/$defs/summary" },
|
|
15
|
+
"decisions": { "type": "array", "items": { "$ref": "#/$defs/decisionRecord" } }
|
|
16
|
+
},
|
|
17
|
+
"$defs": {
|
|
18
|
+
"digest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
19
|
+
"nullableString": { "type": ["string", "null"] },
|
|
20
|
+
"relativePath": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"minLength": 1,
|
|
23
|
+
"pattern": "^(?!/)(?![A-Za-z]:)(?!.*(?:^|/)\\.\\.(?:/|$))[^\\\\]+$"
|
|
24
|
+
},
|
|
25
|
+
"generator": {
|
|
26
|
+
"type": "object",
|
|
27
|
+
"additionalProperties": false,
|
|
28
|
+
"required": ["name", "version"],
|
|
29
|
+
"properties": {
|
|
30
|
+
"name": { "const": "UpgradeLens" },
|
|
31
|
+
"version": { "type": "string", "minLength": 1 }
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"artifactLineage": {
|
|
35
|
+
"type": "object",
|
|
36
|
+
"additionalProperties": false,
|
|
37
|
+
"required": ["schemaVersion", "artifact", "artifactDigest"],
|
|
38
|
+
"properties": {
|
|
39
|
+
"schemaVersion": { "type": "string", "minLength": 1 },
|
|
40
|
+
"artifact": { "$ref": "#/$defs/relativePath" },
|
|
41
|
+
"artifactDigest": { "$ref": "#/$defs/digest" }
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"projectManifestLineage": {
|
|
45
|
+
"type": "object",
|
|
46
|
+
"additionalProperties": false,
|
|
47
|
+
"required": ["schemaVersion", "artifact", "artifactDigest", "repository"],
|
|
48
|
+
"properties": {
|
|
49
|
+
"schemaVersion": { "type": "string", "minLength": 1 },
|
|
50
|
+
"artifact": { "$ref": "#/$defs/relativePath" },
|
|
51
|
+
"artifactDigest": { "$ref": "#/$defs/digest" },
|
|
52
|
+
"repository": {
|
|
53
|
+
"type": "object",
|
|
54
|
+
"additionalProperties": false,
|
|
55
|
+
"required": ["name", "root"],
|
|
56
|
+
"properties": {
|
|
57
|
+
"name": { "type": "string", "minLength": 1 },
|
|
58
|
+
"root": { "const": "." }
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"knowledgeManifestLineage": {
|
|
64
|
+
"type": "object",
|
|
65
|
+
"additionalProperties": false,
|
|
66
|
+
"required": ["schemaVersion", "artifact", "artifactDigest", "researchId"],
|
|
67
|
+
"properties": {
|
|
68
|
+
"schemaVersion": { "type": "string", "minLength": 1 },
|
|
69
|
+
"artifact": { "$ref": "#/$defs/relativePath" },
|
|
70
|
+
"artifactDigest": { "$ref": "#/$defs/digest" },
|
|
71
|
+
"researchId": { "type": "string", "minLength": 1 }
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"input": {
|
|
75
|
+
"type": "object",
|
|
76
|
+
"additionalProperties": false,
|
|
77
|
+
"required": [
|
|
78
|
+
"projectManifest", "knowledgeManifest", "knowledgeEvidenceBundle",
|
|
79
|
+
"versionAnalysis", "usageIndex", "repositoryImpact", "repositoryImpactEvidence"
|
|
80
|
+
],
|
|
81
|
+
"properties": {
|
|
82
|
+
"projectManifest": { "$ref": "#/$defs/projectManifestLineage" },
|
|
83
|
+
"knowledgeManifest": { "$ref": "#/$defs/knowledgeManifestLineage" },
|
|
84
|
+
"knowledgeEvidenceBundle": { "$ref": "#/$defs/artifactLineage" },
|
|
85
|
+
"versionAnalysis": { "$ref": "#/$defs/artifactLineage" },
|
|
86
|
+
"usageIndex": { "$ref": "#/$defs/artifactLineage" },
|
|
87
|
+
"repositoryImpact": { "$ref": "#/$defs/artifactLineage" },
|
|
88
|
+
"repositoryImpactEvidence": { "$ref": "#/$defs/artifactLineage" }
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"policy": {
|
|
92
|
+
"type": "object",
|
|
93
|
+
"additionalProperties": false,
|
|
94
|
+
"required": ["id", "version", "urgencyContract"],
|
|
95
|
+
"properties": {
|
|
96
|
+
"id": { "const": "deterministic-upgrade-decision" },
|
|
97
|
+
"version": { "const": "1.1.0" },
|
|
98
|
+
"urgencyContract": { "const": "unavailable" }
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
"decisionName": {
|
|
102
|
+
"enum": [
|
|
103
|
+
"KEEP_CURRENT", "UPGRADE_NOW", "PLAN_UPGRADE", "INVESTIGATE",
|
|
104
|
+
"INSUFFICIENT_EVIDENCE", "NOT_ANALYZED"
|
|
105
|
+
]
|
|
106
|
+
},
|
|
107
|
+
"reasonCode": {
|
|
108
|
+
"enum": [
|
|
109
|
+
"ALREADY_AT_TARGET", "INSTALLED_NEWER_THAN_TARGET",
|
|
110
|
+
"TARGET_NEWER_EVIDENCE_AVAILABLE", "STRUCTURED_URGENCY",
|
|
111
|
+
"INSTALLED_VERSION_UNAVAILABLE", "TARGET_VERSION_UNAVAILABLE",
|
|
112
|
+
"EVIDENCE_INSUFFICIENT", "EVIDENCE_CONFLICT",
|
|
113
|
+
"VERSION_INCOMPARABLE", "UNSUPPORTED_ECOSYSTEM",
|
|
114
|
+
"USAGE_COVERAGE_PARTIAL", "USAGE_COVERAGE_UNAVAILABLE",
|
|
115
|
+
"VERSION_ANALYSIS_SKIPPED", "VERSION_ANALYSIS_FAILED",
|
|
116
|
+
"VERSION_ANALYSIS_MISSING", "PROVIDER_REJECTED",
|
|
117
|
+
"SOURCE_CONFLICT", "STALE_EVIDENCE", "NON_REGISTRY_DEPENDENCY",
|
|
118
|
+
"UPGRADE_AVAILABLE_NO_RECOMMENDATION_DRIVER", "USER_SELECTED_TARGET"
|
|
119
|
+
]
|
|
120
|
+
},
|
|
121
|
+
"occurrence": {
|
|
122
|
+
"type": "object",
|
|
123
|
+
"additionalProperties": false,
|
|
124
|
+
"required": [
|
|
125
|
+
"projectId", "packageId", "declaredName", "normalizedName", "ecosystem",
|
|
126
|
+
"registry", "packageManager", "dependencyType", "manifest"
|
|
127
|
+
],
|
|
128
|
+
"properties": {
|
|
129
|
+
"projectId": { "type": "string", "minLength": 1 },
|
|
130
|
+
"packageId": { "type": "string", "minLength": 1 },
|
|
131
|
+
"declaredName": { "type": "string", "minLength": 1 },
|
|
132
|
+
"normalizedName": { "type": "string", "minLength": 1 },
|
|
133
|
+
"ecosystem": { "type": "string", "minLength": 1 },
|
|
134
|
+
"registry": { "type": "string", "minLength": 1 },
|
|
135
|
+
"packageManager": { "$ref": "#/$defs/nullableString" },
|
|
136
|
+
"dependencyType": { "type": "string", "minLength": 1 },
|
|
137
|
+
"manifest": { "$ref": "#/$defs/relativePath" }
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
"adapter": {
|
|
141
|
+
"type": "object",
|
|
142
|
+
"additionalProperties": false,
|
|
143
|
+
"required": ["ecosystem", "contractVersion"],
|
|
144
|
+
"properties": {
|
|
145
|
+
"ecosystem": { "type": "string", "minLength": 1 },
|
|
146
|
+
"contractVersion": { "const": "1" }
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
"versions": {
|
|
150
|
+
"type": "object",
|
|
151
|
+
"additionalProperties": false,
|
|
152
|
+
"required": [
|
|
153
|
+
"declaredVersion", "installedVersion", "installedVersionStatus",
|
|
154
|
+
"targetVersion", "targetPolicy", "comparison", "adapter"
|
|
155
|
+
],
|
|
156
|
+
"properties": {
|
|
157
|
+
"declaredVersion": { "$ref": "#/$defs/nullableString" },
|
|
158
|
+
"installedVersion": { "$ref": "#/$defs/nullableString" },
|
|
159
|
+
"installedVersionStatus": { "enum": ["resolved", "unresolved", "legacyMissing"] },
|
|
160
|
+
"targetVersion": { "$ref": "#/$defs/nullableString" },
|
|
161
|
+
"targetPolicy": { "enum": ["explicit", "registryLatest"] },
|
|
162
|
+
"comparison": {
|
|
163
|
+
"enum": ["equal", "targetNewer", "installedNewer", "incomparable", "unknown"]
|
|
164
|
+
},
|
|
165
|
+
"adapter": { "anyOf": [{ "$ref": "#/$defs/adapter" }, { "type": "null" }] }
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
"evidenceState": {
|
|
169
|
+
"type": "object",
|
|
170
|
+
"additionalProperties": false,
|
|
171
|
+
"required": ["status", "targetScopedRefs"],
|
|
172
|
+
"properties": {
|
|
173
|
+
"status": { "enum": ["sufficient", "insufficient", "conflicted", "notEvaluated"] },
|
|
174
|
+
"targetScopedRefs": {
|
|
175
|
+
"type": "array",
|
|
176
|
+
"uniqueItems": true,
|
|
177
|
+
"items": { "$ref": "#/$defs/digest" }
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
"coverage": {
|
|
182
|
+
"type": "object",
|
|
183
|
+
"additionalProperties": false,
|
|
184
|
+
"required": ["status", "reasonCode"],
|
|
185
|
+
"properties": {
|
|
186
|
+
"status": { "enum": ["complete", "partial", "unavailable", "failed", "missing"] },
|
|
187
|
+
"reasonCode": { "$ref": "#/$defs/nullableString" }
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
"impact": {
|
|
191
|
+
"type": "object",
|
|
192
|
+
"additionalProperties": false,
|
|
193
|
+
"required": ["status", "reasonCode", "repositorySensitiveFindingCount", "coverage"],
|
|
194
|
+
"properties": {
|
|
195
|
+
"status": { "type": "string", "minLength": 1 },
|
|
196
|
+
"reasonCode": { "$ref": "#/$defs/nullableString" },
|
|
197
|
+
"repositorySensitiveFindingCount": { "type": "integer", "minimum": 0 },
|
|
198
|
+
"coverage": { "$ref": "#/$defs/coverage" }
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
"limitation": {
|
|
202
|
+
"type": "object",
|
|
203
|
+
"additionalProperties": false,
|
|
204
|
+
"required": ["code", "message"],
|
|
205
|
+
"properties": {
|
|
206
|
+
"code": { "type": "string", "minLength": 1 },
|
|
207
|
+
"message": { "type": "string", "minLength": 1 }
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
"provenance": {
|
|
211
|
+
"type": "object",
|
|
212
|
+
"additionalProperties": false,
|
|
213
|
+
"required": ["policyId", "policyVersion", "versionAdapter", "analysisResultId"],
|
|
214
|
+
"properties": {
|
|
215
|
+
"policyId": { "const": "deterministic-upgrade-decision" },
|
|
216
|
+
"policyVersion": { "const": "1.1.0" },
|
|
217
|
+
"versionAdapter": { "anyOf": [{ "$ref": "#/$defs/adapter" }, { "type": "null" }] },
|
|
218
|
+
"analysisResultId": {
|
|
219
|
+
"anyOf": [{ "$ref": "#/$defs/digest" }, { "type": "null" }]
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
},
|
|
223
|
+
"decisionRecord": {
|
|
224
|
+
"type": "object",
|
|
225
|
+
"additionalProperties": false,
|
|
226
|
+
"required": [
|
|
227
|
+
"id", "analysisResultId", "occurrence", "decision", "summary",
|
|
228
|
+
"primaryReasonCode", "reasonCodes", "versions", "evidence", "impact",
|
|
229
|
+
"requiresHumanReview", "provenance", "limitations"
|
|
230
|
+
],
|
|
231
|
+
"properties": {
|
|
232
|
+
"id": { "$ref": "#/$defs/digest" },
|
|
233
|
+
"analysisResultId": {
|
|
234
|
+
"anyOf": [{ "$ref": "#/$defs/digest" }, { "type": "null" }]
|
|
235
|
+
},
|
|
236
|
+
"occurrence": { "$ref": "#/$defs/occurrence" },
|
|
237
|
+
"decision": { "$ref": "#/$defs/decisionName" },
|
|
238
|
+
"summary": { "type": "string", "minLength": 1 },
|
|
239
|
+
"primaryReasonCode": { "$ref": "#/$defs/reasonCode" },
|
|
240
|
+
"reasonCodes": {
|
|
241
|
+
"type": "array",
|
|
242
|
+
"minItems": 1,
|
|
243
|
+
"uniqueItems": true,
|
|
244
|
+
"items": { "$ref": "#/$defs/reasonCode" }
|
|
245
|
+
},
|
|
246
|
+
"versions": { "$ref": "#/$defs/versions" },
|
|
247
|
+
"evidence": { "$ref": "#/$defs/evidenceState" },
|
|
248
|
+
"impact": { "$ref": "#/$defs/impact" },
|
|
249
|
+
"requiresHumanReview": { "type": "boolean" },
|
|
250
|
+
"provenance": { "$ref": "#/$defs/provenance" },
|
|
251
|
+
"limitations": { "type": "array", "items": { "$ref": "#/$defs/limitation" } }
|
|
252
|
+
}
|
|
253
|
+
},
|
|
254
|
+
"summary": {
|
|
255
|
+
"type": "object",
|
|
256
|
+
"additionalProperties": false,
|
|
257
|
+
"required": [
|
|
258
|
+
"dependencyCount", "KEEP_CURRENT", "UPGRADE_NOW", "PLAN_UPGRADE",
|
|
259
|
+
"INVESTIGATE", "INSUFFICIENT_EVIDENCE", "NOT_ANALYZED", "requiresHumanReviewCount"
|
|
260
|
+
],
|
|
261
|
+
"properties": {
|
|
262
|
+
"dependencyCount": { "type": "integer", "minimum": 0 },
|
|
263
|
+
"KEEP_CURRENT": { "type": "integer", "minimum": 0 },
|
|
264
|
+
"UPGRADE_NOW": { "type": "integer", "minimum": 0 },
|
|
265
|
+
"PLAN_UPGRADE": { "type": "integer", "minimum": 0 },
|
|
266
|
+
"INVESTIGATE": { "type": "integer", "minimum": 0 },
|
|
267
|
+
"INSUFFICIENT_EVIDENCE": { "type": "integer", "minimum": 0 },
|
|
268
|
+
"NOT_ANALYZED": { "type": "integer", "minimum": 0 },
|
|
269
|
+
"requiresHumanReviewCount": { "type": "integer", "minimum": 0 }
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
}
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/thomasMinh1995/UpgradeLens/main/schemas/usage-index.schema.json",
|
|
4
|
+
"title": "UpgradeLens Repository Usage Index",
|
|
5
|
+
"description": "Deterministic dependency, symbol, and file usage facts.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["schemaVersion", "generatedAt", "generator", "input", "analysis", "summary", "dependencies", "warnings"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"schemaVersion": { "const": "1.0.0" },
|
|
11
|
+
"generatedAt": { "type": "string", "format": "date-time" },
|
|
12
|
+
"generator": { "$ref": "#/$defs/generator" },
|
|
13
|
+
"input": { "$ref": "#/$defs/input" },
|
|
14
|
+
"analysis": { "$ref": "#/$defs/analysis" },
|
|
15
|
+
"summary": { "$ref": "#/$defs/summary" },
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"type": "array",
|
|
18
|
+
"items": { "$ref": "#/$defs/dependencyUsage" }
|
|
19
|
+
},
|
|
20
|
+
"warnings": {
|
|
21
|
+
"type": "array",
|
|
22
|
+
"items": { "$ref": "#/$defs/warning" }
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"$defs": {
|
|
26
|
+
"digest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
27
|
+
"relativePath": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"minLength": 1,
|
|
30
|
+
"pattern": "^(?!/)(?![A-Za-z]:)(?!.*(?:^|/)\\.\\.(?:/|$))[^\\\\]+$"
|
|
31
|
+
},
|
|
32
|
+
"generator": {
|
|
33
|
+
"type": "object",
|
|
34
|
+
"additionalProperties": false,
|
|
35
|
+
"required": ["name", "version"],
|
|
36
|
+
"properties": {
|
|
37
|
+
"name": { "const": "UpgradeLens" },
|
|
38
|
+
"version": { "type": "string", "minLength": 1 }
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"projectManifestLineage": {
|
|
42
|
+
"type": "object",
|
|
43
|
+
"additionalProperties": false,
|
|
44
|
+
"required": ["schemaVersion", "artifact", "artifactDigest", "repository"],
|
|
45
|
+
"properties": {
|
|
46
|
+
"schemaVersion": { "const": "2.0.0" },
|
|
47
|
+
"artifact": { "$ref": "#/$defs/relativePath" },
|
|
48
|
+
"artifactDigest": { "$ref": "#/$defs/digest" },
|
|
49
|
+
"repository": {
|
|
50
|
+
"type": "object",
|
|
51
|
+
"additionalProperties": false,
|
|
52
|
+
"required": ["name", "root"],
|
|
53
|
+
"properties": {
|
|
54
|
+
"name": { "type": "string", "minLength": 1 },
|
|
55
|
+
"root": { "const": "." }
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"versionAnalysisLineage": {
|
|
61
|
+
"type": "object",
|
|
62
|
+
"additionalProperties": false,
|
|
63
|
+
"required": ["schemaVersion", "artifact", "artifactDigest"],
|
|
64
|
+
"properties": {
|
|
65
|
+
"schemaVersion": { "const": "1.0.0" },
|
|
66
|
+
"artifact": { "$ref": "#/$defs/relativePath" },
|
|
67
|
+
"artifactDigest": { "$ref": "#/$defs/digest" }
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"input": {
|
|
71
|
+
"type": "object",
|
|
72
|
+
"additionalProperties": false,
|
|
73
|
+
"required": ["projectManifest", "versionAnalysis"],
|
|
74
|
+
"properties": {
|
|
75
|
+
"projectManifest": { "$ref": "#/$defs/projectManifestLineage" },
|
|
76
|
+
"versionAnalysis": { "$ref": "#/$defs/versionAnalysisLineage" }
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"analyzer": {
|
|
80
|
+
"type": "object",
|
|
81
|
+
"additionalProperties": false,
|
|
82
|
+
"required": ["id", "version"],
|
|
83
|
+
"properties": {
|
|
84
|
+
"id": { "type": "string", "minLength": 1 },
|
|
85
|
+
"version": { "type": "string", "minLength": 1 }
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
"analysis": {
|
|
89
|
+
"type": "object",
|
|
90
|
+
"additionalProperties": false,
|
|
91
|
+
"required": ["analyzers", "scannedFileCount", "analyzedFileCount"],
|
|
92
|
+
"properties": {
|
|
93
|
+
"analyzers": { "type": "array", "uniqueItems": true, "items": { "$ref": "#/$defs/analyzer" } },
|
|
94
|
+
"scannedFileCount": { "type": "integer", "minimum": 0 },
|
|
95
|
+
"analyzedFileCount": { "type": "integer", "minimum": 0 },
|
|
96
|
+
"coverage": {
|
|
97
|
+
"type": "array",
|
|
98
|
+
"items": { "$ref": "#/$defs/projectCoverage" }
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"projectCoverage": {
|
|
103
|
+
"type": "object",
|
|
104
|
+
"additionalProperties": false,
|
|
105
|
+
"required": [
|
|
106
|
+
"projectId", "projectPath", "ecosystem", "status", "analyzer",
|
|
107
|
+
"scannedFileCount", "analyzedFileCount", "parseFailureCount",
|
|
108
|
+
"analyzerFailureCount", "unreadableFileCount", "scanFailureCount", "reasonCode"
|
|
109
|
+
],
|
|
110
|
+
"properties": {
|
|
111
|
+
"projectId": { "type": "string", "minLength": 1 },
|
|
112
|
+
"projectPath": { "$ref": "#/$defs/relativePath" },
|
|
113
|
+
"ecosystem": { "type": "string", "minLength": 1 },
|
|
114
|
+
"status": { "enum": ["complete", "partial", "unavailable", "failed"] },
|
|
115
|
+
"analyzer": {
|
|
116
|
+
"oneOf": [
|
|
117
|
+
{ "$ref": "#/$defs/analyzer" },
|
|
118
|
+
{ "type": "null" }
|
|
119
|
+
]
|
|
120
|
+
},
|
|
121
|
+
"scannedFileCount": { "type": "integer", "minimum": 0 },
|
|
122
|
+
"analyzedFileCount": { "type": "integer", "minimum": 0 },
|
|
123
|
+
"parseFailureCount": { "type": "integer", "minimum": 0 },
|
|
124
|
+
"analyzerFailureCount": { "type": "integer", "minimum": 0 },
|
|
125
|
+
"unreadableFileCount": { "type": "integer", "minimum": 0 },
|
|
126
|
+
"scanFailureCount": { "type": "integer", "minimum": 0 },
|
|
127
|
+
"reasonCode": {
|
|
128
|
+
"enum": [
|
|
129
|
+
"COVERAGE_COMPLETE", "ANALYZER_UNAVAILABLE", "ANALYZER_AMBIGUOUS",
|
|
130
|
+
"SOURCE_SCAN_INCOMPLETE", "SOURCE_PARSE_FAILED", "FILE_UNREADABLE",
|
|
131
|
+
"ANALYZER_FAILED", "MULTIPLE_ANALYSIS_FAILURES"
|
|
132
|
+
]
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
"summary": {
|
|
137
|
+
"type": "object",
|
|
138
|
+
"additionalProperties": false,
|
|
139
|
+
"required": ["dependencyCount", "symbolCount", "fileCount", "warningCount"],
|
|
140
|
+
"properties": {
|
|
141
|
+
"dependencyCount": { "type": "integer", "minimum": 0 },
|
|
142
|
+
"symbolCount": { "type": "integer", "minimum": 0 },
|
|
143
|
+
"fileCount": { "type": "integer", "minimum": 0 },
|
|
144
|
+
"warningCount": { "type": "integer", "minimum": 0 }
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
"symbolUsage": {
|
|
148
|
+
"type": "object",
|
|
149
|
+
"additionalProperties": false,
|
|
150
|
+
"required": ["name", "files"],
|
|
151
|
+
"properties": {
|
|
152
|
+
"name": { "type": "string", "minLength": 1 },
|
|
153
|
+
"files": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "$ref": "#/$defs/relativePath" } }
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
"dependencyUsage": {
|
|
157
|
+
"type": "object",
|
|
158
|
+
"additionalProperties": false,
|
|
159
|
+
"required": ["projectId", "packageId", "name", "files", "symbols"],
|
|
160
|
+
"properties": {
|
|
161
|
+
"projectId": { "type": "string", "minLength": 1 },
|
|
162
|
+
"packageId": { "type": "string", "minLength": 1 },
|
|
163
|
+
"name": { "type": "string", "minLength": 1 },
|
|
164
|
+
"files": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "$ref": "#/$defs/relativePath" } },
|
|
165
|
+
"symbols": { "type": "array", "items": { "$ref": "#/$defs/symbolUsage" } }
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
"warning": {
|
|
169
|
+
"type": "object",
|
|
170
|
+
"additionalProperties": false,
|
|
171
|
+
"required": ["code", "path", "message"],
|
|
172
|
+
"properties": {
|
|
173
|
+
"code": { "type": "string", "minLength": 1 },
|
|
174
|
+
"path": { "$ref": "#/$defs/relativePath" },
|
|
175
|
+
"message": { "type": "string", "minLength": 1 }
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|