sourcecode 1.35.7__py3-none-any.whl → 1.35.8__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/mcp/registry.py +430 -22
- {sourcecode-1.35.7.dist-info → sourcecode-1.35.8.dist-info}/METADATA +1 -1
- {sourcecode-1.35.7.dist-info → sourcecode-1.35.8.dist-info}/RECORD +7 -7
- {sourcecode-1.35.7.dist-info → sourcecode-1.35.8.dist-info}/WHEEL +0 -0
- {sourcecode-1.35.7.dist-info → sourcecode-1.35.8.dist-info}/entry_points.txt +0 -0
- {sourcecode-1.35.7.dist-info → sourcecode-1.35.8.dist-info}/licenses/LICENSE +0 -0
sourcecode/__init__.py
CHANGED
sourcecode/mcp/registry.py
CHANGED
|
@@ -544,41 +544,86 @@ def _root_aliases() -> list[ToolSpec]:
|
|
|
544
544
|
module = str(inputs["module"]).strip("/")
|
|
545
545
|
return [f"{repo_path}/{module}", "--compact"]
|
|
546
546
|
|
|
547
|
+
_GET_COMPACT_DOC = """\
|
|
548
|
+
Compact human/LLM summary of a repository (~1000-3000 tokens). USE THIS FIRST.
|
|
549
|
+
|
|
550
|
+
Best for: quick project orientation, first-time context, token-budget constrained tasks.
|
|
551
|
+
Returns: stacks, entry points, dependency summary, architecture summary, confidence, gaps.
|
|
552
|
+
Includes security_surface, mybatis, and transactional_boundaries for Java/Spring projects.
|
|
553
|
+
For richer machine-oriented detail (deeper signals, more sections), use get_agent_context.
|
|
554
|
+
|
|
555
|
+
Maps to: sourcecode <repo_path> --compact [--git-context]
|
|
556
|
+
repo_path: absolute path to the repository (default: current working directory).
|
|
557
|
+
git_context: include git log and branch context in the analysis.
|
|
558
|
+
"""
|
|
559
|
+
|
|
560
|
+
_GET_AGENT_DOC = """\
|
|
561
|
+
Full structured agent context with extended machine-oriented signals (~5000-15000 tokens).
|
|
562
|
+
|
|
563
|
+
Best for: deep analysis, bug investigation, code review, or when get_compact_context
|
|
564
|
+
lacks sufficient detail. Includes all compact fields plus: env_map, code_notes,
|
|
565
|
+
architecture layers, security surface, transactional boundaries, module graph summary.
|
|
566
|
+
Prefer get_compact_context for quick orientation or token-constrained workflows.
|
|
567
|
+
|
|
568
|
+
Maps to: sourcecode <repo_path> --agent [--git-context]
|
|
569
|
+
repo_path: absolute path to the repository (default: current working directory).
|
|
570
|
+
git_context: include git log and branch context in the analysis.
|
|
571
|
+
"""
|
|
572
|
+
|
|
573
|
+
_GET_MODULE_DOC = """\
|
|
574
|
+
Compact analysis of a specific module or subdirectory within a repository.
|
|
575
|
+
|
|
576
|
+
Maps to: sourcecode <repo_path>/<module> --compact
|
|
577
|
+
repo_path: absolute path to the repository root.
|
|
578
|
+
module: subdirectory name relative to repo_path (e.g. 'src/auth', 'api', 'core').
|
|
579
|
+
Returns: same fields as get_compact_context but scoped to the module subtree.
|
|
580
|
+
"""
|
|
581
|
+
|
|
582
|
+
_TELEMETRY_DOC = """\
|
|
583
|
+
Manage telemetry settings.
|
|
584
|
+
|
|
585
|
+
Maps to: sourcecode telemetry <action>
|
|
586
|
+
action: one of "status" (show current state), "enable" (opt in), "disable" (opt out).
|
|
587
|
+
Valid values: "status" | "enable" | "disable"
|
|
588
|
+
"""
|
|
589
|
+
|
|
547
590
|
return [
|
|
548
591
|
_alias_spec(
|
|
549
592
|
"get_compact_context",
|
|
550
|
-
"Compact
|
|
551
|
-
"Use get_agent_context for richer detail.",
|
|
593
|
+
"Compact human/LLM summary of a repository (~1000-3000 tokens). USE THIS FIRST.",
|
|
552
594
|
("sourcecode",),
|
|
553
595
|
params_compact,
|
|
554
596
|
compact_argv,
|
|
555
597
|
supported_targets=("repo_path",),
|
|
556
598
|
unsupported_targets=("file_path",),
|
|
557
599
|
validator=validate_repo_path,
|
|
600
|
+
docstring_override=_GET_COMPACT_DOC,
|
|
558
601
|
),
|
|
559
602
|
_alias_spec(
|
|
560
603
|
"get_agent_context",
|
|
561
|
-
"
|
|
604
|
+
"Full structured agent context with extended machine-oriented signals (~5000-15000 tokens).",
|
|
562
605
|
("sourcecode",),
|
|
563
606
|
params_compact,
|
|
564
607
|
agent_argv,
|
|
565
608
|
supported_targets=("repo_path",),
|
|
566
609
|
unsupported_targets=("file_path",),
|
|
567
610
|
validator=validate_repo_path,
|
|
611
|
+
docstring_override=_GET_AGENT_DOC,
|
|
568
612
|
),
|
|
569
613
|
_alias_spec(
|
|
570
614
|
"get_module_context",
|
|
571
|
-
"Compact
|
|
615
|
+
"Compact analysis of a specific module or subdirectory within a repository.",
|
|
572
616
|
("sourcecode",),
|
|
573
617
|
params_module,
|
|
574
618
|
module_argv,
|
|
575
619
|
supported_targets=("repo_path", "module_path"),
|
|
576
620
|
unsupported_targets=("file_path",),
|
|
577
621
|
validator=validate_repo_path,
|
|
622
|
+
docstring_override=_GET_MODULE_DOC,
|
|
578
623
|
),
|
|
579
624
|
_alias_spec(
|
|
580
625
|
"telemetry",
|
|
581
|
-
"
|
|
626
|
+
"Manage telemetry settings: status | enable | disable.",
|
|
582
627
|
("telemetry",),
|
|
583
628
|
(
|
|
584
629
|
ToolParamSpec(
|
|
@@ -591,6 +636,7 @@ def _root_aliases() -> list[ToolSpec]:
|
|
|
591
636
|
),
|
|
592
637
|
lambda inputs: ["telemetry", str(inputs["action"])],
|
|
593
638
|
supported_targets=("action",),
|
|
639
|
+
docstring_override=_TELEMETRY_DOC,
|
|
594
640
|
),
|
|
595
641
|
]
|
|
596
642
|
|
|
@@ -598,10 +644,20 @@ def _root_aliases() -> list[ToolSpec]:
|
|
|
598
644
|
def _prepare_context_aliases() -> list[ToolSpec]:
|
|
599
645
|
validate_repo_path = _repo_path_validator()
|
|
600
646
|
|
|
601
|
-
|
|
647
|
+
# Only used for prepare-context tasks that genuinely accept --since (delta, review-pr).
|
|
648
|
+
def _since_task_alias(
|
|
649
|
+
name: str,
|
|
650
|
+
task: str,
|
|
651
|
+
description: str,
|
|
652
|
+
*,
|
|
653
|
+
supported_targets: tuple[str, ...],
|
|
654
|
+
docstring_override: str | None = None,
|
|
655
|
+
) -> ToolSpec:
|
|
602
656
|
params = (
|
|
603
657
|
ToolParamSpec("repo_path", "argument", str, required=False, default=".", is_path=True),
|
|
604
|
-
ToolParamSpec("since", "
|
|
658
|
+
ToolParamSpec("since", "option", str, required=False, default="",
|
|
659
|
+
option_names=("--since",),
|
|
660
|
+
help="Git ref to diff against (e.g. HEAD~3, origin/main)."),
|
|
605
661
|
)
|
|
606
662
|
|
|
607
663
|
def argv_builder(inputs: Mapping[str, Any]) -> list[str]:
|
|
@@ -611,7 +667,6 @@ def _prepare_context_aliases() -> list[ToolSpec]:
|
|
|
611
667
|
if not value and name == "get_delta":
|
|
612
668
|
try:
|
|
613
669
|
from sourcecode.mcp.server import _auto_since as _resolve_since
|
|
614
|
-
|
|
615
670
|
value = _resolve_since(repo_path)
|
|
616
671
|
except Exception:
|
|
617
672
|
value = "HEAD~1"
|
|
@@ -628,31 +683,310 @@ def _prepare_context_aliases() -> list[ToolSpec]:
|
|
|
628
683
|
supported_targets=supported_targets,
|
|
629
684
|
unsupported_targets=("file_path",),
|
|
630
685
|
validator=validate_repo_path,
|
|
686
|
+
docstring_override=docstring_override,
|
|
631
687
|
)
|
|
632
688
|
|
|
689
|
+
_GET_DELTA_DOC = """\
|
|
690
|
+
Incremental context: git-changed files since a reference commit.
|
|
691
|
+
|
|
692
|
+
Maps to: sourcecode prepare-context delta <repo_path> --since <since>
|
|
693
|
+
repo_path: absolute path to the repository (default: current working directory).
|
|
694
|
+
since: git ref to diff against (e.g. HEAD~3, main, origin/main).
|
|
695
|
+
If empty or omitted, auto-detects merge-base with origin/main (or
|
|
696
|
+
origin/master). Falls back to HEAD~1 if no remote branch found.
|
|
697
|
+
Pass "HEAD~1" explicitly to force single-commit diff.
|
|
698
|
+
"""
|
|
699
|
+
|
|
700
|
+
_REVIEW_PR_DOC = """\
|
|
701
|
+
Execution paths and risk analysis for changed files in a pull request.
|
|
702
|
+
|
|
703
|
+
Maps to: sourcecode prepare-context review-pr <repo_path> [--since <since>]
|
|
704
|
+
Returns: compact_base + execution_paths (diff-scoped) + hotspots for changed files.
|
|
705
|
+
repo_path: absolute path to the repository (default: current working directory).
|
|
706
|
+
since: git ref to diff against (e.g. HEAD~3, main, origin/main).
|
|
707
|
+
If omitted, diffs against uncommitted changes or HEAD~1 fallback.
|
|
708
|
+
"""
|
|
709
|
+
|
|
710
|
+
_FIX_BUG_DOC = """\
|
|
711
|
+
Risk-ranked files for bug investigation, optionally focused by symptom.
|
|
712
|
+
|
|
713
|
+
Maps to: sourcecode prepare-context fix-bug <repo_path> [--symptom <symptom>]
|
|
714
|
+
Includes compact_base: security_surface, transactional_boundaries, spring_profiles.
|
|
715
|
+
repo_path: absolute path to the repository (default: current working directory).
|
|
716
|
+
symptom: optional error message or class name to focus the file ranking
|
|
717
|
+
(e.g. "NullPointerException in UserService.findById").
|
|
718
|
+
Without symptom, ranking is generic (by churn/complexity). With symptom,
|
|
719
|
+
the matching class and its callers are ranked first.
|
|
720
|
+
"""
|
|
721
|
+
|
|
722
|
+
_ONBOARD_DOC = """\
|
|
723
|
+
Onboarding context: structured overview for new contributors.
|
|
724
|
+
|
|
725
|
+
Maps to: sourcecode prepare-context onboard <repo_path>
|
|
726
|
+
Returns: project structure, key entry points, architectural patterns, getting-started guide.
|
|
727
|
+
repo_path: absolute path to the repository (default: current working directory).
|
|
728
|
+
"""
|
|
729
|
+
|
|
730
|
+
_EXPLAIN_DOC = """\
|
|
731
|
+
Architecture and entry-point explanation for a repository.
|
|
732
|
+
|
|
733
|
+
Maps to: sourcecode prepare-context explain <repo_path>
|
|
734
|
+
Returns: project summary, architecture overview, entry points, key dependencies.
|
|
735
|
+
repo_path: absolute path to the repository (default: current working directory).
|
|
736
|
+
"""
|
|
737
|
+
|
|
738
|
+
_REFACTOR_DOC = """\
|
|
739
|
+
Structural issues and refactor opportunities for a repository.
|
|
740
|
+
|
|
741
|
+
Maps to: sourcecode prepare-context refactor <repo_path>
|
|
742
|
+
Returns: structural issues, coupling hotspots, high-churn files, improvement opportunities.
|
|
743
|
+
repo_path: absolute path to the repository (default: current working directory).
|
|
744
|
+
"""
|
|
745
|
+
|
|
746
|
+
_GENERATE_TESTS_DOC = """\
|
|
747
|
+
Untested source files and test gap analysis for a repository.
|
|
748
|
+
|
|
749
|
+
Maps to: sourcecode prepare-context generate-tests <repo_path> [--all]
|
|
750
|
+
Returns: test_gaps list of untested files ranked by risk.
|
|
751
|
+
On large repos (>2000 classes) analysis is bounded by SOURCECODE_TESTS_TIMEOUT_MS
|
|
752
|
+
(default: 15000 ms). If timeout elapses, returns truncated=true with partial results.
|
|
753
|
+
repo_path: absolute path to the repository (default: current working directory).
|
|
754
|
+
include_all: return full test_gaps list without truncating to top 20.
|
|
755
|
+
"""
|
|
756
|
+
|
|
757
|
+
_IR_SUMMARY_DOC = """\
|
|
758
|
+
Deterministic symbol-level IR summary for Java repositories. Java only.
|
|
759
|
+
|
|
760
|
+
Maps to: sourcecode repo-ir <repo_path> --summary-only
|
|
761
|
+
Returns: reverse_graph (top 10 hubs), route_surface (top 50 endpoints),
|
|
762
|
+
subsystems (top 15), impact, analysis. Full graph nodes/edges omitted.
|
|
763
|
+
|
|
764
|
+
Output is bounded to ~100 KB for LLM safety. For full IR (can exceed 10 MB
|
|
765
|
+
on large repos), use the CLI: sourcecode repo-ir <path> --output ir.json
|
|
766
|
+
Use get_compact_context or get_agent_context for non-Java repos.
|
|
767
|
+
|
|
768
|
+
repo_path: absolute path to the Java repository (default: current working directory).
|
|
769
|
+
"""
|
|
770
|
+
|
|
771
|
+
_IMPACT_CONTEXT_DOC = """\
|
|
772
|
+
Blast-radius analysis: who calls a class and what breaks if it changes? Java only.
|
|
773
|
+
|
|
774
|
+
Maps to: sourcecode impact <target> <repo_path> [--depth <depth>]
|
|
775
|
+
Returns: direct_callers, indirect_callers, endpoints_affected,
|
|
776
|
+
transactional_boundaries_touched, risk_score, risk_level, stats.
|
|
777
|
+
|
|
778
|
+
Use this when:
|
|
779
|
+
- Planning a refactor: understand the full call chain before changing a class
|
|
780
|
+
- PR review: assess blast radius of a changed service or utility class
|
|
781
|
+
- Incident triage: find all paths that reach a faulty component
|
|
782
|
+
|
|
783
|
+
target: class name (simple or FQN) or Java file path. Examples:
|
|
784
|
+
"UserService", "org.example.UserService", "UserService.java"
|
|
785
|
+
repo_path: absolute path to the Java repository (default: current working directory).
|
|
786
|
+
depth: BFS depth for indirect caller traversal (1–8, default: 4).
|
|
787
|
+
"""
|
|
788
|
+
|
|
789
|
+
_MODERNIZE_DOC = """\
|
|
790
|
+
Analyzes codebase for modernization opportunities: dead zones, hotspot scores, upgrade candidates.
|
|
791
|
+
|
|
792
|
+
Maps to: sourcecode modernize <repo_path>
|
|
793
|
+
Returns: hotspot_candidates (high fan-in + git churn), dead_zone_candidates (isolated classes),
|
|
794
|
+
high_coupling_nodes, subsystem_summary, cross_module_tangles, recommendation.
|
|
795
|
+
|
|
796
|
+
Best for: refactor planning, identifying where to start, finding safe removal candidates.
|
|
797
|
+
Use get_compact_context or get_agent_context first for project orientation.
|
|
798
|
+
|
|
799
|
+
repo_path: absolute path to the Java repository (default: current working directory).
|
|
800
|
+
"""
|
|
801
|
+
|
|
802
|
+
_CHECK_FRESHNESS_DOC = """\
|
|
803
|
+
Report RIS freshness relative to the current git HEAD.
|
|
804
|
+
|
|
805
|
+
Answers instantly: is the cached snapshot current? How many commits behind?
|
|
806
|
+
Use before deciding whether to call get_compact_context for a refresh.
|
|
807
|
+
|
|
808
|
+
Returns:
|
|
809
|
+
fresh (bool) — True when RIS HEAD == current HEAD and no uncommitted changes
|
|
810
|
+
current_git_head (str) — Current repo HEAD (short SHA)
|
|
811
|
+
ris_git_head (str|null) — HEAD stored in RIS at last build
|
|
812
|
+
delta_commits (int|null) — Commits between ris_git_head and HEAD (0 = in sync)
|
|
813
|
+
has_uncommitted_changes — Working tree has staged or unstaged changes
|
|
814
|
+
ris_exists (bool) — False when no RIS built yet
|
|
815
|
+
ris_last_updated_at (str)— ISO-8601 timestamp of last RIS write
|
|
816
|
+
|
|
817
|
+
repo_path: absolute path to the repository (default: current working directory).
|
|
818
|
+
"""
|
|
819
|
+
|
|
820
|
+
_COLD_START_DOC = """\
|
|
821
|
+
Instant session bootstrap from persisted Repository Intelligence Snapshot (RIS).
|
|
822
|
+
|
|
823
|
+
PREFER start_session over this tool — it provides orchestration guidance on top
|
|
824
|
+
of the same RIS data. Use get_cold_start_context when you only need the raw
|
|
825
|
+
RIS bootstrap object without tool sequencing recommendations.
|
|
826
|
+
|
|
827
|
+
Returns cached structural context built from prior analysis runs — zero re-analysis cost.
|
|
828
|
+
|
|
829
|
+
status values:
|
|
830
|
+
"cold_start_ready" — RIS exists and matches the current git HEAD.
|
|
831
|
+
"cold_start_stale" — RIS exists but HEAD has changed since last analysis.
|
|
832
|
+
Data is still useful; run get_compact_context to refresh.
|
|
833
|
+
"no_ris" — No RIS yet for this repo; run get_compact_context first.
|
|
834
|
+
|
|
835
|
+
Returns: status, repo_id, git_head, stale (bool), last_updated_at,
|
|
836
|
+
summary (compact snapshot), entrypoints, endpoints, hotspots.
|
|
837
|
+
|
|
838
|
+
repo_path: absolute path to the repository (default: current working directory).
|
|
839
|
+
"""
|
|
840
|
+
|
|
841
|
+
_GET_ENDPOINTS_DOC = """\
|
|
842
|
+
REST API endpoint surface extraction from Java source files. JAVA ONLY.
|
|
843
|
+
|
|
844
|
+
Do NOT call this on non-Java repositories — it will return empty results.
|
|
845
|
+
Use get_compact_context or get_agent_context for non-Java repos.
|
|
846
|
+
|
|
847
|
+
Maps to: sourcecode endpoints <repo_path>
|
|
848
|
+
Returns: endpoints list with method, path, controller, handler fields;
|
|
849
|
+
security dict always present (policy: roles_allowed|permit_all|deny_all|
|
|
850
|
+
authenticated|...|none_detected); none_detected = no auth annotation found.
|
|
851
|
+
total (int), no_security_signal (int), and security_model (str) fields.
|
|
852
|
+
no_security_signal counts endpoints where security.policy == "none_detected".
|
|
853
|
+
security_model values: "filter_based" (centralized Spring Security config —
|
|
854
|
+
high no_security_signal is expected and does NOT mean endpoints are unprotected),
|
|
855
|
+
"annotation_based" (per-endpoint annotations only), "mixed" (both),
|
|
856
|
+
"unknown" (no security signals detected).
|
|
857
|
+
Supports Spring MVC (@GetMapping etc.) and JAX-RS (@GET/@POST etc.).
|
|
858
|
+
repo_path: absolute path to the Java repository (default: current working directory).
|
|
859
|
+
"""
|
|
860
|
+
|
|
861
|
+
_CACHE_STATUS_DOC = """\
|
|
862
|
+
Report cache metadata for a repository.
|
|
863
|
+
|
|
864
|
+
Maps to: sourcecode cache status <repo_path> --json
|
|
865
|
+
Returns: cache entries with git_head, timestamps, size info.
|
|
866
|
+
Use check_freshness for RIS-specific freshness checking (faster, richer).
|
|
867
|
+
repo_path: absolute path to the repository (default: current working directory).
|
|
868
|
+
"""
|
|
869
|
+
|
|
870
|
+
_CACHE_WARM_DOC = """\
|
|
871
|
+
Warm the cache for a repository (builds compact and agent analysis snapshots).
|
|
872
|
+
|
|
873
|
+
Maps to: sourcecode cache warm <repo_path>
|
|
874
|
+
Builds or refreshes the Repository Intelligence Snapshot (RIS).
|
|
875
|
+
Use before analytical workflows to ensure fast subsequent tool calls (~8s first run,
|
|
876
|
+
instant after).
|
|
877
|
+
repo_path: absolute path to the repository (default: current working directory).
|
|
878
|
+
"""
|
|
879
|
+
|
|
880
|
+
_CACHE_CLEAR_DOC = """\
|
|
881
|
+
Clear cached analysis for a repository.
|
|
882
|
+
|
|
883
|
+
Maps to: sourcecode cache clear <repo_path> [--include-ris]
|
|
884
|
+
Removes cached context files. After clearing, run get_compact_context or cache_warm to rebuild.
|
|
885
|
+
include_ris: also remove the RIS snapshot in addition to analysis cache (default: False).
|
|
886
|
+
repo_path: absolute path to the repository (default: current working directory).
|
|
887
|
+
"""
|
|
888
|
+
|
|
633
889
|
return [
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
890
|
+
# --- get_delta / review_pr_context: both genuinely use --since ---
|
|
891
|
+
_since_task_alias(
|
|
892
|
+
"get_delta", "delta",
|
|
893
|
+
"Incremental context: git-changed files since a reference commit.",
|
|
894
|
+
supported_targets=("repo_path", "git_ref"),
|
|
895
|
+
docstring_override=_GET_DELTA_DOC,
|
|
896
|
+
),
|
|
897
|
+
_since_task_alias(
|
|
898
|
+
"review_pr_context", "review-pr",
|
|
899
|
+
"Execution paths and risk analysis for changed files in a pull request.",
|
|
900
|
+
supported_targets=("repo_path", "git_ref"),
|
|
901
|
+
docstring_override=_REVIEW_PR_DOC,
|
|
902
|
+
),
|
|
903
|
+
|
|
904
|
+
# --- fix_bug_context: --symptom (not --since) ---
|
|
905
|
+
_alias_spec(
|
|
906
|
+
"fix_bug_context",
|
|
907
|
+
"Risk-ranked files for bug investigation, optionally focused by symptom.",
|
|
908
|
+
("prepare-context",),
|
|
909
|
+
(
|
|
910
|
+
ToolParamSpec("repo_path", "argument", str, required=False, default=".", is_path=True),
|
|
911
|
+
ToolParamSpec("symptom", "option", str, required=False, default=None,
|
|
912
|
+
option_names=("--symptom",),
|
|
913
|
+
help="Error message or class name to focus file ranking."),
|
|
914
|
+
),
|
|
915
|
+
lambda inputs: (
|
|
916
|
+
["prepare-context", "fix-bug", str(inputs.get("repo_path", "."))]
|
|
917
|
+
+ (["--symptom", str(inputs["symptom"])] if inputs.get("symptom") else [])
|
|
918
|
+
),
|
|
919
|
+
supported_targets=("repo_path", "symptom"),
|
|
920
|
+
unsupported_targets=("file_path",),
|
|
921
|
+
validator=validate_repo_path,
|
|
922
|
+
docstring_override=_FIX_BUG_DOC,
|
|
923
|
+
),
|
|
924
|
+
|
|
925
|
+
# --- onboard / explain / refactor: no --since ---
|
|
926
|
+
_alias_spec(
|
|
927
|
+
"onboard_context",
|
|
928
|
+
"Onboarding context: structured overview for new contributors.",
|
|
929
|
+
("prepare-context",),
|
|
930
|
+
(
|
|
931
|
+
ToolParamSpec("repo_path", "argument", str, required=False, default=".", is_path=True),
|
|
932
|
+
),
|
|
933
|
+
lambda inputs: ["prepare-context", "onboard", str(inputs.get("repo_path", "."))],
|
|
934
|
+
supported_targets=("repo_path",),
|
|
935
|
+
unsupported_targets=("file_path",),
|
|
936
|
+
validator=validate_repo_path,
|
|
937
|
+
docstring_override=_ONBOARD_DOC,
|
|
938
|
+
),
|
|
939
|
+
_alias_spec(
|
|
940
|
+
"explain_context",
|
|
941
|
+
"Architecture and entry-point explanation for a repository.",
|
|
942
|
+
("prepare-context",),
|
|
943
|
+
(
|
|
944
|
+
ToolParamSpec("repo_path", "argument", str, required=False, default=".", is_path=True),
|
|
945
|
+
),
|
|
946
|
+
lambda inputs: ["prepare-context", "explain", str(inputs.get("repo_path", "."))],
|
|
947
|
+
supported_targets=("repo_path",),
|
|
948
|
+
unsupported_targets=("file_path",),
|
|
949
|
+
validator=validate_repo_path,
|
|
950
|
+
docstring_override=_EXPLAIN_DOC,
|
|
951
|
+
),
|
|
952
|
+
_alias_spec(
|
|
953
|
+
"refactor_context",
|
|
954
|
+
"Structural issues and refactor opportunities for a repository.",
|
|
955
|
+
("prepare-context",),
|
|
956
|
+
(
|
|
957
|
+
ToolParamSpec("repo_path", "argument", str, required=False, default=".", is_path=True),
|
|
958
|
+
),
|
|
959
|
+
lambda inputs: ["prepare-context", "refactor", str(inputs.get("repo_path", "."))],
|
|
960
|
+
supported_targets=("repo_path",),
|
|
961
|
+
unsupported_targets=("file_path",),
|
|
962
|
+
validator=validate_repo_path,
|
|
963
|
+
docstring_override=_REFACTOR_DOC,
|
|
964
|
+
),
|
|
965
|
+
|
|
966
|
+
# --- other prepare-context aliases ---
|
|
640
967
|
_alias_spec(
|
|
641
968
|
"generate_tests_context",
|
|
642
|
-
"
|
|
969
|
+
"Untested source files and test gap analysis for a repository.",
|
|
643
970
|
("prepare-context",),
|
|
644
971
|
(
|
|
645
972
|
ToolParamSpec("repo_path", "argument", str, required=False, default=".", is_path=True),
|
|
646
|
-
ToolParamSpec("include_all", "
|
|
973
|
+
ToolParamSpec("include_all", "option", bool, required=False, default=False,
|
|
974
|
+
option_names=("--all",), is_flag=True),
|
|
975
|
+
),
|
|
976
|
+
lambda inputs: (
|
|
977
|
+
["prepare-context", "generate-tests", str(inputs.get("repo_path", "."))]
|
|
978
|
+
+ (["--all"] if bool(inputs.get("include_all")) else [])
|
|
647
979
|
),
|
|
648
|
-
lambda inputs: ["prepare-context", "generate-tests", str(inputs.get("repo_path", "."))] + (["--all"] if bool(inputs.get("include_all")) else []),
|
|
649
980
|
supported_targets=("repo_path",),
|
|
650
981
|
unsupported_targets=("file_path",),
|
|
651
982
|
validator=validate_repo_path,
|
|
983
|
+
docstring_override=_GENERATE_TESTS_DOC,
|
|
652
984
|
),
|
|
985
|
+
|
|
986
|
+
# --- Java analysis aliases ---
|
|
653
987
|
_alias_spec(
|
|
654
988
|
"get_ir_summary",
|
|
655
|
-
"
|
|
989
|
+
"Deterministic symbol-level IR summary for Java repositories. Java only.",
|
|
656
990
|
("repo-ir",),
|
|
657
991
|
(
|
|
658
992
|
ToolParamSpec("repo_path", "argument", str, required=False, default=".", is_path=True),
|
|
@@ -661,10 +995,11 @@ def _prepare_context_aliases() -> list[ToolSpec]:
|
|
|
661
995
|
supported_targets=("repo_path",),
|
|
662
996
|
unsupported_targets=("file_path",),
|
|
663
997
|
validator=validate_repo_path,
|
|
998
|
+
docstring_override=_IR_SUMMARY_DOC,
|
|
664
999
|
),
|
|
665
1000
|
_alias_spec(
|
|
666
1001
|
"get_impact_context",
|
|
667
|
-
"Blast-radius analysis
|
|
1002
|
+
"Blast-radius analysis: who calls a class and what breaks if it changes? Java only.",
|
|
668
1003
|
("impact",),
|
|
669
1004
|
(
|
|
670
1005
|
ToolParamSpec("repo_path", "argument", str, required=False, default=".", is_path=True),
|
|
@@ -681,10 +1016,11 @@ def _prepare_context_aliases() -> list[ToolSpec]:
|
|
|
681
1016
|
supported_targets=("repo_path", "class_name"),
|
|
682
1017
|
unsupported_targets=("file_path",),
|
|
683
1018
|
validator=validate_repo_path,
|
|
1019
|
+
docstring_override=_IMPACT_CONTEXT_DOC,
|
|
684
1020
|
),
|
|
685
1021
|
_alias_spec(
|
|
686
1022
|
"modernize_context",
|
|
687
|
-
"Modernization analysis
|
|
1023
|
+
"Modernization analysis: dead zones, hotspot scores, upgrade candidates.",
|
|
688
1024
|
("modernize",),
|
|
689
1025
|
(
|
|
690
1026
|
ToolParamSpec("repo_path", "argument", str, required=False, default=".", is_path=True),
|
|
@@ -693,10 +1029,13 @@ def _prepare_context_aliases() -> list[ToolSpec]:
|
|
|
693
1029
|
supported_targets=("repo_path",),
|
|
694
1030
|
unsupported_targets=("file_path",),
|
|
695
1031
|
validator=validate_repo_path,
|
|
1032
|
+
docstring_override=_MODERNIZE_DOC,
|
|
696
1033
|
),
|
|
1034
|
+
|
|
1035
|
+
# --- cache / freshness aliases ---
|
|
697
1036
|
_alias_spec(
|
|
698
1037
|
"check_freshness",
|
|
699
|
-
"
|
|
1038
|
+
"Report RIS freshness relative to the current git HEAD.",
|
|
700
1039
|
("cache", "freshness"),
|
|
701
1040
|
(
|
|
702
1041
|
ToolParamSpec("repo_path", "argument", str, required=False, default=".", is_path=True),
|
|
@@ -705,10 +1044,11 @@ def _prepare_context_aliases() -> list[ToolSpec]:
|
|
|
705
1044
|
supported_targets=("repo_path",),
|
|
706
1045
|
unsupported_targets=("file_path",),
|
|
707
1046
|
validator=validate_repo_path,
|
|
1047
|
+
docstring_override=_CHECK_FRESHNESS_DOC,
|
|
708
1048
|
),
|
|
709
1049
|
_alias_spec(
|
|
710
1050
|
"get_cold_start_context",
|
|
711
|
-
"
|
|
1051
|
+
"Instant session bootstrap from persisted Repository Intelligence Snapshot (RIS).",
|
|
712
1052
|
("cold-start",),
|
|
713
1053
|
(
|
|
714
1054
|
ToolParamSpec("repo_path", "argument", str, required=False, default=".", is_path=True),
|
|
@@ -717,6 +1057,69 @@ def _prepare_context_aliases() -> list[ToolSpec]:
|
|
|
717
1057
|
supported_targets=("repo_path",),
|
|
718
1058
|
unsupported_targets=("file_path",),
|
|
719
1059
|
validator=validate_repo_path,
|
|
1060
|
+
docstring_override=_COLD_START_DOC,
|
|
1061
|
+
),
|
|
1062
|
+
|
|
1063
|
+
# --- get_endpoints: clean alias replacing raw canonical with 7 CLI params ---
|
|
1064
|
+
_alias_spec(
|
|
1065
|
+
"get_endpoints",
|
|
1066
|
+
"REST API endpoint surface extraction from Java source files. JAVA ONLY.",
|
|
1067
|
+
("endpoints",),
|
|
1068
|
+
(
|
|
1069
|
+
ToolParamSpec("repo_path", "argument", str, required=False, default=".", is_path=True),
|
|
1070
|
+
),
|
|
1071
|
+
lambda inputs: ["endpoints", str(inputs.get("repo_path", "."))],
|
|
1072
|
+
supported_targets=("repo_path",),
|
|
1073
|
+
unsupported_targets=("file_path",),
|
|
1074
|
+
validator=validate_repo_path,
|
|
1075
|
+
docstring_override=_GET_ENDPOINTS_DOC,
|
|
1076
|
+
),
|
|
1077
|
+
|
|
1078
|
+
# --- cache management: curated aliases stripping CLI noise params ---
|
|
1079
|
+
_alias_spec(
|
|
1080
|
+
"cache_status",
|
|
1081
|
+
"Report cache metadata for a repository.",
|
|
1082
|
+
("cache", "status"),
|
|
1083
|
+
(
|
|
1084
|
+
ToolParamSpec("repo_path", "argument", str, required=False, default=".", is_path=True),
|
|
1085
|
+
),
|
|
1086
|
+
lambda inputs: ["cache", "status", str(inputs.get("repo_path", ".")), "--json"],
|
|
1087
|
+
supported_targets=("repo_path",),
|
|
1088
|
+
unsupported_targets=("file_path",),
|
|
1089
|
+
validator=validate_repo_path,
|
|
1090
|
+
docstring_override=_CACHE_STATUS_DOC,
|
|
1091
|
+
),
|
|
1092
|
+
_alias_spec(
|
|
1093
|
+
"cache_warm",
|
|
1094
|
+
"Warm the cache for a repository (builds compact and agent analysis snapshots).",
|
|
1095
|
+
("cache", "warm"),
|
|
1096
|
+
(
|
|
1097
|
+
ToolParamSpec("repo_path", "argument", str, required=False, default=".", is_path=True),
|
|
1098
|
+
),
|
|
1099
|
+
lambda inputs: ["cache", "warm", str(inputs.get("repo_path", "."))],
|
|
1100
|
+
supported_targets=("repo_path",),
|
|
1101
|
+
unsupported_targets=("file_path",),
|
|
1102
|
+
validator=validate_repo_path,
|
|
1103
|
+
docstring_override=_CACHE_WARM_DOC,
|
|
1104
|
+
),
|
|
1105
|
+
_alias_spec(
|
|
1106
|
+
"cache_clear",
|
|
1107
|
+
"Clear cached analysis for a repository.",
|
|
1108
|
+
("cache", "clear"),
|
|
1109
|
+
(
|
|
1110
|
+
ToolParamSpec("repo_path", "argument", str, required=False, default=".", is_path=True),
|
|
1111
|
+
ToolParamSpec("include_ris", "option", bool, required=False, default=False,
|
|
1112
|
+
option_names=("--include-ris",), is_flag=True,
|
|
1113
|
+
help="Also remove RIS snapshot (default: False)."),
|
|
1114
|
+
),
|
|
1115
|
+
lambda inputs: (
|
|
1116
|
+
["cache", "clear", str(inputs.get("repo_path", ".")), "--yes"]
|
|
1117
|
+
+ (["--include-ris"] if bool(inputs.get("include_ris")) else [])
|
|
1118
|
+
),
|
|
1119
|
+
supported_targets=("repo_path",),
|
|
1120
|
+
unsupported_targets=("file_path",),
|
|
1121
|
+
validator=validate_repo_path,
|
|
1122
|
+
docstring_override=_CACHE_CLEAR_DOC,
|
|
720
1123
|
),
|
|
721
1124
|
]
|
|
722
1125
|
|
|
@@ -812,6 +1215,11 @@ _MCP_HIDDEN_CANONICAL_TOOLS: frozenset[str] = frozenset({
|
|
|
812
1215
|
"cold_start", # duplicate of get_cold_start_context
|
|
813
1216
|
"cache_freshness", # duplicate of check_freshness
|
|
814
1217
|
"modernize", # duplicate of modernize_context
|
|
1218
|
+
# Raw CLI tools with output-format/noise params — clean alias with only repo_path exists
|
|
1219
|
+
"endpoints", # 7 CLI params (output_path/format/copy/etc.); use get_endpoints
|
|
1220
|
+
"cache_status", # path + json_output flag; curated alias strips json_output, renames path→repo_path
|
|
1221
|
+
"cache_warm", # path + compact/agent output flags; curated alias keeps only repo_path
|
|
1222
|
+
"cache_clear", # path + yes/all_ destructive flags; curated alias keeps repo_path + include_ris only
|
|
815
1223
|
# Curated overrides — canonical CLI spec replaced by cleaner alias with same name.
|
|
816
1224
|
# Listed here so validate_registry() skips CLI param-drift checks on the alias.
|
|
817
1225
|
"spring_audit", # curated: repo_path + scope + min_severity only (strips output_path/format/copy)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
sourcecode/__init__.py,sha256=
|
|
1
|
+
sourcecode/__init__.py,sha256=4pSX2tiJdyiu03u0G_n4-Ww2ajE_E7piY8T-20n_IDM,103
|
|
2
2
|
sourcecode/adaptive_scanner.py,sha256=XffluXKzJUXrMtjEiAOnSNPZnztdIcts17T9ouHeID0,10521
|
|
3
3
|
sourcecode/architecture_analyzer.py,sha256=qh749a7ykPtGmQI1MR9y6j8TtL_jBdVYFx9YRsLqOMw,44121
|
|
4
4
|
sourcecode/architecture_summary.py,sha256=z34_6v7cSwy98cof2UVciGho7SCrZ93tiqMmq5WNzRQ,20405
|
|
@@ -76,7 +76,7 @@ sourcecode/detectors/terraform.py,sha256=cxORPR_zVLOJpHlh4e9JnFpkQsn_UnqMMom5yG6
|
|
|
76
76
|
sourcecode/detectors/tooling.py,sha256=8CKbtxwQoABP-WyBRNmdAmHDOvAH57AR1cF4UKuWEdQ,2074
|
|
77
77
|
sourcecode/mcp/__init__.py,sha256=XU4HfRGbdid8wdUA0x_4f7uKZD1z3mv_XUY_WU_T9Mw,179
|
|
78
78
|
sourcecode/mcp/orchestrator.py,sha256=BMi1D6liJHI3DXiaC8yeBLLP0wXajpCP3-vnRGqrvnw,26850
|
|
79
|
-
sourcecode/mcp/registry.py,sha256=
|
|
79
|
+
sourcecode/mcp/registry.py,sha256=r6YBd9OZoQ4nwg2roQkt6dAAO__e8REtPn--WKLUYIY,60206
|
|
80
80
|
sourcecode/mcp/runner.py,sha256=-Dp2qPGRkfNTVen6bKh7WtzQqpcEtsrXoiuajvshlKk,2866
|
|
81
81
|
sourcecode/mcp/server.py,sha256=lBSQCw3yFe8rZHp2GGVcfua0EJUYZmsIUbvA4GIJv9s,52210
|
|
82
82
|
sourcecode/mcp/onboarding/__init__.py,sha256=sj2PWqEBmMc4zBNkomg89WtL0M6S7A9yb7_wAuSWNP4,66
|
|
@@ -90,8 +90,8 @@ sourcecode/telemetry/consent.py,sha256=wLMvGNJeSSyZoNkQXpoUioY6mMv4Qdvuw7S9jAEWn
|
|
|
90
90
|
sourcecode/telemetry/events.py,sha256=oEvvulfsv5GIDWG2174gSS6tNB95w38AIYiYeifGKlE,2294
|
|
91
91
|
sourcecode/telemetry/filters.py,sha256=Asa71oRl7q3Wt_FMwuufIZJFzSYdgRNKS8LHCIyFeYE,4805
|
|
92
92
|
sourcecode/telemetry/transport.py,sha256=KJeIPCPWMdmbCP3ySGs2iUlia34U6vWne2dZsUezesw,1560
|
|
93
|
-
sourcecode-1.35.
|
|
94
|
-
sourcecode-1.35.
|
|
95
|
-
sourcecode-1.35.
|
|
96
|
-
sourcecode-1.35.
|
|
97
|
-
sourcecode-1.35.
|
|
93
|
+
sourcecode-1.35.8.dist-info/METADATA,sha256=LJSPDerXZXrHOmZrrgWCeQJme4iEyM7ePFxC4t3gDh4,21263
|
|
94
|
+
sourcecode-1.35.8.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
|
|
95
|
+
sourcecode-1.35.8.dist-info/entry_points.txt,sha256=ex3F9rmbXeyDIoFQHtkEqTsKSaJow8F0LrVu8XfIktQ,57
|
|
96
|
+
sourcecode-1.35.8.dist-info/licenses/LICENSE,sha256=7DdHrU9Z_3e7dSvq4ISijZNjnuHo5NIHNiHDouMQ9JU,10491
|
|
97
|
+
sourcecode-1.35.8.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|