sourcecode 1.32.3__tar.gz → 1.32.4__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 (237) hide show
  1. {sourcecode-1.32.3 → sourcecode-1.32.4}/PKG-INFO +1 -187
  2. {sourcecode-1.32.3 → sourcecode-1.32.4}/pyproject.toml +14 -2
  3. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/__init__.py +1 -1
  4. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/cache.py +109 -9
  5. sourcecode-1.32.4/src/sourcecode/cache.tmp_new +772 -0
  6. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/cli.py +57 -35
  7. sourcecode-1.32.3/.agents/skills/source-command-gsd-join-discord/SKILL.md +0 -24
  8. sourcecode-1.32.3/.agents/skills/source-command-gsd-review-backlog/SKILL.md +0 -63
  9. sourcecode-1.32.3/.agents/skills/source-command-gsd-workstreams/SKILL.md +0 -72
  10. sourcecode-1.32.3/.continue-here.md +0 -106
  11. sourcecode-1.32.3/.sourcecode-cache/snapshot-3b5997a-fa5c742c.json +0 -261
  12. sourcecode-1.32.3/AUDIT_REAL_REPOS.md +0 -539
  13. sourcecode-1.32.3/AUDIT_v1.31.23.md +0 -660
  14. sourcecode-1.32.3/docs/PRODUCT_AUDIT.md +0 -170
  15. sourcecode-1.32.3/docs/PRODUCT_TIERS.md +0 -112
  16. sourcecode-1.32.3/docs/USER_GUIDE.md +0 -371
  17. sourcecode-1.32.3/docs/privacy.md +0 -182
  18. sourcecode-1.32.3/docs/schema.md +0 -894
  19. sourcecode-1.32.3/run_cli.py +0 -4
  20. sourcecode-1.32.3/tests/__init__.py +0 -0
  21. sourcecode-1.32.3/tests/conftest.py +0 -14
  22. sourcecode-1.32.3/tests/fixtures/coverage.xml +0 -15
  23. sourcecode-1.32.3/tests/fixtures/fastapi_app/pyproject.toml +0 -4
  24. sourcecode-1.32.3/tests/fixtures/fastapi_app/src/main.py +0 -3
  25. sourcecode-1.32.3/tests/fixtures/go_service/cmd/api/main.go +0 -3
  26. sourcecode-1.32.3/tests/fixtures/go_service/go.mod +0 -3
  27. sourcecode-1.32.3/tests/fixtures/jacoco.xml +0 -14
  28. sourcecode-1.32.3/tests/fixtures/latin1_sample.java +0 -8
  29. sourcecode-1.32.3/tests/fixtures/latin1_sample_iso.java +0 -2
  30. sourcecode-1.32.3/tests/fixtures/lcov.info +0 -16
  31. sourcecode-1.32.3/tests/fixtures/nextjs_app/app/page.tsx +0 -3
  32. sourcecode-1.32.3/tests/fixtures/nextjs_app/package.json +0 -8
  33. sourcecode-1.32.3/tests/fixtures/nextjs_app/pnpm-lock.yaml +0 -1
  34. sourcecode-1.32.3/tests/fixtures/pnpm_monorepo/apps/web/app/page.tsx +0 -3
  35. sourcecode-1.32.3/tests/fixtures/pnpm_monorepo/apps/web/package.json +0 -8
  36. sourcecode-1.32.3/tests/fixtures/pnpm_monorepo/packages/api/main.py +0 -3
  37. sourcecode-1.32.3/tests/fixtures/pnpm_monorepo/packages/api/pyproject.toml +0 -4
  38. sourcecode-1.32.3/tests/fixtures/pnpm_monorepo/pnpm-workspace.yaml +0 -3
  39. sourcecode-1.32.3/tests/fixtures/spring_boot_minimal/pom.xml +0 -33
  40. sourcecode-1.32.3/tests/fixtures/spring_boot_minimal/src/main/java/com/example/ddd/ausente/application/service/FindAusenteService.java +0 -4
  41. sourcecode-1.32.3/tests/fixtures/spring_boot_minimal/src/main/java/com/example/ddd/ausente/domain/entities/Ausente.java +0 -5
  42. sourcecode-1.32.3/tests/fixtures/spring_boot_minimal/src/main/java/com/example/ddd/ausente/infrastructure/rest/AusenteRestController.java +0 -8
  43. sourcecode-1.32.3/tests/fixtures/spring_boot_minimal/src/main/java/com/example/ddd/autocoberturas/application/service/FindAutocoberturasService.java +0 -4
  44. sourcecode-1.32.3/tests/fixtures/spring_boot_minimal/src/main/java/com/example/ddd/autocoberturas/domain/entities/Autocoberturas.java +0 -5
  45. sourcecode-1.32.3/tests/fixtures/spring_boot_minimal/src/main/java/com/example/ddd/autocoberturas/infrastructure/rest/AutocoberturasRestController.java +0 -8
  46. sourcecode-1.32.3/tests/fixtures/spring_boot_minimal/src/main/java/com/example/ddd/calendarioTrabajador/application/service/FindCalendarioTrabajadorService.java +0 -4
  47. sourcecode-1.32.3/tests/fixtures/spring_boot_minimal/src/main/java/com/example/ddd/calendarioTrabajador/domain/entities/CalendarioTrabajador.java +0 -5
  48. sourcecode-1.32.3/tests/fixtures/spring_boot_minimal/src/main/java/com/example/ddd/calendarioTrabajador/infrastructure/rest/CalendarioTrabajadorRestController.java +0 -8
  49. sourcecode-1.32.3/tests/fixtures/spring_boot_minimal/src/main/java/com/example/ddd/departamento/application/service/FindDepartamentoService.java +0 -4
  50. sourcecode-1.32.3/tests/fixtures/spring_boot_minimal/src/main/java/com/example/ddd/departamento/domain/entities/Departamento.java +0 -5
  51. sourcecode-1.32.3/tests/fixtures/spring_boot_minimal/src/main/java/com/example/ddd/departamento/infrastructure/rest/DepartamentoRestController.java +0 -8
  52. sourcecode-1.32.3/tests/fixtures/spring_boot_minimal/src/main/java/com/example/ddd/empleado/application/service/FindEmpleadoService.java +0 -4
  53. sourcecode-1.32.3/tests/fixtures/spring_boot_minimal/src/main/java/com/example/ddd/empleado/domain/entities/Empleado.java +0 -5
  54. sourcecode-1.32.3/tests/fixtures/spring_boot_minimal/src/main/java/com/example/ddd/empleado/infrastructure/rest/EmpleadoRestController.java +0 -8
  55. sourcecode-1.32.3/tests/fixtures/spring_boot_minimal/src/main/java/com/example/demo/DemoApplication.java +0 -11
  56. sourcecode-1.32.3/tests/fixtures/spring_boot_minimal/src/main/java/com/example/demo/config/FilterConfig.java +0 -17
  57. sourcecode-1.32.3/tests/fixtures/spring_boot_minimal/src/main/java/com/example/demo/domain/Health.java +0 -11
  58. sourcecode-1.32.3/tests/fixtures/spring_boot_minimal/src/main/java/com/example/demo/mapper/HealthMapper.java +0 -10
  59. sourcecode-1.32.3/tests/fixtures/spring_boot_minimal/src/main/java/com/example/demo/repository/HealthRepository.java +0 -8
  60. sourcecode-1.32.3/tests/fixtures/spring_boot_minimal/src/main/java/com/example/demo/service/HealthService.java +0 -12
  61. sourcecode-1.32.3/tests/fixtures/spring_boot_minimal/src/main/java/com/example/demo/web/HealthRestController.java +0 -15
  62. sourcecode-1.32.3/tests/fixtures/spring_boot_minimal/src/main/java/com/example/demo/web/NominaRestController.java +0 -16
  63. sourcecode-1.32.3/tests/fixtures/spring_boot_minimal/src/main/resources/application-dev.yml +0 -4
  64. sourcecode-1.32.3/tests/fixtures/spring_boot_minimal/src/main/resources/application.yml +0 -20
  65. sourcecode-1.32.3/tests/fixtures/spring_boot_minimal/src/main/resources/mapper/HealthMapper.xml +0 -8
  66. sourcecode-1.32.3/tests/test_architecture_analyzer.py +0 -168
  67. sourcecode-1.32.3/tests/test_architecture_summary.py +0 -82
  68. sourcecode-1.32.3/tests/test_ast_extractor.py +0 -278
  69. sourcecode-1.32.3/tests/test_audit_fixes.py +0 -840
  70. sourcecode-1.32.3/tests/test_audit_sas_v2.py +0 -506
  71. sourcecode-1.32.3/tests/test_block1_reliability.py +0 -474
  72. sourcecode-1.32.3/tests/test_block2_coverage.py +0 -450
  73. sourcecode-1.32.3/tests/test_block5_quality.py +0 -300
  74. sourcecode-1.32.3/tests/test_broadleaf_fixes.py +0 -433
  75. sourcecode-1.32.3/tests/test_bug_fixes_v1302.py +0 -419
  76. sourcecode-1.32.3/tests/test_bug_fixes_v13115.py +0 -316
  77. sourcecode-1.32.3/tests/test_bug_fixes_v1312.py +0 -239
  78. sourcecode-1.32.3/tests/test_bug_fixes_v13122.py +0 -421
  79. sourcecode-1.32.3/tests/test_bug_fixes_v1313.py +0 -350
  80. sourcecode-1.32.3/tests/test_bug_fixes_v13130.py +0 -449
  81. sourcecode-1.32.3/tests/test_bug_fixes_v1321.py +0 -369
  82. sourcecode-1.32.3/tests/test_bug_fixes_v16.py +0 -332
  83. sourcecode-1.32.3/tests/test_bug_fixes_v2.py +0 -293
  84. sourcecode-1.32.3/tests/test_cache.py +0 -668
  85. sourcecode-1.32.3/tests/test_canonical_ir.py +0 -893
  86. sourcecode-1.32.3/tests/test_classifier.py +0 -126
  87. sourcecode-1.32.3/tests/test_cli.py +0 -98
  88. sourcecode-1.32.3/tests/test_code_notes_analyzer.py +0 -137
  89. sourcecode-1.32.3/tests/test_context_scorer.py +0 -449
  90. sourcecode-1.32.3/tests/test_contract_pipeline.py +0 -263
  91. sourcecode-1.32.3/tests/test_coverage_parser.py +0 -183
  92. sourcecode-1.32.3/tests/test_cross_consistency.py +0 -365
  93. sourcecode-1.32.3/tests/test_dependency_analyzer_node_python.py +0 -111
  94. sourcecode-1.32.3/tests/test_dependency_analyzer_polyglot.py +0 -217
  95. sourcecode-1.32.3/tests/test_dependency_schema.py +0 -54
  96. sourcecode-1.32.3/tests/test_detector_dotnet.py +0 -482
  97. sourcecode-1.32.3/tests/test_detector_go_rust_java.py +0 -88
  98. sourcecode-1.32.3/tests/test_detector_nodejs.py +0 -100
  99. sourcecode-1.32.3/tests/test_detector_php_ruby_dart.py +0 -63
  100. sourcecode-1.32.3/tests/test_detector_python.py +0 -94
  101. sourcecode-1.32.3/tests/test_detector_universal_managed.py +0 -111
  102. sourcecode-1.32.3/tests/test_detector_universal_systems.py +0 -63
  103. sourcecode-1.32.3/tests/test_detectors_base.py +0 -165
  104. sourcecode-1.32.3/tests/test_doc_analyzer_jsdom.py +0 -217
  105. sourcecode-1.32.3/tests/test_doc_analyzer_python.py +0 -360
  106. sourcecode-1.32.3/tests/test_encoding_regression.py +0 -138
  107. sourcecode-1.32.3/tests/test_enterprise_benchmarks.py +0 -1727
  108. sourcecode-1.32.3/tests/test_graph_analyzer_polyglot.py +0 -105
  109. sourcecode-1.32.3/tests/test_graph_analyzer_python_node.py +0 -122
  110. sourcecode-1.32.3/tests/test_graph_schema.py +0 -87
  111. sourcecode-1.32.3/tests/test_hybrid_inference.py +0 -367
  112. sourcecode-1.32.3/tests/test_integration.py +0 -111
  113. sourcecode-1.32.3/tests/test_integration_dependencies.py +0 -90
  114. sourcecode-1.32.3/tests/test_integration_detection.py +0 -78
  115. sourcecode-1.32.3/tests/test_integration_docs.py +0 -284
  116. sourcecode-1.32.3/tests/test_integration_graph_modules.py +0 -121
  117. sourcecode-1.32.3/tests/test_integration_lqn.py +0 -231
  118. sourcecode-1.32.3/tests/test_integration_metrics.py +0 -120
  119. sourcecode-1.32.3/tests/test_integration_multistack.py +0 -65
  120. sourcecode-1.32.3/tests/test_integration_semantics.py +0 -186
  121. sourcecode-1.32.3/tests/test_integration_universal.py +0 -58
  122. sourcecode-1.32.3/tests/test_java_spring_integration.py +0 -318
  123. sourcecode-1.32.3/tests/test_mcp_nudge.py +0 -153
  124. sourcecode-1.32.3/tests/test_mcp_runner.py +0 -65
  125. sourcecode-1.32.3/tests/test_mcp_serve.py +0 -39
  126. sourcecode-1.32.3/tests/test_mcp_tools.py +0 -380
  127. sourcecode-1.32.3/tests/test_metrics_analyzer.py +0 -457
  128. sourcecode-1.32.3/tests/test_output_ux.py +0 -235
  129. sourcecode-1.32.3/tests/test_packaging.py +0 -47
  130. sourcecode-1.32.3/tests/test_phase1_improvements.py +0 -412
  131. sourcecode-1.32.3/tests/test_pipeline_integrity.py +0 -453
  132. sourcecode-1.32.3/tests/test_real_projects.py +0 -69
  133. sourcecode-1.32.3/tests/test_redactor.py +0 -103
  134. sourcecode-1.32.3/tests/test_repository_ir.py +0 -2228
  135. sourcecode-1.32.3/tests/test_scanner.py +0 -159
  136. sourcecode-1.32.3/tests/test_schema.py +0 -326
  137. sourcecode-1.32.3/tests/test_schema_normalization.py +0 -245
  138. sourcecode-1.32.3/tests/test_scoring_calibration.py +0 -574
  139. sourcecode-1.32.3/tests/test_semantic_analyzer_node.py +0 -494
  140. sourcecode-1.32.3/tests/test_semantic_analyzer_python.py +0 -303
  141. sourcecode-1.32.3/tests/test_semantic_import_resolution.py +0 -356
  142. sourcecode-1.32.3/tests/test_semantic_schema.py +0 -130
  143. sourcecode-1.32.3/tests/test_signal_hierarchy.py +0 -534
  144. sourcecode-1.32.3/tests/test_summarizer.py +0 -190
  145. sourcecode-1.32.3/tests/test_surface_honesty.py +0 -339
  146. sourcecode-1.32.3/tests/test_task_differentiation.py +0 -82
  147. sourcecode-1.32.3/tests/test_telemetry.py +0 -335
  148. sourcecode-1.32.3/tests/test_v131_improvements.py +0 -477
  149. sourcecode-1.32.3/tests/test_v1_10_regressions.py +0 -835
  150. sourcecode-1.32.3/tests/test_workspace_analyzer.py +0 -47
  151. {sourcecode-1.32.3 → sourcecode-1.32.4}/.github/workflows/build-windows.yml +0 -0
  152. {sourcecode-1.32.3 → sourcecode-1.32.4}/.gitignore +0 -0
  153. {sourcecode-1.32.3 → sourcecode-1.32.4}/.ruff.toml +0 -0
  154. {sourcecode-1.32.3 → sourcecode-1.32.4}/CHANGELOG.md +0 -0
  155. {sourcecode-1.32.3 → sourcecode-1.32.4}/CONTRIBUTING.md +0 -0
  156. {sourcecode-1.32.3 → sourcecode-1.32.4}/LICENSE +0 -0
  157. {sourcecode-1.32.3 → sourcecode-1.32.4}/README.md +0 -0
  158. {sourcecode-1.32.3 → sourcecode-1.32.4}/SECURITY.md +0 -0
  159. {sourcecode-1.32.3 → sourcecode-1.32.4}/raw +0 -0
  160. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/adaptive_scanner.py +0 -0
  161. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/architecture_analyzer.py +0 -0
  162. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/architecture_summary.py +0 -0
  163. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/ast_extractor.py +0 -0
  164. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/canonical_ir.py +0 -0
  165. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/classifier.py +0 -0
  166. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/code_notes_analyzer.py +0 -0
  167. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/confidence_analyzer.py +0 -0
  168. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/context_scorer.py +0 -0
  169. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/context_summarizer.py +0 -0
  170. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/contract_model.py +0 -0
  171. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/contract_pipeline.py +0 -0
  172. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/coverage_parser.py +0 -0
  173. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/dependency_analyzer.py +0 -0
  174. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/detectors/__init__.py +0 -0
  175. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/detectors/base.py +0 -0
  176. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/detectors/csproj_parser.py +0 -0
  177. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/detectors/dart.py +0 -0
  178. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/detectors/dotnet.py +0 -0
  179. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/detectors/elixir.py +0 -0
  180. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/detectors/go.py +0 -0
  181. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/detectors/heuristic.py +0 -0
  182. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/detectors/hybrid.py +0 -0
  183. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/detectors/java.py +0 -0
  184. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/detectors/jvm_ext.py +0 -0
  185. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/detectors/nodejs.py +0 -0
  186. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/detectors/parsers.py +0 -0
  187. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/detectors/php.py +0 -0
  188. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/detectors/project.py +0 -0
  189. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/detectors/python.py +0 -0
  190. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/detectors/ruby.py +0 -0
  191. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/detectors/rust.py +0 -0
  192. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/detectors/systems.py +0 -0
  193. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/detectors/terraform.py +0 -0
  194. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/detectors/tooling.py +0 -0
  195. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/doc_analyzer.py +0 -0
  196. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/entrypoint_classifier.py +0 -0
  197. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/env_analyzer.py +0 -0
  198. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/file_classifier.py +0 -0
  199. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/flow_analyzer.py +0 -0
  200. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/git_analyzer.py +0 -0
  201. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/graph_analyzer.py +0 -0
  202. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/license.py +0 -0
  203. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/mcp/__init__.py +0 -0
  204. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/mcp/onboarding/__init__.py +0 -0
  205. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/mcp/onboarding/applier.py +0 -0
  206. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/mcp/onboarding/backup.py +0 -0
  207. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/mcp/onboarding/detector.py +0 -0
  208. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/mcp/onboarding/planner.py +0 -0
  209. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/mcp/runner.py +0 -0
  210. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/mcp/server.py +0 -0
  211. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/mcp_nudge.py +0 -0
  212. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/metrics_analyzer.py +0 -0
  213. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/output_budget.py +0 -0
  214. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/path_filters.py +0 -0
  215. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/pr_comment_renderer.py +0 -0
  216. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/prepare_context.py +0 -0
  217. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/progress.py +0 -0
  218. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/ranking_engine.py +0 -0
  219. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/redactor.py +0 -0
  220. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/relevance_scorer.py +0 -0
  221. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/repo_classifier.py +0 -0
  222. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/repository_ir.py +0 -0
  223. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/ris.py +0 -0
  224. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/runtime_classifier.py +0 -0
  225. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/scanner.py +0 -0
  226. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/schema.py +0 -0
  227. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/semantic_analyzer.py +0 -0
  228. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/serializer.py +0 -0
  229. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/summarizer.py +0 -0
  230. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/telemetry/__init__.py +0 -0
  231. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/telemetry/config.py +0 -0
  232. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/telemetry/consent.py +0 -0
  233. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/telemetry/events.py +0 -0
  234. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/telemetry/filters.py +0 -0
  235. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/telemetry/transport.py +0 -0
  236. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/tree_utils.py +0 -0
  237. {sourcecode-1.32.3 → sourcecode-1.32.4}/src/sourcecode/workspace.py +0 -0
@@ -1,193 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sourcecode
3
- Version: 1.32.3
3
+ Version: 1.32.4
4
4
  Summary: Deterministic codebase context for AI coding agents
5
- License: Apache License
6
- Version 2.0, January 2004
7
- http://www.apache.org/licenses/
8
-
9
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
10
-
11
- 1. Definitions.
12
-
13
- "License" shall mean the terms and conditions for use, reproduction,
14
- and distribution as defined by Sections 1 through 9 of this document.
15
-
16
- "Licensor" shall mean the copyright owner or entity authorized by
17
- the copyright owner that is granting the License.
18
-
19
- "Legal Entity" shall mean the union of the acting entity and all
20
- other entities that control, are controlled by, or are under common
21
- control with that entity. For the purposes of this definition,
22
- "control" means (i) the power, direct or indirect, to cause the
23
- direction or management of such entity, whether by contract or
24
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
25
- outstanding shares, or (iii) beneficial ownership of such entity.
26
-
27
- "You" (or "Your") shall mean an individual or Legal Entity
28
- exercising permissions granted by this License.
29
-
30
- "Source" form shall mean the preferred form for making modifications,
31
- including but not limited to software source code, documentation
32
- source, and configuration files.
33
-
34
- "Object" form shall mean any form resulting from mechanical
35
- transformation or translation of a Source form, including but
36
- not limited to compiled object code, generated documentation,
37
- and conversions to other formats.
38
-
39
- "Work" shall mean the work of authorship made available under
40
- the License, as indicated by a copyright notice that is included in
41
- or attached to the work (an example is provided in the Appendix below).
42
-
43
- "Derivative Works" shall mean any work, whether in Source or Object
44
- form, that is based on (or derived from) the Work and for which the
45
- editorial revisions, annotations, elaborations, or other transformations
46
- represent, as a whole, an original work of authorship. For the purposes
47
- of this License, Derivative Works shall not include works that remain
48
- separable from, or merely link (or bind by name) to the interfaces of,
49
- the Work and Derivative Works thereof.
50
-
51
- "Contribution" shall mean, as submitted to the Licensor for inclusion
52
- in the Work by the copyright owner or by an individual or Legal Entity
53
- authorized to submit on behalf of the copyright owner. For the purposes
54
- of this definition, "submit" means any form of electronic, verbal, or
55
- written communication sent to the Licensor or its representatives,
56
- including but not limited to communication on electronic mailing lists,
57
- source code control systems, and issue tracking systems that are managed
58
- by, or on behalf of, the Licensor for the purpose of discussing and
59
- improving the Work, but excluding communication that is conspicuously
60
- marked or designated in writing by the copyright owner as "Not a
61
- Contribution."
62
-
63
- "Contributor" shall mean Licensor and any Legal Entity on behalf of
64
- whom a Contribution has been received by the Licensor and included
65
- within the Work.
66
-
67
- 2. Grant of Copyright License. Subject to the terms and conditions of
68
- this License, each Contributor hereby grants to You a perpetual,
69
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
- copyright license to reproduce, prepare Derivative Works of,
71
- publicly display, publicly perform, sublicense, and distribute the
72
- Work and such Derivative Works in Source or Object form.
73
-
74
- 3. Grant of Patent License. Subject to the terms and conditions of
75
- this License, each Contributor hereby grants to You a perpetual,
76
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
- (except as stated in this section) patent license to make, have made,
78
- use, offer to sell, sell, import, and otherwise transfer the Work,
79
- where such license applies only to those patent claims licensable
80
- by such Contributor that are necessarily infringed by their
81
- Contribution(s) alone or by the combination of their Contribution(s)
82
- with the Work to which such Contribution(s) was submitted. If You
83
- institute patent litigation against any entity (including a cross-claim
84
- or counterclaim in a lawsuit) alleging that the Work or any Contributor
85
- Contribution constitutes direct or contributory patent infringement,
86
- then any patent rights granted to You under this License for that Work
87
- shall terminate as of the date such litigation is filed.
88
-
89
- 4. Redistribution. You may reproduce and distribute copies of the
90
- Work or Derivative Works thereof in any medium, with or without
91
- modifications, and in Source or Object form, provided that You
92
- meet the following conditions:
93
-
94
- (a) You must give any other recipients of the Work or Derivative
95
- Works a copy of this License; and
96
-
97
- (b) You must cause any modified files to carry prominent notices
98
- stating that You changed the files; and
99
-
100
- (c) You must retain, in the Source form of any Derivative Works
101
- that You distribute, all copyright, patent, trademark, and
102
- attribution notices from the Source form of the Work,
103
- excluding those notices that do not pertain to any part of
104
- the Derivative Works; and
105
-
106
- (d) If the Work includes a "NOTICE" text file as part of its
107
- distribution, You must include a readable copy of the
108
- attribution notices contained within such NOTICE file, in
109
- at least one of the following places: within a NOTICE text
110
- file distributed as part of the Derivative Works; within
111
- the Source form or documentation, if provided along with the
112
- Derivative Works; or, within a display generated by the
113
- Derivative Works, if and wherever such third-party notices
114
- normally appear. The contents of the NOTICE file are for
115
- informational purposes only and do not modify the License.
116
- You may add Your own attribution notices within Derivative
117
- Works that You distribute, alongside or in addition to the
118
- NOTICE text from the Work, provided that such additional
119
- attribution notices cannot be construed as modifying the License.
120
-
121
- You may add Your own license statement for Your modifications and
122
- may provide additional grant of rights to use, copy, modify, merge,
123
- publish, distribute, sublicense, and/or sell copies of the
124
- Derivative Works, as separate terms and conditions for their use,
125
- reproduction, and distribution, or alongside or as supplement to
126
- any license terms for such Derivative Works as a whole, provided
127
- Your use, reproduction, and distribution of the Work otherwise
128
- complies with the conditions stated in this License.
129
-
130
- 5. Submission of Contributions. Unless You explicitly state otherwise,
131
- any Contribution intentionally submitted for inclusion in the Work
132
- by You to the Licensor shall be under the terms and conditions of
133
- this License, without any additional terms or conditions.
134
- Notwithstanding the above, nothing herein shall supersede or modify
135
- the terms of any separate license agreement you may have executed
136
- with Licensor regarding such Contributions.
137
-
138
- 6. Trademarks. This License does not grant permission to use the trade
139
- names, trademarks, service marks, or product names of the Licensor,
140
- except as required for reasonable and customary use in describing the
141
- origin of the Work and reproducing the content of the NOTICE file.
142
-
143
- 7. Disclaimer of Warranty. Unless required by applicable law or
144
- agreed to in writing, Licensor provides the Work (and each
145
- Contributor provides its Contributions) on an "AS IS" BASIS,
146
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
- implied, including, without limitation, any warranties or conditions
148
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
- PARTICULAR PURPOSE. You are solely responsible for determining the
150
- appropriateness of using or reproducing the Work and assume any
151
- risks associated with Your exercise of permissions under this License.
152
-
153
- 8. Limitation of Liability. In no event and under no legal theory,
154
- whether in tort (including negligence), contract, or otherwise,
155
- unless required by applicable law (such as deliberate and grossly
156
- negligent acts) or agreed to in writing, shall any Contributor be
157
- liable to You for damages, including any direct, indirect, special,
158
- incidental, or exemplary damages of any character arising as a
159
- result of this License or out of the use or inability to use the
160
- Work (including but not limited to damages for loss of goodwill,
161
- work stoppage, computer failure or malfunction, or all other
162
- commercial damages or losses), even if such Contributor has been
163
- advised of the possibility of such damages.
164
-
165
- 9. Accepting Warranty or Liability. While redistributing the Work or
166
- Derivative Works thereof, You may choose to offer, and charge a fee
167
- for, acceptance of support, warranty, indemnity, or other liability
168
- obligations and/or rights consistent with this License. However, in
169
- accepting such obligations, You may offer such obligations only on
170
- Your own behalf and on Your sole responsibility, not on behalf of
171
- any other Contributor, and only if You agree to indemnify, defend,
172
- and hold each Contributor harmless for any liability incurred by,
173
- or claims asserted against, such Contributor by reason of your
174
- accepting any warranty or additional liability.
175
-
176
- END OF TERMS AND CONDITIONS
177
-
178
- Copyright 2024 sourcecode contributors
179
-
180
- Licensed under the Apache License, Version 2.0 (the "License");
181
- you may not use this file except in compliance with the License.
182
- You may obtain a copy of the License at
183
-
184
- http://www.apache.org/licenses/LICENSE-2.0
185
-
186
- Unless required by applicable law or agreed to in writing, software
187
- distributed under the License is distributed on an "AS IS" BASIS,
188
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
189
- See the License for the specific language governing permissions and
190
- limitations under the License.
191
5
  License-File: LICENSE
192
6
  Keywords: agents,ai,codebase,context,developer-tools,llm
193
7
  Classifier: Development Status :: 4 - Beta
@@ -4,11 +4,12 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "sourcecode"
7
- version = "1.32.3"
7
+ version = "1.32.4"
8
8
  description = "Deterministic codebase context for AI coding agents"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"
11
- license = { file = "LICENSE" }
11
+ license-expression = "Apache-2.0"
12
+ license-files = ["LICENSE"]
12
13
  keywords = ["ai", "llm", "agents", "context", "codebase", "developer-tools"]
13
14
  classifiers = [
14
15
  "Development Status :: 4 - Beta",
@@ -55,6 +56,17 @@ mcp = [
55
56
  module = ["tree_sitter", "tree_sitter_typescript", "tree_sitter_javascript"]
56
57
  ignore_missing_imports = true
57
58
 
59
+ [tool.hatch.build.targets.sdist]
60
+ exclude = [
61
+ "tests/",
62
+ "docs/",
63
+ "/AUDIT*.md",
64
+ "/.agents",
65
+ "/.continue-here.md",
66
+ "/.sourcecode-cache",
67
+ "/run_cli.py",
68
+ ]
69
+
58
70
  [tool.hatch.build.targets.wheel]
59
71
  packages = ["src/sourcecode"]
60
72
 
@@ -1,3 +1,3 @@
1
1
  """sourcecode — Deterministic codebase context maps for AI coding agents."""
2
2
 
3
- __version__ = "1.32.3"
3
+ __version__ = "1.32.4"
@@ -92,6 +92,8 @@ _CAS_FIELDS: frozenset[str] = frozenset([
92
92
  _CAS_THRESHOLD: int = 4096
93
93
 
94
94
  _DEFAULT_KEEP_COMMITS: int = 5
95
+ _DEFAULT_MAX_CORES: int = 20
96
+ _DEFAULT_MAX_SIZE_MB: int = 50
95
97
 
96
98
  # Matches "snapshot-<hex_commit>-<hex_flags>.json.gz"
97
99
  _SNAPSHOT_RE = re.compile(r"^snapshot-([0-9a-f]+)-[0-9a-f]+\.json\.gz$")
@@ -124,6 +126,58 @@ def cache_dir(repo_root: Path) -> Path:
124
126
  return base / repo_id(repo_root)
125
127
 
126
128
 
129
+ # ---------------------------------------------------------------------------
130
+ # Public API — observability
131
+ # ---------------------------------------------------------------------------
132
+
133
+ def status(repo_root: Path) -> dict[str, Any]:
134
+ """Return a stats dict describing the current cache state for *repo_root*.
135
+
136
+ Keys: ``cache_dir``, ``cores``, ``snapshots``, ``views``, ``cas_blobs``,
137
+ ``total_size_bytes``, ``total_size_mb``.
138
+ """
139
+ cache_d = cache_dir(repo_root)
140
+ if not cache_d.exists():
141
+ return {
142
+ "cache_dir": str(cache_d),
143
+ "cores": 0, "snapshots": 0, "views": 0, "cas_blobs": 0,
144
+ "total_size_bytes": 0, "total_size_mb": 0.0,
145
+ }
146
+ cores = list(cache_d.glob("core-*.json.gz"))
147
+ snapshots = list(cache_d.glob("snapshot-*.json.gz"))
148
+ views = list(cache_d.glob("view-*.json.gz"))
149
+ cas_blobs = list((_cas_dir(cache_d)).glob("*.gz")) if _cas_dir(cache_d).exists() else []
150
+ all_files = cores + snapshots + views + cas_blobs
151
+ total_bytes = sum(f.stat().st_size for f in all_files if f.exists())
152
+ return {
153
+ "cache_dir": str(cache_d),
154
+ "cores": len(cores),
155
+ "snapshots": len(snapshots),
156
+ "views": len(views),
157
+ "cas_blobs": len(cas_blobs),
158
+ "total_size_bytes": total_bytes,
159
+ "total_size_mb": round(total_bytes / (1024 * 1024), 2),
160
+ }
161
+
162
+
163
+ def clear(repo_root: Path) -> int:
164
+ """Delete all cache files for *repo_root*. Returns the number of files removed."""
165
+ cache_d = cache_dir(repo_root)
166
+ if not cache_d.exists():
167
+ return 0
168
+ removed = 0
169
+ for pattern in ("core-*.json.gz", "snapshot-*.json.gz", "view-*.json.gz"):
170
+ for f in cache_d.glob(pattern):
171
+ _safe_unlink(f)
172
+ removed += 1
173
+ cas_d = _cas_dir(cache_d)
174
+ if cas_d.exists():
175
+ for f in cas_d.glob("*.gz"):
176
+ _safe_unlink(f)
177
+ removed += 1
178
+ return removed
179
+
180
+
127
181
  # ---------------------------------------------------------------------------
128
182
  # Public API — read / write
129
183
  # ---------------------------------------------------------------------------
@@ -193,7 +247,7 @@ def write(
193
247
  try:
194
248
  cache_d.mkdir(parents=True, exist_ok=True)
195
249
  payload = _build_envelope(cache_key, content, fmt, layers or {}, cache_d)
196
- dest.write_bytes(payload)
250
+ _atomic_write(dest, payload)
197
251
  except Exception:
198
252
  return # non-fatal
199
253
 
@@ -275,7 +329,7 @@ def write_core(repo_root: Path, core_key: str, core_data: dict[str, Any]) -> str
275
329
  json.dumps(envelope, ensure_ascii=False).encode("utf-8"),
276
330
  compresslevel=6,
277
331
  )
278
- dest.write_bytes(payload)
332
+ _atomic_write(dest, payload)
279
333
  except Exception:
280
334
  pass
281
335
 
@@ -327,7 +381,7 @@ def write_view(
327
381
  try:
328
382
  cache_d.mkdir(parents=True, exist_ok=True)
329
383
  payload = _build_envelope(view_key, content, fmt, layers or {}, cache_d)
330
- dest.write_bytes(payload)
384
+ _atomic_write(dest, payload)
331
385
  except Exception:
332
386
  pass
333
387
 
@@ -529,12 +583,16 @@ def _cas_restore(
529
583
  def _gc(cache_d: Path) -> None:
530
584
  """Evict old snapshots/cores/views and sweep orphaned CAS blobs.
531
585
 
532
- Keeps snapshots and cores from the last ``SOURCECODE_CACHE_KEEP_COMMITS``
533
- distinct git commits (determined by newest mtime within each commit group).
534
- Views are then pruned: a view survives only when its core-hash prefix
535
- matches a core file in the surviving set.
586
+ Three eviction passes (all non-fatal):
587
+ 1. Commit-based: keep only last SOURCECODE_CACHE_KEEP_COMMITS distinct SHAs.
588
+ 2. Core-count: keep at most SOURCECODE_CACHE_MAX_CORES core files (LRU).
589
+ 3. Size-based: if total cache exceeds SOURCECODE_CACHE_MAX_SIZE_MB, evict
590
+ oldest core+snapshot files until under budget.
591
+ Views and CAS blobs are swept after each pass.
536
592
  """
537
593
  keep = int(os.environ.get("SOURCECODE_CACHE_KEEP_COMMITS", _DEFAULT_KEEP_COMMITS))
594
+ max_cores = int(os.environ.get("SOURCECODE_CACHE_MAX_CORES", _DEFAULT_MAX_CORES))
595
+ max_size_bytes = int(os.environ.get("SOURCECODE_CACHE_MAX_SIZE_MB", _DEFAULT_MAX_SIZE_MB)) * 1024 * 1024
538
596
 
539
597
  try:
540
598
  all_snapshots = list(cache_d.glob("snapshot-*.json.gz"))
@@ -544,7 +602,7 @@ def _gc(cache_d: Path) -> None:
544
602
  if not all_snapshots and not all_cores and not all_views:
545
603
  return
546
604
 
547
- # Group snapshot + core files by commit SHA
605
+ # ── Pass 1: commit-based eviction ──────────────────────────────────
548
606
  groups: dict[str, list[Path]] = {}
549
607
  for f in all_snapshots:
550
608
  m = _SNAPSHOT_RE.match(f.name)
@@ -558,7 +616,6 @@ def _gc(cache_d: Path) -> None:
558
616
  surviving: list[Path]
559
617
 
560
618
  if keep <= 0 or len(groups) <= keep:
561
- # No eviction needed — but still sweep views + CAS
562
619
  surviving = all_snapshots + all_cores
563
620
  else:
564
621
  def _newest_mtime(commit: str) -> float:
@@ -573,7 +630,33 @@ def _gc(cache_d: Path) -> None:
573
630
  for f in groups[commit]:
574
631
  _safe_unlink(f)
575
632
 
633
+ # ── Pass 2: per-repo core count cap ────────────────────────────────
634
+ if max_cores > 0:
635
+ surviving_cores = [p for p in surviving if p.name.startswith("core-") and p.exists()]
636
+ if len(surviving_cores) > max_cores:
637
+ surviving_cores.sort(key=lambda p: p.stat().st_mtime, reverse=True)
638
+ for evict in surviving_cores[max_cores:]:
639
+ _safe_unlink(evict)
640
+ surviving = [p for p in surviving if p != evict]
641
+
642
+ # ── Pass 3: total size cap ──────────────────────────────────────────
643
+ if max_size_bytes > 0:
644
+ size_candidates = [p for p in surviving if p.exists()]
645
+ total = sum(p.stat().st_size for p in size_candidates if not p.name.startswith("view-"))
646
+ if total > max_size_bytes:
647
+ # Sort oldest-first; evict core+snapshot files until under budget
648
+ size_candidates.sort(key=lambda p: p.stat().st_mtime)
649
+ for evict in size_candidates:
650
+ if evict.name.startswith("view-"):
651
+ continue
652
+ total -= evict.stat().st_size if evict.exists() else 0
653
+ _safe_unlink(evict)
654
+ surviving = [p for p in surviving if p != evict]
655
+ if total <= max_size_bytes:
656
+ break
657
+
576
658
  # Prune view files whose core hash is no longer in the surviving set
659
+ all_views = list(cache_d.glob("view-*.json.gz"))
577
660
  _gc_views(cache_d, surviving, all_views)
578
661
 
579
662
  # Sweep orphaned CAS blobs (surviving snapshots + view files may ref them)
@@ -648,6 +731,23 @@ def _gc_cas(cache_d: Path, surviving_snapshots: list[Path]) -> None:
648
731
  # Utilities
649
732
  # ---------------------------------------------------------------------------
650
733
 
734
+ def _atomic_write(dest: Path, data: bytes) -> None:
735
+ """Write *data* to *dest* atomically via a sibling .tmp file + rename.
736
+
737
+ On POSIX, ``Path.replace()`` is a single ``rename(2)`` syscall — the
738
+ destination either has the old content or the new content, never a partial
739
+ write. The .tmp suffix keeps the partial file out of glob patterns used
740
+ by the cache reader and GC.
741
+ """
742
+ tmp = dest.with_suffix(".tmp")
743
+ try:
744
+ tmp.write_bytes(data)
745
+ tmp.replace(dest)
746
+ except Exception:
747
+ _safe_unlink(tmp)
748
+ raise
749
+
750
+
651
751
  def _safe_unlink(path: Path) -> None:
652
752
  try:
653
753
  path.unlink(missing_ok=True)