sourcecode 1.44.0__py3-none-any.whl → 1.45.0__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.
- sourcecode/__init__.py +1 -1
- sourcecode/cli.py +57 -2
- sourcecode/mcp/orchestrator.py +23 -0
- sourcecode/validation_surface.py +15 -0
- {sourcecode-1.44.0.dist-info → sourcecode-1.45.0.dist-info}/METADATA +2 -2
- {sourcecode-1.44.0.dist-info → sourcecode-1.45.0.dist-info}/RECORD +9 -9
- {sourcecode-1.44.0.dist-info → sourcecode-1.45.0.dist-info}/WHEEL +0 -0
- {sourcecode-1.44.0.dist-info → sourcecode-1.45.0.dist-info}/entry_points.txt +0 -0
- {sourcecode-1.44.0.dist-info → sourcecode-1.45.0.dist-info}/licenses/LICENSE +0 -0
sourcecode/__init__.py
CHANGED
sourcecode/cli.py
CHANGED
|
@@ -3685,6 +3685,10 @@ def impact_cmd(
|
|
|
3685
3685
|
"-c",
|
|
3686
3686
|
help="Copy output to system clipboard after a successful run. No-op when --output is used or clipboard is unavailable.",
|
|
3687
3687
|
),
|
|
3688
|
+
no_cache: bool = typer.Option(
|
|
3689
|
+
False, "--no-cache",
|
|
3690
|
+
help="Accepted for compatibility; this command always reads fresh source (no snapshot cache). No-op.",
|
|
3691
|
+
),
|
|
3688
3692
|
) -> None:
|
|
3689
3693
|
"""Blast-radius analysis: who calls this class and what breaks if it changes?
|
|
3690
3694
|
|
|
@@ -3836,6 +3840,10 @@ def endpoints_cmd(
|
|
|
3836
3840
|
None, "--limit", "-n",
|
|
3837
3841
|
help="Maximum number of endpoints to return.",
|
|
3838
3842
|
),
|
|
3843
|
+
no_cache: bool = typer.Option(
|
|
3844
|
+
False, "--no-cache",
|
|
3845
|
+
help="Accepted for compatibility; this command always reads fresh source (no snapshot cache). No-op.",
|
|
3846
|
+
),
|
|
3839
3847
|
) -> None:
|
|
3840
3848
|
"""Extract REST API endpoint surface from Java source files.
|
|
3841
3849
|
|
|
@@ -3899,13 +3907,26 @@ def endpoints_cmd(
|
|
|
3899
3907
|
if limit is not None and limit > 0:
|
|
3900
3908
|
endpoints_list = endpoints_list[:limit]
|
|
3901
3909
|
if path_prefix or controller or limit is not None:
|
|
3910
|
+
# Preserve the repo-wide aggregates before overwriting them with the
|
|
3911
|
+
# filtered counts, so a --limit/--filter request stays internally
|
|
3912
|
+
# coherent (total must match the security counters it is reported with).
|
|
3913
|
+
_no_sec_before = data.get("no_security_signal")
|
|
3914
|
+
_undoc_before = data.get("undocumented")
|
|
3915
|
+
_no_sec_after = sum(
|
|
3916
|
+
1 for e in endpoints_list
|
|
3917
|
+
if e.get("security", {}).get("policy") == "none_detected"
|
|
3918
|
+
)
|
|
3902
3919
|
data["endpoints"] = endpoints_list
|
|
3903
3920
|
data["total"] = len(endpoints_list)
|
|
3921
|
+
data["no_security_signal"] = _no_sec_after
|
|
3922
|
+
data["undocumented"] = _no_sec_after
|
|
3904
3923
|
data["_filter"] = {
|
|
3905
3924
|
"path_prefix": path_prefix,
|
|
3906
3925
|
"controller": controller,
|
|
3907
3926
|
"limit": limit,
|
|
3908
3927
|
"total_before_filter": _total_before,
|
|
3928
|
+
"no_security_signal_before_filter": _no_sec_before,
|
|
3929
|
+
"undocumented_before_filter": _undoc_before,
|
|
3909
3930
|
}
|
|
3910
3931
|
|
|
3911
3932
|
output = _serialize_dict(data, format)
|
|
@@ -3948,6 +3969,10 @@ def validation_cmd(
|
|
|
3948
3969
|
False, "--gaps-only",
|
|
3949
3970
|
help="Report only endpoints/fields with no declared validation (the gaps section).",
|
|
3950
3971
|
),
|
|
3972
|
+
no_cache: bool = typer.Option(
|
|
3973
|
+
False, "--no-cache",
|
|
3974
|
+
help="Accepted for compatibility; this command always reads fresh source (no snapshot cache). No-op.",
|
|
3975
|
+
),
|
|
3951
3976
|
) -> None:
|
|
3952
3977
|
"""Map request-body validation per endpoint (constraints + custom validators).
|
|
3953
3978
|
|
|
@@ -3997,14 +4022,21 @@ def validation_cmd(
|
|
|
3997
4022
|
g for g in data.get("gaps", [])
|
|
3998
4023
|
if str(g.get("path", "")).startswith(path_prefix)
|
|
3999
4024
|
]
|
|
4025
|
+
_note = data.get("note")
|
|
4000
4026
|
if gaps_only:
|
|
4001
4027
|
data = {
|
|
4002
4028
|
"gaps": data.get("gaps", []),
|
|
4003
4029
|
"summary": data.get("summary", {}),
|
|
4004
4030
|
}
|
|
4031
|
+
if _note:
|
|
4032
|
+
data["note"] = _note
|
|
4005
4033
|
|
|
4006
4034
|
output = _serialize_dict(data, format)
|
|
4007
4035
|
_summary = data.get("summary", {})
|
|
4036
|
+
# Human-facing heads-up when the result is empty purely because no OpenAPI
|
|
4037
|
+
# spec was found — otherwise the all-zero JSON reads as a false negative.
|
|
4038
|
+
if _note:
|
|
4039
|
+
typer.echo(f"Note: {_note}", err=True)
|
|
4008
4040
|
_emit_command_output(
|
|
4009
4041
|
output, output_path, copy,
|
|
4010
4042
|
success_msg=f"Validation surface written to {output_path} "
|
|
@@ -4133,6 +4165,10 @@ def spring_audit_cmd(
|
|
|
4133
4165
|
"--ci/--no-ci",
|
|
4134
4166
|
help="Exit with code 1 if any findings at or above --min-severity are found. For CI/CD gates.",
|
|
4135
4167
|
),
|
|
4168
|
+
no_cache: bool = typer.Option(
|
|
4169
|
+
False, "--no-cache",
|
|
4170
|
+
help="Accepted for compatibility; this command always reads fresh source (no snapshot cache). No-op.",
|
|
4171
|
+
),
|
|
4136
4172
|
) -> None:
|
|
4137
4173
|
"""Spring semantic audit: TX anomalies (TX-001..005) + security surface (SEC-001..003).
|
|
4138
4174
|
|
|
@@ -4315,6 +4351,10 @@ def migrate_check_cmd(
|
|
|
4315
4351
|
help="Minimum severity to include: critical, high, medium, or low (default).",
|
|
4316
4352
|
show_default=True,
|
|
4317
4353
|
),
|
|
4354
|
+
no_cache: bool = typer.Option(
|
|
4355
|
+
False, "--no-cache",
|
|
4356
|
+
help="Accepted for compatibility; this command always reads fresh source (no snapshot cache). No-op.",
|
|
4357
|
+
),
|
|
4318
4358
|
) -> None:
|
|
4319
4359
|
"""Spring Boot 2→3 migration readiness: detect javax→jakarta namespace blockers.
|
|
4320
4360
|
|
|
@@ -4423,6 +4463,10 @@ def impact_chain_cmd(
|
|
|
4423
4463
|
help="Query type: impact (default) or events.",
|
|
4424
4464
|
show_default=True,
|
|
4425
4465
|
),
|
|
4466
|
+
no_cache: bool = typer.Option(
|
|
4467
|
+
False, "--no-cache",
|
|
4468
|
+
help="Accepted for compatibility; this command always reads fresh source (no snapshot cache). No-op.",
|
|
4469
|
+
),
|
|
4426
4470
|
) -> None:
|
|
4427
4471
|
"""Spring impact-chain: systemic blast radius of a symbol with TX/SEC enrichment.
|
|
4428
4472
|
|
|
@@ -6135,8 +6179,19 @@ def cache_clear_cmd(
|
|
|
6135
6179
|
_clear_ris = include_ris or all_
|
|
6136
6180
|
if not yes:
|
|
6137
6181
|
_ris_note = " (including RIS)" if _clear_ris else " (RIS preserved — use --all to also clear it)"
|
|
6138
|
-
|
|
6139
|
-
|
|
6182
|
+
# P1: never block on stdin in a non-interactive context (CI, MCP, pipes).
|
|
6183
|
+
# The interactive prompt is only meaningful on a TTY; elsewhere it would
|
|
6184
|
+
# hang indefinitely waiting for input. Treat non-interactive as confirmed
|
|
6185
|
+
# (clear is idempotent cleanup; RIS is preserved unless --all is passed).
|
|
6186
|
+
if sys.stdin.isatty():
|
|
6187
|
+
import click as _click
|
|
6188
|
+
_click.confirm(f"Delete all cache files for {target}{_ris_note}?", abort=True, err=True)
|
|
6189
|
+
else:
|
|
6190
|
+
typer.echo(
|
|
6191
|
+
f"Non-interactive: clearing cache for {target}{_ris_note}. "
|
|
6192
|
+
"Pass --yes to silence this notice.",
|
|
6193
|
+
err=True,
|
|
6194
|
+
)
|
|
6140
6195
|
removed = _cm.clear(target, clear_ris=_clear_ris)
|
|
6141
6196
|
typer.echo(f"Removed {removed} file(s).", err=True)
|
|
6142
6197
|
|
sourcecode/mcp/orchestrator.py
CHANGED
|
@@ -6,6 +6,29 @@ Converts the MCP from a flat tool collection into a guided agent operating syste
|
|
|
6
6
|
- run_pr_review_flow: auto-chains delta + review_pr + blast radius
|
|
7
7
|
- run_bug_investigation_flow: auto-chains fix_bug + impact + IR context
|
|
8
8
|
- run_feature_flow: auto-chains context + endpoints + delta + structural awareness
|
|
9
|
+
|
|
10
|
+
TODO — planned high-value Java/Spring flow presets (audit 2026-06-16, repo SAINT):
|
|
11
|
+
These extend the existing orchestrator; they are NOT yet implemented.
|
|
12
|
+
|
|
13
|
+
1. TODO: implement later — run_migrate_flow
|
|
14
|
+
Preset wrapping `migrate-check`. Primary high-value entry point for
|
|
15
|
+
Spring Boot 2→3 planning (audit: produces 1,356-file prioritized
|
|
16
|
+
inventory in ~6s — the strongest determinante win). Should surface
|
|
17
|
+
readiness_score, blocking count, per-target breakdown (jakarta /
|
|
18
|
+
spring_security_6 / java_11) and estimated_effort_days.
|
|
19
|
+
|
|
20
|
+
2. TODO: implement later — run_security_audit_flow
|
|
21
|
+
Preset wrapping `spring-audit` + `endpoints`. Auto-handle the
|
|
22
|
+
config-less case: when no sourcecode.config.json is present and the
|
|
23
|
+
repo carries custom security annotations, emit a fallback WARNING +
|
|
24
|
+
hint to add sourcecode.config.json (customAnnotations) rather than
|
|
25
|
+
returning a misleading 100% none_detected result.
|
|
26
|
+
|
|
27
|
+
3. TODO: implement later — extend R2 orchestration rule (apply_orchestration_rules)
|
|
28
|
+
Inject preset (1)/(2) when detected intent maps to migration or
|
|
29
|
+
security audit, mirroring the existing R2 java_no_endpoints rule.
|
|
30
|
+
Requires new INTENT_MIGRATION / INTENT_SECURITY_AUDIT constants +
|
|
31
|
+
_INTENT_PATTERNS entries + WORKFLOW_SEQUENCES / FLOW_RUNNERS wiring.
|
|
9
32
|
"""
|
|
10
33
|
from __future__ import annotations
|
|
11
34
|
|
sourcecode/validation_surface.py
CHANGED
|
@@ -302,4 +302,19 @@ def build_validation_surface(
|
|
|
302
302
|
spec_path = endpoints_data.get("openapi_spec")
|
|
303
303
|
if spec_path:
|
|
304
304
|
result["openapi_spec"] = spec_path
|
|
305
|
+
else:
|
|
306
|
+
# No OpenAPI spec on disk / under target/generated-sources. Declarative
|
|
307
|
+
# DTO constraints cannot be recovered, so a sea of zeros here is expected
|
|
308
|
+
# and NOT a sign the repo lacks validation — it just isn't OpenAPI-driven.
|
|
309
|
+
# Surface this explicitly so the result is not silently misread as
|
|
310
|
+
# "no validation anywhere".
|
|
311
|
+
result["openapi_spec"] = None
|
|
312
|
+
result["note"] = (
|
|
313
|
+
"No OpenAPI spec found (no spec on disk or under "
|
|
314
|
+
"target/generated-sources). Declarative DTO constraints cannot be "
|
|
315
|
+
"recovered; only source-declared custom validators are reported. "
|
|
316
|
+
"Body-endpoint and validated-field counts will read zero unless an "
|
|
317
|
+
"OpenAPI spec is present — this is expected, not a missing-validation "
|
|
318
|
+
"finding."
|
|
319
|
+
)
|
|
305
320
|
return result
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sourcecode
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.45.0
|
|
4
4
|
Summary: Persistent structural context and ultra-fast repeated analysis for AI coding agents
|
|
5
5
|
License-File: LICENSE
|
|
6
6
|
Keywords: agents,ai,codebase,context,developer-tools,llm
|
|
@@ -40,7 +40,7 @@ Description-Content-Type: text/markdown
|
|
|
40
40
|
|
|
41
41
|
**Persistent structural context and ultra-fast repeated analysis for AI coding agents.**
|
|
42
42
|
|
|
43
|
-

|
|
44
44
|

|
|
45
45
|
|
|
46
46
|
---
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
sourcecode/__init__.py,sha256=
|
|
1
|
+
sourcecode/__init__.py,sha256=r64WSv9Pulq3yQh1i31dLAG4Q5FJDkTYFw7e54HHTsc,103
|
|
2
2
|
sourcecode/adaptive_scanner.py,sha256=XffluXKzJUXrMtjEiAOnSNPZnztdIcts17T9ouHeID0,10521
|
|
3
3
|
sourcecode/architecture_analyzer.py,sha256=liCwQmLgb5vplohy8arjYxs_HOIv5C9MjLh_gY6bc5Q,44115
|
|
4
4
|
sourcecode/architecture_summary.py,sha256=z34_6v7cSwy98cof2UVciGho7SCrZ93tiqMmq5WNzRQ,20405
|
|
@@ -7,7 +7,7 @@ sourcecode/cache.py,sha256=1V3vsaODAa2UBJAC0xpvxpmRdriCezQx5Q8JCcfgziE,31892
|
|
|
7
7
|
sourcecode/canonical_ir.py,sha256=DEwucOPJguLsVtg5cV8mWXNi112l5jmBhv73KGGebVk,24849
|
|
8
8
|
sourcecode/cir_graphs.py,sha256=9G0HHj1kw2325IDyzo2OpX73BNswEckecf4MZUXB4JM,12078
|
|
9
9
|
sourcecode/classifier.py,sha256=hKzg-nQ47htqqIUzSGvYxv15cXrA3KgICTwJmdqal0o,8095
|
|
10
|
-
sourcecode/cli.py,sha256=
|
|
10
|
+
sourcecode/cli.py,sha256=ne0Ok-IYVn5-_sg4XLm5CS6jn58z78RezFbc9DOdOFE,257430
|
|
11
11
|
sourcecode/code_notes_analyzer.py,sha256=EJemNCNc9Dn-1RZYu-aNbK0ELzmsyC4s6FdHi3XyNEI,9392
|
|
12
12
|
sourcecode/confidence_analyzer.py,sha256=_jckZSxksV-OU38vbkxfVNBnWCtlCq8Vwfg23x1uspA,19054
|
|
13
13
|
sourcecode/context_scorer.py,sha256=QpChSpsmaAYz91rXA4Ue5xzQmNz_ZboZN09YOHScq1U,14679
|
|
@@ -61,7 +61,7 @@ sourcecode/spring_semantic.py,sha256=O1nKSGVzlukuxLHQVuCPxc-XrcrMFxwlHA20_dmEGgM
|
|
|
61
61
|
sourcecode/spring_tx_analyzer.py,sha256=FdFcyqPp3aT9oJ-PKrnXcTA6s69wdvzG-NBm0GMGPTU,30717
|
|
62
62
|
sourcecode/summarizer.py,sha256=zgdps7yS2IktAbWe7IWz0oUcr3QIuNPRGrsScbZ4R1g,21797
|
|
63
63
|
sourcecode/tree_utils.py,sha256=8GAkIfQAsvtEudIeW1l4ooH_oRtrWR8cpJQJsEa_Pfw,2093
|
|
64
|
-
sourcecode/validation_surface.py,sha256=
|
|
64
|
+
sourcecode/validation_surface.py,sha256=_HiKeUuN8wk8V2pWp1TRcwB_BwxsxyFWTqzCKGx1B8M,12747
|
|
65
65
|
sourcecode/version_check.py,sha256=CHp6ZxTIfo8kyHPCBgJA1uFC0xQCoXMuuOfrW8QTL8o,4942
|
|
66
66
|
sourcecode/workspace.py,sha256=X_6NmNnitvT3_38V-JDChydo_sR68s249hLFlrQskU0,8271
|
|
67
67
|
sourcecode/detectors/__init__.py,sha256=A0AACJFF6HWf_RgatNtWu3PUzstcKtIGM9f1PoFcJug,1987
|
|
@@ -86,7 +86,7 @@ sourcecode/detectors/systems.py,sha256=nYaKbGDFu0EOXFcd_1doWFT3tTUdkbxc2DjHUF5Tc
|
|
|
86
86
|
sourcecode/detectors/terraform.py,sha256=cxORPR_zVLOJpHlh4e9JnFpkQsn_UnqMMom5yG65hZ4,1693
|
|
87
87
|
sourcecode/detectors/tooling.py,sha256=8CKbtxwQoABP-WyBRNmdAmHDOvAH57AR1cF4UKuWEdQ,2074
|
|
88
88
|
sourcecode/mcp/__init__.py,sha256=XU4HfRGbdid8wdUA0x_4f7uKZD1z3mv_XUY_WU_T9Mw,179
|
|
89
|
-
sourcecode/mcp/orchestrator.py,sha256=
|
|
89
|
+
sourcecode/mcp/orchestrator.py,sha256=luOglUaKPaMnsq9j3XI3D-P68ABURYpiP1fojK5LDi4,28177
|
|
90
90
|
sourcecode/mcp/registry.py,sha256=8LxxalpJy1L_BrEfwiVfywFVOcJJMXLGusJaUGGH7Y4,65663
|
|
91
91
|
sourcecode/mcp/runner.py,sha256=-Dp2qPGRkfNTVen6bKh7WtzQqpcEtsrXoiuajvshlKk,2866
|
|
92
92
|
sourcecode/mcp/server.py,sha256=f4-k-nx2amhSghlM7EBeZWyqCMEAGodOgrYPdbIUK08,59891
|
|
@@ -101,8 +101,8 @@ sourcecode/telemetry/consent.py,sha256=wLMvGNJeSSyZoNkQXpoUioY6mMv4Qdvuw7S9jAEWn
|
|
|
101
101
|
sourcecode/telemetry/events.py,sha256=LtzYfaX9Ilckj5PTvAcTpDa9mLqDsYPDUiDkRa58piY,2580
|
|
102
102
|
sourcecode/telemetry/filters.py,sha256=NHa5T-6DaZduQPFuC34jOqHWQgSizM-Ygq8aZ4j19ng,5834
|
|
103
103
|
sourcecode/telemetry/transport.py,sha256=4gGHsq0WeY9VywEZXA3vUxykfiYnw9uuqfjAAec7F8o,1681
|
|
104
|
-
sourcecode-1.
|
|
105
|
-
sourcecode-1.
|
|
106
|
-
sourcecode-1.
|
|
107
|
-
sourcecode-1.
|
|
108
|
-
sourcecode-1.
|
|
104
|
+
sourcecode-1.45.0.dist-info/METADATA,sha256=24sPQbi_FdplZlmfRZ1zc3_gQPZEYwbs0HGCY4A59j8,32359
|
|
105
|
+
sourcecode-1.45.0.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
|
|
106
|
+
sourcecode-1.45.0.dist-info/entry_points.txt,sha256=ex3F9rmbXeyDIoFQHtkEqTsKSaJow8F0LrVu8XfIktQ,57
|
|
107
|
+
sourcecode-1.45.0.dist-info/licenses/LICENSE,sha256=7DdHrU9Z_3e7dSvq4ISijZNjnuHo5NIHNiHDouMQ9JU,10491
|
|
108
|
+
sourcecode-1.45.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|