sourcecode 1.33.8__tar.gz → 1.33.10__tar.gz

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.
Files changed (95) hide show
  1. {sourcecode-1.33.8 → sourcecode-1.33.10}/PKG-INFO +2 -2
  2. {sourcecode-1.33.8 → sourcecode-1.33.10}/README.md +1 -1
  3. {sourcecode-1.33.8 → sourcecode-1.33.10}/pyproject.toml +1 -1
  4. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/__init__.py +1 -1
  5. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/canonical_ir.py +6 -1
  6. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/mcp/server.py +3 -3
  7. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/repository_ir.py +66 -2
  8. {sourcecode-1.33.8 → sourcecode-1.33.10}/.github/workflows/build-windows.yml +0 -0
  9. {sourcecode-1.33.8 → sourcecode-1.33.10}/.gitignore +0 -0
  10. {sourcecode-1.33.8 → sourcecode-1.33.10}/.ruff.toml +0 -0
  11. {sourcecode-1.33.8 → sourcecode-1.33.10}/CHANGELOG.md +0 -0
  12. {sourcecode-1.33.8 → sourcecode-1.33.10}/CONTRIBUTING.md +0 -0
  13. {sourcecode-1.33.8 → sourcecode-1.33.10}/LICENSE +0 -0
  14. {sourcecode-1.33.8 → sourcecode-1.33.10}/SECURITY.md +0 -0
  15. {sourcecode-1.33.8 → sourcecode-1.33.10}/raw +0 -0
  16. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/adaptive_scanner.py +0 -0
  17. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/architecture_analyzer.py +0 -0
  18. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/architecture_summary.py +0 -0
  19. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/ast_extractor.py +0 -0
  20. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/cache.py +0 -0
  21. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/classifier.py +0 -0
  22. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/cli.py +0 -0
  23. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/code_notes_analyzer.py +0 -0
  24. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/confidence_analyzer.py +0 -0
  25. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/context_scorer.py +0 -0
  26. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/context_summarizer.py +0 -0
  27. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/contract_model.py +0 -0
  28. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/contract_pipeline.py +0 -0
  29. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/coverage_parser.py +0 -0
  30. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/dependency_analyzer.py +0 -0
  31. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/detectors/__init__.py +0 -0
  32. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/detectors/base.py +0 -0
  33. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/detectors/csproj_parser.py +0 -0
  34. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/detectors/dart.py +0 -0
  35. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/detectors/dotnet.py +0 -0
  36. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/detectors/elixir.py +0 -0
  37. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/detectors/go.py +0 -0
  38. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/detectors/heuristic.py +0 -0
  39. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/detectors/hybrid.py +0 -0
  40. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/detectors/java.py +0 -0
  41. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/detectors/jvm_ext.py +0 -0
  42. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/detectors/nodejs.py +0 -0
  43. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/detectors/parsers.py +0 -0
  44. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/detectors/php.py +0 -0
  45. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/detectors/project.py +0 -0
  46. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/detectors/python.py +0 -0
  47. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/detectors/ruby.py +0 -0
  48. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/detectors/rust.py +0 -0
  49. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/detectors/systems.py +0 -0
  50. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/detectors/terraform.py +0 -0
  51. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/detectors/tooling.py +0 -0
  52. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/doc_analyzer.py +0 -0
  53. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/entrypoint_classifier.py +0 -0
  54. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/env_analyzer.py +0 -0
  55. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/error_schema.py +0 -0
  56. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/file_classifier.py +0 -0
  57. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/flow_analyzer.py +0 -0
  58. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/git_analyzer.py +0 -0
  59. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/graph_analyzer.py +0 -0
  60. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/license.py +0 -0
  61. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/mcp/__init__.py +0 -0
  62. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/mcp/onboarding/__init__.py +0 -0
  63. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/mcp/onboarding/applier.py +0 -0
  64. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/mcp/onboarding/backup.py +0 -0
  65. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/mcp/onboarding/detector.py +0 -0
  66. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/mcp/onboarding/planner.py +0 -0
  67. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/mcp/orchestrator.py +0 -0
  68. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/mcp/registry.py +0 -0
  69. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/mcp/runner.py +0 -0
  70. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/mcp_nudge.py +0 -0
  71. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/metrics_analyzer.py +0 -0
  72. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/output_budget.py +0 -0
  73. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/path_filters.py +0 -0
  74. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/pr_comment_renderer.py +0 -0
  75. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/prepare_context.py +0 -0
  76. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/progress.py +0 -0
  77. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/ranking_engine.py +0 -0
  78. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/redactor.py +0 -0
  79. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/relevance_scorer.py +0 -0
  80. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/repo_classifier.py +0 -0
  81. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/ris.py +0 -0
  82. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/runtime_classifier.py +0 -0
  83. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/scanner.py +0 -0
  84. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/schema.py +0 -0
  85. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/semantic_analyzer.py +0 -0
  86. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/serializer.py +0 -0
  87. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/summarizer.py +0 -0
  88. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/telemetry/__init__.py +0 -0
  89. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/telemetry/config.py +0 -0
  90. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/telemetry/consent.py +0 -0
  91. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/telemetry/events.py +0 -0
  92. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/telemetry/filters.py +0 -0
  93. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/telemetry/transport.py +0 -0
  94. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/tree_utils.py +0 -0
  95. {sourcecode-1.33.8 → sourcecode-1.33.10}/src/sourcecode/workspace.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sourcecode
