sourcecode 1.33.6__py3-none-any.whl → 1.33.7__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 CHANGED
@@ -1,3 +1,3 @@
1
1
  """sourcecode — Deterministic codebase context maps for AI coding agents."""
2
2
 
3
- __version__ = "1.33.6"
3
+ __version__ = "1.33.7"
sourcecode/mcp/server.py CHANGED
@@ -598,6 +598,11 @@ def get_ir_summary(repo_path: str = ".") -> dict:
598
598
  on large repos), use the CLI: sourcecode repo-ir <path> --output ir.json
599
599
  Use get_compact_context or get_agent_context for non-Java repos.
600
600
 
601
+ IR access paths (for full IR via CLI):
602
+ nodes → result["graph"]["nodes"] (list of {fqn, type, ...})
603
+ edges → result["graph"]["edges"] (list of {source, target, type})
604
+ Summary mode omits nodes/edges entirely (graph._omitted explains why).
605
+
601
606
  repo_path: absolute path to the Java repository (default: current working directory).
602
607
  """
603
608
  _raw = repo_path
@@ -608,7 +613,14 @@ def get_ir_summary(repo_path: str = ".") -> dict:
608
613
  _path_err = _check_repo_path(repo_path)
609
614
  if _path_err is not None:
610
615
  return _path_err
611
- return _execute(["repo-ir", repo_path, "--summary-only"])
616
+ result = _execute(["repo-ir", repo_path, "--summary-only"])
617
+ if isinstance(result, dict) and "error" not in result:
618
+ result["_ir_access"] = {
619
+ "nodes_path": "result['graph']['nodes']",
620
+ "edges_path": "result['graph']['edges']",
621
+ "note": "nodes/edges omitted in summary mode — use CLI repo-ir --output ir.json for full graph",
622
+ }
623
+ return result
612
624
  except Exception as exc:
613
625
  return _err(
614
626
  f"Internal error: {type(exc).__name__}: {exc} — repo_path recibido: {_raw}",
@@ -1237,6 +1237,10 @@ class TaskContextBuilder:
1237
1237
  limitations=[], confidence="low",
1238
1238
  error_code="no_diff_source",
1239
1239
  error_message=_no_diff_msg,
1240
+ error_hints=[
1241
+ "Add --since <ref> to specify a base commit.",
1242
+ "Examples: --since origin/main | --since HEAD~3 | --since main",
1243
+ ],
1240
1244
  gaps=[_no_diff_msg],
1241
1245
  ci_decision="no_diff_source",
1242
1246
  scope_source=_pr_scope_source,
@@ -2993,7 +2993,7 @@ def extract_java_endpoints(root: Path) -> "dict[str, Any]":
2993
2993
  # Use security_annotations already extracted by _build_route_surface
2994
2994
  # via the canonical _route_security_from_sym extractor.
2995
2995
  security_info = route.get("security_annotations")
2996
- entry["security"] = security_info # always present; None = no security signal
2996
+ entry["security"] = security_info if security_info is not None else {"policy": "none_detected"}
2997
2997
  if security_info:
2998
2998
  # Backward compat: keep required_permission for custom annotation
2999
2999
  if isinstance(security_info, dict) and security_info.get("policy") == "custom_permission":
@@ -3708,9 +3708,15 @@ def _resolve_target(
3708
3708
  """
3709
3709
  # Normalize: strip .java suffix if given a path
3710
3710
  t = target.strip()
3711
+ _is_path_like = "/" in t or "\\" in t or t.endswith(".java")
3711
3712
  if t.endswith(".java"):
3712
3713
  t = t[:-5]
3713
- # Convert file path separators to class name
3714
+ # When given a file path (e.g. src/main/java/org/foo/Bar), extract the class
3715
+ # name (basename) so suffix matching resolves it to the correct FQN.
3716
+ # Path-to-dot conversion (src.main.java.org.foo.Bar) never matches an IR FQN.
3717
+ if _is_path_like and ("/" in t or "\\" in t):
3718
+ import os.path as _osp
3719
+ t = _osp.basename(t.replace("\\", "/"))
3714
3720
  t_class = t.replace("/", ".").replace("\\", ".")
3715
3721
 
3716
3722
  # 1. Exact match
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sourcecode
3
- Version: 1.33.6
3
+ Version: 1.33.7
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
@@ -39,7 +39,7 @@ Description-Content-Type: text/markdown
39
39
 
40
40
  **Persistent structural context and ultra-fast repeated analysis for AI coding agents.**
41
41
 
42
- ![Version](https://img.shields.io/badge/version-1.33.4-blue)
42
+ ![Version](https://img.shields.io/badge/version-1.33.7-blue)
43
43
  ![Python](https://img.shields.io/badge/python-3.10%2B-green)
44
44
 
45
45
  ---
@@ -1,4 +1,4 @@
1
- sourcecode/__init__.py,sha256=nlWaSRIp4YDFp-4K9qjOa7A4V1btxwQms-q412HBvyA,103
1
+ sourcecode/__init__.py,sha256=1FxY3ofkdwrV8K_gc9aQqAWEepqXfZm-yAQCuPW5nBo,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
@@ -29,13 +29,13 @@ sourcecode/metrics_analyzer.py,sha256=m0ENgtqKeBL17kUIK3fmGkgo7UfXBNHxCMj0H_Y5K7
29
29
  sourcecode/output_budget.py,sha256=43307mJEyUPU3MI-QEQoVxrcAvNyUzdzF_SAPgisBQE,6603
30
30
  sourcecode/path_filters.py,sha256=ROFRQ8eSLBEMiixK9f45-RO7um4VEEcjoD5AA4I427I,3739
31
31
  sourcecode/pr_comment_renderer.py,sha256=smHslxiG14lrytCkq5nFrFu-qTHgA-t-LFYfdrfjz2o,14423
32
- sourcecode/prepare_context.py,sha256=aL4WS62wozw9iG_v3UrU00Qc7lGgckUB5RY5ApPblo8,205618
32
+ sourcecode/prepare_context.py,sha256=5TgEEhH7wkwup9ibdGhDNvQRwBpL3BrpqFHaJxRG6NQ,205855
33
33
  sourcecode/progress.py,sha256=qn30sWaHOkjTgXsSBmiPkz7Rsbwc5oSlIe6JNEMYp_k,3149
34
34
  sourcecode/ranking_engine.py,sha256=ZAucq_YX2KkWUuAZf4P0lhtQ_38vEFnUhuGtSZd1S0E,12970
35
35
  sourcecode/redactor.py,sha256=SB4hwIvg8h-hvcqKcDWaZvA-aSyn-at-BIRwa0tUv5E,3227
36
36
  sourcecode/relevance_scorer.py,sha256=MYF4FFkveAQps9SmTeTlh6ODiBz2F--_hWNeHMLtUHQ,8405
37
37
  sourcecode/repo_classifier.py,sha256=FG1vaWKdWXsWdl-S8hjVMiTqcwgaRXkDyvK4rPcOGtQ,22681
38
- sourcecode/repository_ir.py,sha256=WtUPRVrvJju6Lrvm_7iTDk57qJFCAh-LJalLtX8jzIk,155595
38
+ sourcecode/repository_ir.py,sha256=n3QYeCC4VjgVupjTxK3cJ6T6d0xcn-GOTR18tMhT0qg,155993
39
39
  sourcecode/ris.py,sha256=vkIe_v-jjceeb0Adhn-Kw5eFXE_nIkGHflOnQYPycTk,17411
40
40
  sourcecode/runtime_classifier.py,sha256=uTAD6BDCiBLUZEDRfqk718kM4RTT_vAbfkcOI2_Xx58,18432
41
41
  sourcecode/scanner.py,sha256=WdOQ78mMzjR1NjmKTlbxdgwinnCTfAhxCVLBEFQiFHU,8899
@@ -69,7 +69,7 @@ sourcecode/detectors/tooling.py,sha256=8CKbtxwQoABP-WyBRNmdAmHDOvAH57AR1cF4UKuWE
69
69
  sourcecode/mcp/__init__.py,sha256=XU4HfRGbdid8wdUA0x_4f7uKZD1z3mv_XUY_WU_T9Mw,179
70
70
  sourcecode/mcp/orchestrator.py,sha256=BMi1D6liJHI3DXiaC8yeBLLP0wXajpCP3-vnRGqrvnw,26850
71
71
  sourcecode/mcp/runner.py,sha256=YSw2DXEICau6mCBr3Gfia3D_tKxMbRvIIXEh4cHC1SY,1390
72
- sourcecode/mcp/server.py,sha256=QyQxOXA9CXZbEl9ybbL7Vwr9YW18YjTAtKW_z9TocdA,39010
72
+ sourcecode/mcp/server.py,sha256=m_C0LJVQzxlSe0e_gjN5wqzXH-j7TBSpNNQnWM8Ra4g,39648
73
73
  sourcecode/mcp/onboarding/__init__.py,sha256=sj2PWqEBmMc4zBNkomg89WtL0M6S7A9yb7_wAuSWNP4,66
74
74
  sourcecode/mcp/onboarding/applier.py,sha256=B9CneieWTpaDSDIyW3S5nrlRlBpvfqUcgi93-mm_ApQ,2135
75
75
  sourcecode/mcp/onboarding/backup.py,sha256=ihqGOR8QTX8HASRSEDyfFyXr5bkXrygPHamv4p9KTmk,1452
@@ -81,8 +81,8 @@ sourcecode/telemetry/consent.py,sha256=wLMvGNJeSSyZoNkQXpoUioY6mMv4Qdvuw7S9jAEWn
81
81
  sourcecode/telemetry/events.py,sha256=oEvvulfsv5GIDWG2174gSS6tNB95w38AIYiYeifGKlE,2294
82
82
  sourcecode/telemetry/filters.py,sha256=Asa71oRl7q3Wt_FMwuufIZJFzSYdgRNKS8LHCIyFeYE,4805
83
83
  sourcecode/telemetry/transport.py,sha256=KJeIPCPWMdmbCP3ySGs2iUlia34U6vWne2dZsUezesw,1560
84
- sourcecode-1.33.6.dist-info/METADATA,sha256=LLg8G7P4foz_LBXFecU6K_eoolBXDiPKhrRNr86avik,16440
85
- sourcecode-1.33.6.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
86
- sourcecode-1.33.6.dist-info/entry_points.txt,sha256=ex3F9rmbXeyDIoFQHtkEqTsKSaJow8F0LrVu8XfIktQ,57
87
- sourcecode-1.33.6.dist-info/licenses/LICENSE,sha256=7DdHrU9Z_3e7dSvq4ISijZNjnuHo5NIHNiHDouMQ9JU,10491
88
- sourcecode-1.33.6.dist-info/RECORD,,
84
+ sourcecode-1.33.7.dist-info/METADATA,sha256=AOgEqdDTfYhRdBee0gHEvfr_hicz4N8Ex5hH0NTMAKc,16440
85
+ sourcecode-1.33.7.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
86
+ sourcecode-1.33.7.dist-info/entry_points.txt,sha256=ex3F9rmbXeyDIoFQHtkEqTsKSaJow8F0LrVu8XfIktQ,57
87
+ sourcecode-1.33.7.dist-info/licenses/LICENSE,sha256=7DdHrU9Z_3e7dSvq4ISijZNjnuHo5NIHNiHDouMQ9JU,10491
88
+ sourcecode-1.33.7.dist-info/RECORD,,