repodna-engine 1.0.1__py3-none-any.whl
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.
- repodna/__init__.py +3 -0
- repodna/__main__.py +10 -0
- repodna/advisor/__init__.py +17 -0
- repodna/advisor/engine.py +502 -0
- repodna/advisor/models.py +101 -0
- repodna/agent/__init__.py +87 -0
- repodna/agent/context.py +558 -0
- repodna/agent/deltas.py +198 -0
- repodna/agent/evidence.py +134 -0
- repodna/agent/expansion.py +447 -0
- repodna/agent/localization.py +518 -0
- repodna/agent/models.py +695 -0
- repodna/agent/patch.py +378 -0
- repodna/agent/postflight.py +278 -0
- repodna/agent/preflight.py +336 -0
- repodna/agent/ranking.py +318 -0
- repodna/agent/repo_map.py +392 -0
- repodna/agent/safety.py +111 -0
- repodna/agent/service.py +574 -0
- repodna/agent/sessions.py +264 -0
- repodna/agent/task.py +660 -0
- repodna/agent/telemetry.py +101 -0
- repodna/agent/token_budget.py +231 -0
- repodna/api/__init__.py +1 -0
- repodna/api/agent_routes.py +248 -0
- repodna/api/app.py +2904 -0
- repodna/benchmarks/__init__.py +29 -0
- repodna/benchmarks/baselines.py +126 -0
- repodna/benchmarks/budget_bench.py +162 -0
- repodna/benchmarks/engine.py +418 -0
- repodna/benchmarks/evaluator.py +310 -0
- repodna/benchmarks/metrics.py +206 -0
- repodna/benchmarks/models.py +194 -0
- repodna/benchmarks/scalability.py +166 -0
- repodna/brain/__init__.py +46 -0
- repodna/brain/evidence.py +276 -0
- repodna/brain/extractor.py +1207 -0
- repodna/brain/indexer.py +766 -0
- repodna/brain/models.py +275 -0
- repodna/brain/multilang_extractors.py +889 -0
- repodna/brain/retrieval.py +469 -0
- repodna/brain/tracer.py +203 -0
- repodna/cli/__init__.py +1 -0
- repodna/cli/__main__.py +10 -0
- repodna/cli/agent_cmd.py +228 -0
- repodna/cli/installer.py +590 -0
- repodna/cli/main.py +2173 -0
- repodna/cli/plugin_cmd.py +130 -0
- repodna/cli/workspace_cmd.py +211 -0
- repodna/context/__init__.py +9 -0
- repodna/context/builder.py +379 -0
- repodna/context/models.py +133 -0
- repodna/contract/__init__.py +39 -0
- repodna/contract/evaluator.py +318 -0
- repodna/contract/loader.py +260 -0
- repodna/contract/models.py +185 -0
- repodna/core/__init__.py +1 -0
- repodna/core/analyzer.py +1424 -0
- repodna/diff/__init__.py +35 -0
- repodna/diff/engine.py +332 -0
- repodna/diff/models.py +117 -0
- repodna/diff/snapshot.py +248 -0
- repodna/ecosystem/__init__.py +27 -0
- repodna/ecosystem/contracts.py +129 -0
- repodna/ecosystem/doctor.py +253 -0
- repodna/git_insights/__init__.py +1 -0
- repodna/git_insights/analyzer.py +273 -0
- repodna/graph/__init__.py +1 -0
- repodna/graph/engine.py +562 -0
- repodna/guardian/__init__.py +17 -0
- repodna/guardian/engine.py +369 -0
- repodna/guardian/models.py +104 -0
- repodna/history/__init__.py +40 -0
- repodna/history/cache.py +240 -0
- repodna/history/diff.py +394 -0
- repodna/history/engine.py +557 -0
- repodna/history/evidence.py +160 -0
- repodna/history/models.py +258 -0
- repodna/history/timeline.py +164 -0
- repodna/intelligence/__init__.py +33 -0
- repodna/intelligence/models.py +165 -0
- repodna/intelligence/service.py +570 -0
- repodna/live/__init__.py +94 -0
- repodna/live/alerts.py +443 -0
- repodna/live/coordinator.py +351 -0
- repodna/live/diff.py +444 -0
- repodna/live/events.py +471 -0
- repodna/live/filtering.py +329 -0
- repodna/live/history.py +637 -0
- repodna/live/models.py +505 -0
- repodna/live/observer.py +653 -0
- repodna/live/reconciliation.py +253 -0
- repodna/live/session.py +1547 -0
- repodna/mcp/__init__.py +5 -0
- repodna/mcp/__main__.py +6 -0
- repodna/mcp/agent_tools.py +258 -0
- repodna/mcp/server.py +3283 -0
- repodna/mcp/workspace_tools.py +200 -0
- repodna/parsers/__init__.py +13 -0
- repodna/parsers/base.py +126 -0
- repodna/parsers/capabilities.py +361 -0
- repodna/parsers/project_metadata.py +232 -0
- repodna/parsers/resolver.py +621 -0
- repodna/parsers/treesitter_parser.py +830 -0
- repodna/passport/__init__.py +64 -0
- repodna/passport/generator.py +546 -0
- repodna/passport/migrator.py +139 -0
- repodna/passport/models.py +224 -0
- repodna/passport/validator.py +143 -0
- repodna/performance/__init__.py +89 -0
- repodna/performance/cache.py +1584 -0
- repodna/performance/identity.py +341 -0
- repodna/performance/incremental.py +317 -0
- repodna/performance/models.py +157 -0
- repodna/performance/parallel.py +291 -0
- repodna/plugins/__init__.py +47 -0
- repodna/plugins/evaluator.py +334 -0
- repodna/plugins/models.py +113 -0
- repodna/plugins/validator.py +256 -0
- repodna/quality/__init__.py +91 -0
- repodna/quality/complexity.py +352 -0
- repodna/quality/config.py +159 -0
- repodna/quality/debt.py +73 -0
- repodna/quality/duplicates.py +330 -0
- repodna/quality/engine.py +282 -0
- repodna/quality/impact.py +198 -0
- repodna/quality/models.py +427 -0
- repodna/quality/rules.py +364 -0
- repodna/quality/sarif.py +107 -0
- repodna/quality/security_signals.py +278 -0
- repodna/quality/test_mapping.py +271 -0
- repodna/quality/unused.py +201 -0
- repodna/reports/__init__.py +1 -0
- repodna/reports/exporter.py +374 -0
- repodna/rules/__init__.py +1 -0
- repodna/rules/health.py +436 -0
- repodna/schemas/__init__.py +1 -0
- repodna/schemas/models.py +348 -0
- repodna/security/__init__.py +1 -0
- repodna/security/safe_yaml.py +81 -0
- repodna/security/validators.py +583 -0
- repodna/skills/__init__.py +0 -0
- repodna/skills/repodna/SKILL.md +59 -0
- repodna/skills/repodna/__init__.py +0 -0
- repodna/skills/repodna/examples/workflows.md +85 -0
- repodna/skills/repodna/references/architecture-rules.md +26 -0
- repodna/storage/__init__.py +1 -0
- repodna/storage/workspace.py +199 -0
- repodna/webui/__init__.py +1 -0
- repodna/webui/assets/DependencyGraph-km_Qo-nG.js +43 -0
- repodna/webui/assets/HealthReportView-WVL39aNO.js +1 -0
- repodna/webui/assets/index-ByZ5e5pe.js +506 -0
- repodna/webui/assets/index-CDj3e8hw.css +1 -0
- repodna/webui/index.html +21 -0
- repodna/workspace/__init__.py +131 -0
- repodna/workspace/compatibility.py +317 -0
- repodna/workspace/context.py +175 -0
- repodna/workspace/contracts.py +369 -0
- repodna/workspace/federation.py +411 -0
- repodna/workspace/identity.py +202 -0
- repodna/workspace/impact.py +111 -0
- repodna/workspace/manifest.py +266 -0
- repodna/workspace/models.py +461 -0
- repodna/workspace/packages.py +494 -0
- repodna/workspace/policies.py +142 -0
- repodna/workspace/services.py +238 -0
- repodna/workspace/topology.py +316 -0
- repodna_engine-1.0.1.dist-info/METADATA +129 -0
- repodna_engine-1.0.1.dist-info/RECORD +173 -0
- repodna_engine-1.0.1.dist-info/WHEEL +5 -0
- repodna_engine-1.0.1.dist-info/entry_points.txt +2 -0
- repodna_engine-1.0.1.dist-info/licenses/LICENSE +21 -0
- repodna_engine-1.0.1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
"""Typed Pydantic v2 schemas for RepoDNA AI Repository Intelligence."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from datetime import datetime
|
|
6
|
+
from typing import Any
|
|
7
|
+
|
|
8
|
+
from pydantic import BaseModel, Field
|
|
9
|
+
|
|
10
|
+
from repodna.schemas.models import LanguageSupportLevel, RuleFinding, SeverityLevel, SymbolItem
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class ModuleOverviewItem(BaseModel):
|
|
14
|
+
id: str
|
|
15
|
+
name: str
|
|
16
|
+
directory: str
|
|
17
|
+
language: str
|
|
18
|
+
support_level: LanguageSupportLevel
|
|
19
|
+
lines_code: int
|
|
20
|
+
fan_in: int
|
|
21
|
+
fan_out: int
|
|
22
|
+
instability: float
|
|
23
|
+
in_cycle: bool
|
|
24
|
+
is_hub: bool
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class RepositoryOverview(BaseModel):
|
|
28
|
+
repo_name: str
|
|
29
|
+
target_display: str
|
|
30
|
+
analyzed_at: datetime
|
|
31
|
+
analysis_version: str = "0.3.0"
|
|
32
|
+
total_files: int
|
|
33
|
+
total_lines_code: int
|
|
34
|
+
total_size_bytes: int
|
|
35
|
+
health_score: float | None = None
|
|
36
|
+
health_grade: str
|
|
37
|
+
health_status: str
|
|
38
|
+
confidence: str
|
|
39
|
+
ast_loc_coverage_pct: float
|
|
40
|
+
ast_file_coverage_pct: float
|
|
41
|
+
cycle_count: int
|
|
42
|
+
cyclic_scc_count: int
|
|
43
|
+
hub_modules_count: int
|
|
44
|
+
primary_languages: list[str]
|
|
45
|
+
unverified_rules: list[str]
|
|
46
|
+
key_architectural_hubs: list[str]
|
|
47
|
+
summary_text: str
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
class PackageCluster(BaseModel):
|
|
51
|
+
name: str
|
|
52
|
+
file_count: int
|
|
53
|
+
files: list[str]
|
|
54
|
+
external_dependencies: list[str] = Field(default_factory=list)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
class ArchitectureMap(BaseModel):
|
|
58
|
+
level: str # "overview", "clusters", "full"
|
|
59
|
+
total_modules: int
|
|
60
|
+
total_clusters: int
|
|
61
|
+
clusters: list[PackageCluster]
|
|
62
|
+
inter_cluster_edges: list[dict[str, Any]] = Field(default_factory=list)
|
|
63
|
+
summary_text: str
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
class RelevantModuleMatch(BaseModel):
|
|
67
|
+
file_id: str
|
|
68
|
+
language: str
|
|
69
|
+
support_level: LanguageSupportLevel
|
|
70
|
+
relevance_score: float
|
|
71
|
+
match_reasons: list[str]
|
|
72
|
+
matching_symbols: list[SymbolItem] = Field(default_factory=list)
|
|
73
|
+
fan_in: int = 0
|
|
74
|
+
fan_out: int = 0
|
|
75
|
+
in_cycle: bool = False
|
|
76
|
+
is_hub: bool = False
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
class RelevantModulesResponse(BaseModel):
|
|
80
|
+
query: str
|
|
81
|
+
total_matches: int
|
|
82
|
+
matches: list[RelevantModuleMatch]
|
|
83
|
+
summary_text: str
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
class ModuleDetails(BaseModel):
|
|
87
|
+
file_id: str
|
|
88
|
+
name: str
|
|
89
|
+
directory: str
|
|
90
|
+
language: str
|
|
91
|
+
support_level: LanguageSupportLevel
|
|
92
|
+
size_bytes: int
|
|
93
|
+
lines_total: int
|
|
94
|
+
lines_code: int
|
|
95
|
+
lines_comment: int
|
|
96
|
+
fan_in: int
|
|
97
|
+
fan_out: int
|
|
98
|
+
instability: float
|
|
99
|
+
in_cycle: bool
|
|
100
|
+
cycle_ids: list[str] = Field(default_factory=list)
|
|
101
|
+
is_hub: bool
|
|
102
|
+
is_orphan: bool
|
|
103
|
+
symbols: list[SymbolItem] = Field(default_factory=list)
|
|
104
|
+
dependencies_internal: list[str] = Field(default_factory=list)
|
|
105
|
+
dependents_internal: list[str] = Field(default_factory=list)
|
|
106
|
+
external_packages: list[str] = Field(default_factory=list)
|
|
107
|
+
health_findings: list[RuleFinding] = Field(default_factory=list)
|
|
108
|
+
secret_warnings: list[str] = Field(default_factory=list)
|
|
109
|
+
analysis_limitations: list[str] = Field(default_factory=list)
|
|
110
|
+
summary_text: str
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
class DependencyTraceItem(BaseModel):
|
|
114
|
+
source: str
|
|
115
|
+
target: str
|
|
116
|
+
import_names: list[str] = Field(default_factory=list)
|
|
117
|
+
line: int = 1
|
|
118
|
+
depth: int = 1
|
|
119
|
+
in_cycle: bool = False
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
class DependencyQueryResponse(BaseModel):
|
|
123
|
+
root_file: str
|
|
124
|
+
direction: str # "outgoing", "incoming", "both"
|
|
125
|
+
depth: int
|
|
126
|
+
total_items: int
|
|
127
|
+
items: list[DependencyTraceItem]
|
|
128
|
+
summary_text: str
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
class ArchitectureFindingsResponse(BaseModel):
|
|
132
|
+
total_findings: int
|
|
133
|
+
critical_count: int
|
|
134
|
+
warning_count: int
|
|
135
|
+
info_count: int
|
|
136
|
+
findings: list[RuleFinding]
|
|
137
|
+
unverified_rules: list[str]
|
|
138
|
+
summary_text: str
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
class AnalysisCoverageReport(BaseModel):
|
|
142
|
+
confidence: str
|
|
143
|
+
confidence_reason: str
|
|
144
|
+
ast_file_coverage_pct: float
|
|
145
|
+
ast_loc_coverage_pct: float
|
|
146
|
+
supported_languages: list[str]
|
|
147
|
+
partial_static_languages: list[str]
|
|
148
|
+
partial_static_files_count: int
|
|
149
|
+
unsupported_languages: list[str]
|
|
150
|
+
unsupported_files_count: int
|
|
151
|
+
skipped_files_count: int
|
|
152
|
+
unverified_rules: list[str]
|
|
153
|
+
honest_coverage_guarantee: str
|
|
154
|
+
summary_text: str
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
class ChangeImpactResponse(BaseModel):
|
|
158
|
+
target_files: list[str]
|
|
159
|
+
direct_dependents: list[str]
|
|
160
|
+
transitive_dependents: list[str]
|
|
161
|
+
impacted_cycles: list[str]
|
|
162
|
+
impact_severity: SeverityLevel
|
|
163
|
+
risk_factors: list[str]
|
|
164
|
+
affected_hubs: list[str]
|
|
165
|
+
summary_text: str
|