3
- Version: 1.33.8
3
+ Version: 1.33.10
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.8-blue)
42
+ ![Version](https://img.shields.io/badge/version-1.33.10-blue)
43
43
  ![Python](https://img.shields.io/badge/python-3.10%2B-green)
44
44
 
45
45
  ---
@@ -2,7 +2,7 @@
2
2
 
3
3
  **Persistent structural context and ultra-fast repeated analysis for AI coding agents.**
4
4
 
5
- ![Version](https://img.shields.io/badge/version-1.33.8-blue)
5
+ ![Version](https://img.shields.io/badge/version-1.33.10-blue)
6
6
  ![Python](https://img.shields.io/badge/python-3.10%2B-green)
7
7
 
8
8
  ---
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "sourcecode"
7
- version = "1.33.8"
7
+ version = "1.33.10"
8
8
  description = "Persistent structural context and ultra-fast repeated analysis for AI coding agents"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"
@@ -1,3 +1,3 @@
1
1
  """sourcecode — Deterministic codebase context maps for AI coding agents."""
2
2
 
3
- __version__ = "1.33.8"
3
+ __version__ = "1.33.10"
@@ -445,10 +445,15 @@ def project_endpoint_surface(cir: CanonicalRepositoryIR) -> dict:
445
445
  # Backward compat: top-level required_permission for custom annotation
446
446
  if ep.security.policy == "custom_permission":
447
447
  entry["required_permission"] = ep.security.required_permission
448
+ else:
449
+ entry["security"] = {"policy": "none_detected"}
448
450
 
449
451
  endpoints.append(entry)
450
452
 
451
- no_security_signal = sum(1 for e in endpoints if "security" not in e)
453
+ no_security_signal = sum(
454
+ 1 for e in endpoints
455
+ if e.get("security", {}).get("policy") == "none_detected"
456
+ )
452
457
  return {
453
458
  "endpoints": endpoints,
454
459
  "total": len(endpoints),
@@ -524,10 +524,10 @@ def get_endpoints(repo_path: str = ".") -> dict:
524
524
 
525
525
  Maps to: sourcecode endpoints <repo_path>
526
526
  Returns: endpoints list with method, path, controller, handler fields;
527
- security dict when authorization annotations are present
528
- (policy: roles_allowed|permit_all|deny_all|authenticated|...);
527
+ security dict always present (policy: roles_allowed|permit_all|deny_all|
528
+ authenticated|...|none_detected); none_detected = no auth annotation found.
529
529
  total (int), no_security_signal (int), and security_model (str) fields.
530
- no_security_signal counts endpoints with no recognized auth annotation.
530
+ no_security_signal counts endpoints where security.policy == "none_detected".
531
531
  security_model values: "filter_based" (centralized Spring Security config —
532
532
  high no_security_signal is expected and does NOT mean endpoints are unprotected),
533
533
  "annotation_based" (per-endpoint annotations only), "mixed" (both),
@@ -232,6 +232,12 @@ _INJECT_ANNOTATIONS: frozenset[str] = frozenset({
232
232
  "@Autowired", "@Inject", "@Value", "@Qualifier", "@Resource",
233
233
  })
234
234
 
235
+ # Lombok annotations that generate constructors injecting fields
236
+ _LOMBOK_CTOR_ANNOTATIONS: frozenset[str] = frozenset({
237
+ "@RequiredArgsConstructor", # injects private final fields
238
+ "@AllArgsConstructor", # injects all non-static fields
239
+ })
240
+
235
241
  _JAVA_ROLE_MAP: dict[str, str] = {
236
242
  # Spring MVC / Spring Boot
237
243
  "@RestController": "controller",
@@ -934,6 +940,58 @@ def _build_relations(
934
940
  )},
935
941
  ))
936
942
 
943
+ # ── Constructor injection ─────────────────────────────────────────────────
944
+ # Spring 4.3+ omits @Autowired when there is a single constructor.
945
+ # Both annotated and bare constructors get injects edges from ClassName#<init>
946
+ # to each resolvable parameter type so the reverse graph can propagate impact.
947
+ for sym in symbols:
948
+ if sym.symbol_kind != "constructor" or not sym.param_types:
949
+ continue
950
+ for simple_type in sym.param_types:
951
+ base = re.sub(r'<.*', '', simple_type).strip()
952
+ fqn = import_map.get(base)
953
+ if fqn:
954
+ edges.append(RelationEdge(
955
+ from_symbol=sym.symbol,
956
+ to_symbol=fqn,
957
+ type="injects",
958
+ confidence="high",
959
+ evidence={"type": "constructor_param", "value": simple_type},
960
+ ))
961
+
962
+ # ── Lombok constructor injection ──────────────────────────────────────────
963
+ # @RequiredArgsConstructor: injects all private final fields.
964
+ # @AllArgsConstructor: injects all non-static fields.
965
+ # No explicit constructor symbol exists; edges are emitted from the class FQN.
966
+ for sym in symbols:
967
+ if sym.type not in ("class", "interface"):
968
+ continue
969
+ _has_req = "@RequiredArgsConstructor" in sym.annotations
970
+ _has_all = "@AllArgsConstructor" in sym.annotations
971
+ if not (_has_req or _has_all):
972
+ continue
973
+ _lombok_ann = "@RequiredArgsConstructor" if _has_req else "@AllArgsConstructor"
974
+ for _line in source.splitlines():
975
+ fld = _FIELD_DECL_RE.match(_line.strip())
976
+ if not fld:
977
+ continue
978
+ _mods = _parse_modifier_str(fld.group("modifiers") or "")
979
+ if "static" in _mods:
980
+ continue
981
+ if _has_req and "final" not in _mods:
982
+ continue
983
+ _ftype = fld.group("type").strip()
984
+ _base = re.sub(r'<.*', '', _ftype).strip()
985
+ _fqn = import_map.get(_base)
986
+ if _fqn:
987
+ edges.append(RelationEdge(
988
+ from_symbol=sym.symbol,
989
+ to_symbol=_fqn,
990
+ type="injects",
991
+ confidence="medium",
992
+ evidence={"type": "lombok_constructor", "value": _lombok_ann},
993
+ ))
994
+
937
995
  for m in re.finditer(
938
996
  r'(?:class|interface)\s+(\w+)(?:\s+extends\s+([\w.<>?,\s]+?))?'
939
997
  r'(?:\s+implements\s+([\w.<>?,\s]+?))?\s*\{',
@@ -3015,7 +3073,10 @@ def extract_java_endpoints(root: Path) -> "dict[str, Any]":
3015
3073
  # "no_security_signal" = no recognized security annotation at method OR class level.
3016
3074
  # Note: repos may use framework-level security (e.g. Keycloak itself) with no
3017
3075
  # per-endpoint annotations — this count reflects annotation-based coverage only.
3018
- no_security_signal = sum(1 for e in endpoints if not e.get("security"))
3076
+ no_security_signal = sum(
3077
+ 1 for e in endpoints
3078
+ if e.get("security", {}).get("policy") == "none_detected"
3079
+ )
3019
3080
 
3020
3081
  # Detect filter-based security: centralized Spring Security config class.
3021
3082
  # When present, high no_security_signal is expected — security is enforced by
@@ -3034,7 +3095,10 @@ def extract_java_endpoints(root: Path) -> "dict[str, Any]":
3034
3095
  for sym in _class_syms
3035
3096
  )
3036
3097
  )
3037
- _has_annotation_security = any(e.get("security") for e in endpoints)
3098
+ _has_annotation_security = any(
3099
+ e.get("security", {}).get("policy") != "none_detected"
3100
+ for e in endpoints
3101
+ )
3038
3102
  if _filter_based and _has_annotation_security:
3039
3103
  security_model = "mixed"
3040
3104
  elif _filter_based:
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes