sourcecode 1.33.22__tar.gz → 1.33.23__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.22 → sourcecode-1.33.23}/PKG-INFO +2 -2
  2. {sourcecode-1.33.22 → sourcecode-1.33.23}/README.md +1 -1
  3. {sourcecode-1.33.22 → sourcecode-1.33.23}/pyproject.toml +1 -1
  4. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/__init__.py +1 -1
  5. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/cli.py +69 -7
  6. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/env_analyzer.py +1 -1
  7. {sourcecode-1.33.22 → sourcecode-1.33.23}/.github/workflows/build-windows.yml +0 -0
  8. {sourcecode-1.33.22 → sourcecode-1.33.23}/.gitignore +0 -0
  9. {sourcecode-1.33.22 → sourcecode-1.33.23}/.ruff.toml +0 -0
  10. {sourcecode-1.33.22 → sourcecode-1.33.23}/CHANGELOG.md +0 -0
  11. {sourcecode-1.33.22 → sourcecode-1.33.23}/CONTRIBUTING.md +0 -0
  12. {sourcecode-1.33.22 → sourcecode-1.33.23}/LICENSE +0 -0
  13. {sourcecode-1.33.22 → sourcecode-1.33.23}/SECURITY.md +0 -0
  14. {sourcecode-1.33.22 → sourcecode-1.33.23}/raw +0 -0
  15. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/adaptive_scanner.py +0 -0
  16. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/architecture_analyzer.py +0 -0
  17. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/architecture_summary.py +0 -0
  18. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/ast_extractor.py +0 -0
  19. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/cache.py +0 -0
  20. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/canonical_ir.py +0 -0
  21. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/classifier.py +0 -0
  22. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/code_notes_analyzer.py +0 -0
  23. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/confidence_analyzer.py +0 -0
  24. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/context_scorer.py +0 -0
  25. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/context_summarizer.py +0 -0
  26. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/contract_model.py +0 -0
  27. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/contract_pipeline.py +0 -0
  28. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/coverage_parser.py +0 -0
  29. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/dependency_analyzer.py +0 -0
  30. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/detectors/__init__.py +0 -0
  31. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/detectors/base.py +0 -0
  32. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/detectors/csproj_parser.py +0 -0
  33. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/detectors/dart.py +0 -0
  34. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/detectors/dotnet.py +0 -0
  35. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/detectors/elixir.py +0 -0
  36. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/detectors/go.py +0 -0
  37. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/detectors/heuristic.py +0 -0
  38. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/detectors/hybrid.py +0 -0
  39. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/detectors/java.py +0 -0
  40. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/detectors/jvm_ext.py +0 -0
  41. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/detectors/nodejs.py +0 -0
  42. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/detectors/parsers.py +0 -0
  43. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/detectors/php.py +0 -0
  44. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/detectors/project.py +0 -0
  45. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/detectors/python.py +0 -0
  46. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/detectors/ruby.py +0 -0
  47. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/detectors/rust.py +0 -0
  48. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/detectors/systems.py +0 -0
  49. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/detectors/terraform.py +0 -0
  50. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/detectors/tooling.py +0 -0
  51. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/doc_analyzer.py +0 -0
  52. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/entrypoint_classifier.py +0 -0
  53. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/error_schema.py +0 -0
  54. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/file_classifier.py +0 -0
  55. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/flow_analyzer.py +0 -0
  56. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/git_analyzer.py +0 -0
  57. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/graph_analyzer.py +0 -0
  58. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/license.py +0 -0
  59. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/mcp/__init__.py +0 -0
  60. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/mcp/onboarding/__init__.py +0 -0
  61. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/mcp/onboarding/applier.py +0 -0
  62. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/mcp/onboarding/backup.py +0 -0
  63. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/mcp/onboarding/detector.py +0 -0
  64. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/mcp/onboarding/planner.py +0 -0
  65. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/mcp/orchestrator.py +0 -0
  66. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/mcp/registry.py +0 -0
  67. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/mcp/runner.py +0 -0
  68. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/mcp/server.py +0 -0
  69. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/mcp_nudge.py +0 -0
  70. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/metrics_analyzer.py +0 -0
  71. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/output_budget.py +0 -0
  72. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/path_filters.py +0 -0
  73. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/pr_comment_renderer.py +0 -0
  74. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/prepare_context.py +0 -0
  75. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/progress.py +0 -0
  76. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/ranking_engine.py +0 -0
  77. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/redactor.py +0 -0
  78. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/relevance_scorer.py +0 -0
  79. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/repo_classifier.py +0 -0
  80. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/repository_ir.py +0 -0
  81. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/ris.py +0 -0
  82. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/runtime_classifier.py +0 -0
  83. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/scanner.py +0 -0
  84. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/schema.py +0 -0
  85. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/semantic_analyzer.py +0 -0
  86. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/serializer.py +0 -0
  87. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/summarizer.py +0 -0
  88. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/telemetry/__init__.py +0 -0
  89. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/telemetry/config.py +0 -0
  90. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/telemetry/consent.py +0 -0
  91. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/telemetry/events.py +0 -0
  92. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/telemetry/filters.py +0 -0
  93. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/telemetry/transport.py +0 -0
  94. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/tree_utils.py +0 -0
  95. {sourcecode-1.33.22 → sourcecode-1.33.23}/src/sourcecode/workspace.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sourcecode
3
- Version: 1.33.22
3
+ Version: 1.33.23
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.22-blue)
42
+ ![Version](https://img.shields.io/badge/version-1.33.23-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.22-blue)
5
+ ![Version](https://img.shields.io/badge/version-1.33.23-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.22"
7
+ version = "1.33.23"
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.22"
3
+ __version__ = "1.33.23"
@@ -1185,6 +1185,16 @@ def main(
1185
1185
 
1186
1186
  _cache_hit_content: Optional[str] = None
1187
1187
  _git_sha = ""
1188
+ # HEAD SHA is diagnostic metadata — compute unconditionally, not tied to cache.
1189
+ try:
1190
+ _sha_r = _sub.run(
1191
+ ["git", "-C", str(target), "rev-parse", "--short", "HEAD"],
1192
+ capture_output=True, text=True, timeout=3,
1193
+ )
1194
+ _git_sha = _sha_r.stdout.strip()
1195
+ except Exception:
1196
+ pass
1197
+
1188
1198
  _core_key = ""
1189
1199
  _view_key = ""
1190
1200
  _core_hash = ""
@@ -1193,12 +1203,6 @@ def main(
1193
1203
 
1194
1204
  if not no_cache:
1195
1205
  try:
1196
- _sha_r = _sub.run(
1197
- ["git", "-C", str(target), "rev-parse", "--short", "HEAD"],
1198
- capture_output=True, text=True, timeout=3,
1199
- )
1200
- _git_sha = _sha_r.stdout.strip()
1201
-
1202
1206
  # Detect actual git root (may be an ancestor of target for monorepos,
1203
1207
  # multi-project repos, or SVN-migrated trees where .git is in a parent).
1204
1208
  # The original "(target / '.git').exists()" check broke these layouts.
@@ -1369,7 +1373,6 @@ def main(
1369
1373
  _cache_hit_content = None # rebuild failed → full analysis
1370
1374
 
1371
1375
  except Exception:
1372
- _git_sha = ""
1373
1376
  _core_key = ""
1374
1377
  _view_key = ""
1375
1378
  _core_hash = ""
@@ -1468,6 +1471,30 @@ def main(
1468
1471
  "generated_at": _cached_generated_at,
1469
1472
  "data_scope": _data_scope,
1470
1473
  })
1474
+ # Patch git_context.uncommitted_files when there are working-tree
1475
+ # changes — the cached body has stale 0 from generation time.
1476
+ if git_context and _uncommitted:
1477
+ try:
1478
+ import json as _json_gc
1479
+ import subprocess as _sub_gc
1480
+ _patched = _json_gc.loads(_cache_hit_content)
1481
+ if "git_context" in _patched:
1482
+ _uc_r = _sub_gc.run(
1483
+ ["git", "-C", str(target), "status", "--porcelain"],
1484
+ capture_output=True, text=True, timeout=3,
1485
+ )
1486
+ _uc_count = len(
1487
+ [l for l in _uc_r.stdout.splitlines() if l.strip()]
1488
+ )
1489
+ _patched["git_context"]["uncommitted_files"] = _uc_count
1490
+ _patched["git_context"]["_stale_fields_refreshed"] = [
1491
+ "uncommitted_files"
1492
+ ]
1493
+ _cache_hit_content = _json_gc.dumps(
1494
+ _patched, indent=2, ensure_ascii=False
1495
+ )
1496
+ except Exception:
1497
+ pass # stale value better than crash
1471
1498
  write_output(_cache_hit_content, output=output)
1472
1499
  if copy and not output:
1473
1500
  _copy_to_clipboard(_cache_hit_content)
@@ -3580,6 +3607,18 @@ def endpoints_cmd(
3580
3607
  "-c",
3581
3608
  help="Copy output to system clipboard after a successful run. No-op when --output is used or clipboard is unavailable.",
3582
3609
  ),
3610
+ path_prefix: Optional[str] = typer.Option(
3611
+ None, "--path-prefix", "-p",
3612
+ help="Filter endpoints whose URL path starts with this prefix. Example: /v1/liquidacion",
3613
+ ),
3614
+ controller: Optional[str] = typer.Option(
3615
+ None, "--controller",
3616
+ help="Filter endpoints from this controller class (substring match). Example: LiquidacionJornada",
3617
+ ),
3618
+ limit: Optional[int] = typer.Option(
3619
+ None, "--limit", "-n",
3620
+ help="Maximum number of endpoints to return.",
3621
+ ),
3583
3622
  ) -> None:
3584
3623
  """Extract REST API endpoint surface from Java source files.
3585
3624
 
@@ -3594,6 +3633,9 @@ def endpoints_cmd(
3594
3633
  sourcecode endpoints /path/to/repo
3595
3634
  sourcecode endpoints . --output endpoints.json
3596
3635
  sourcecode endpoints . --format yaml
3636
+ sourcecode endpoints . --path-prefix /v1/liquidacion
3637
+ sourcecode endpoints . --controller LiquidacionJornada
3638
+ sourcecode endpoints . --limit 10
3597
3639
  """
3598
3640
  target = path.resolve()
3599
3641
  if not target.exists() or not target.is_dir():
@@ -3615,6 +3657,26 @@ def endpoints_cmd(
3615
3657
  except Exception:
3616
3658
  pass
3617
3659
 
3660
+ # Apply filters before serialization.
3661
+ _total_before = data.get("total", len(data.get("endpoints", [])))
3662
+ endpoints_list = data.get("endpoints", [])
3663
+ if path_prefix:
3664
+ endpoints_list = [e for e in endpoints_list if e.get("path", "").startswith(path_prefix)]
3665
+ if controller:
3666
+ _ctrl_lower = controller.lower()
3667
+ endpoints_list = [e for e in endpoints_list if _ctrl_lower in e.get("controller", "").lower()]
3668
+ if limit is not None and limit > 0:
3669
+ endpoints_list = endpoints_list[:limit]
3670
+ if path_prefix or controller or limit is not None:
3671
+ data["endpoints"] = endpoints_list
3672
+ data["total"] = len(endpoints_list)
3673
+ data["_filter"] = {
3674
+ "path_prefix": path_prefix,
3675
+ "controller": controller,
3676
+ "limit": limit,
3677
+ "total_before_filter": _total_before,
3678
+ }
3679
+
3618
3680
  output = _serialize_dict(data, format)
3619
3681
 
3620
3682
  if output_path is not None:
@@ -85,7 +85,7 @@ _PATTERNS: list[tuple[str, re.Pattern]] = [
85
85
  r"""System\.getenv\(\s*["']([A-Z][A-Z0-9_]*)["']\s*\)"""
86
86
  )),
87
87
  ("java_spring_value", re.compile(
88
- r"""@Value\(\s*["']\$\{([A-Z][A-Z0-9_]*)(?::[^}]*)?\}["']\s*\)"""
88
+ r"""@Value\(\s*["']\$\{([A-Za-z][A-Za-z0-9._\-]*)(?::[^}]*)?\}["']\s*\)"""
89
89
  )),
90
90
  ("php_getenv", re.compile(
91
91
  r"""getenv\(\s*["']([A-Z][A-Z0-9_]*)["']\s*\)"""
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes