codebeacon 0.6.0__tar.gz → 0.6.2__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.
- codebeacon-0.6.2/.cursorrules +74 -0
- codebeacon-0.6.2/AGENTS.md +74 -0
- codebeacon-0.6.2/CLAUDE.md +79 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/PKG-INFO +17 -1
- {codebeacon-0.6.0 → codebeacon-0.6.2}/README.de.md +16 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/README.es.md +16 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/README.fr.md +16 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/README.ja.md +16 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/README.ko.md +16 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/README.md +16 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/README.pt-BR.md +16 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/README.zh-CN.md +16 -0
- codebeacon-0.6.2/codebeacon/__init__.py +1 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/affected.py +10 -1
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/cli.py +23 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/common/safety.py +33 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/common/types.py +2 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/contextmap/generator.py +24 -1
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/discover/detector.py +5 -5
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/discover/ignore.py +47 -10
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/export/mcp.py +4 -4
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/export/obsidian.py +34 -13
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/extract/base.py +7 -1
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/extract/dotnet.py +8 -2
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/extract/queries/actix.scm +16 -6
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/extract/queries/angular.scm +58 -2
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/extract/queries/aspnet.scm +18 -11
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/extract/queries/ktor.scm +11 -6
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/extract/queries/laravel.scm +6 -6
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/extract/queries/nestjs.scm +18 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/extract/queries/vapor.scm +13 -13
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/extract/routes.py +26 -9
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/extract/services.py +130 -36
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/graph/build.py +73 -1
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/graph/cluster.py +48 -13
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/graph/write.py +55 -1
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/pipeline.py +3 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/semantic_pipeline.py +1 -1
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/wiki/generator.py +10 -2
- {codebeacon-0.6.0 → codebeacon-0.6.2}/pyproject.toml +1 -1
- codebeacon-0.6.2/tests/test_audit_bugfixes.py +338 -0
- codebeacon-0.6.2/tests/test_cli_dispatch.py +76 -0
- codebeacon-0.6.2/tests/test_contextmap_paths.py +33 -0
- codebeacon-0.6.2/tests/test_graphify_parity_fixes.py +335 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/tests/test_safety_and_writes.py +50 -0
- codebeacon-0.6.0/.cursorrules +0 -61
- codebeacon-0.6.0/AGENTS.md +0 -61
- codebeacon-0.6.0/CLAUDE.md +0 -71
- codebeacon-0.6.0/codebeacon/__init__.py +0 -1
- codebeacon-0.6.0/tests/test_cli_dispatch.py +0 -43
- {codebeacon-0.6.0 → codebeacon-0.6.2}/.github/CODEOWNERS +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/.github/dependabot.yml +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/.github/workflows/ci.yml +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/.github/workflows/release.yml +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/.gitignore +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/LICENSE +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/__main__.py +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/cache.py +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/common/__init__.py +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/common/filters.py +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/common/symbols.py +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/config.py +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/contextmap/__init__.py +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/diagnostics.py +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/discover/__init__.py +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/discover/scanner.py +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/export/__init__.py +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/export/callflow_html.py +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/export/hooks.py +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/export/merge.py +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/export/tree_html.py +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/extract/__init__.py +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/extract/components.py +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/extract/dependencies.py +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/extract/entities.py +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/extract/queries/README.md +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/extract/queries/django.scm +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/extract/queries/express.scm +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/extract/queries/fastapi.scm +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/extract/queries/flask.scm +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/extract/queries/gin.scm +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/extract/queries/rails.scm +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/extract/queries/react.scm +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/extract/queries/spring_boot.scm +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/extract/queries/svelte.scm +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/extract/queries/tauri.scm +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/extract/queries/vue.scm +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/extract/semantic.py +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/graph/__init__.py +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/graph/analyze.py +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/graph/enrich.py +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/knowledge/__init__.py +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/knowledge/generator.py +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/plugins/__init__.py +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/plugins/githooks.py +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/plugins/skills.py +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/skill/SKILL.md +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/wave.py +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/wiki/__init__.py +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/wiki/index.py +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon/wiki/templates.py +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/codebeacon.yaml.example +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/docs/TRANSLATION_STATUS.md +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/public-plan.md +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/skill/install.py +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/tests/__init__.py +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/tests/conftest.py +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/tests/fixtures/actix/main.rs +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/tests/fixtures/angular/app.component.ts +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/tests/fixtures/aspnet/UserController.cs +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/tests/fixtures/django/views.py +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/tests/fixtures/express/userRouter.js +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/tests/fixtures/fastapi/main.py +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/tests/fixtures/flask/app.py +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/tests/fixtures/gin/main.go +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/tests/fixtures/integration_workspace/api-python/pyproject.toml +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/tests/fixtures/integration_workspace/api-python/src/__init__.py +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/tests/fixtures/integration_workspace/api-python/src/main.py +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/tests/fixtures/integration_workspace/api-python/src/services.py +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/tests/fixtures/integration_workspace/web/package.json +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/tests/fixtures/integration_workspace/web/src/UserPage.tsx +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/tests/fixtures/ktor/UserRoutes.kt +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/tests/fixtures/laravel/UserController.php +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/tests/fixtures/nestjs/user.controller.ts +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/tests/fixtures/rails/users_controller.rb +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/tests/fixtures/react/UserPage.tsx +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/tests/fixtures/spring_boot/UserController.java +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/tests/fixtures/sveltekit/+page.svelte +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/tests/fixtures/vapor/routes.swift +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/tests/fixtures/vue/UserList.vue +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/tests/integration/__init__.py +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/tests/integration/test_full_pipeline.py +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/tests/test_affected.py +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/tests/test_affected_wiki.py +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/tests/test_dependencies.py +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/tests/test_diagnostics.py +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/tests/test_discover.py +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/tests/test_dotnet.py +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/tests/test_entities.py +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/tests/test_filters.py +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/tests/test_graph.py +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/tests/test_knowledge.py +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/tests/test_known_bugs.py +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/tests/test_mcp_and_semantic.py +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/tests/test_optional_grammars.py +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/tests/test_pipeline_module.py +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/tests/test_plugins.py +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/tests/test_resolve.py +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/tests/test_routes.py +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/tests/test_scanner_sensitive.py +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/tests/test_semantic.py +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/tests/test_semantic_hardening.py +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/tests/test_semantic_stats.py +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/tests/test_services.py +0 -0
- {codebeacon-0.6.0 → codebeacon-0.6.2}/tests/test_wiki.py +0 -0
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
<!-- codebeacon:start -->
|
|
2
|
+
# Project Context
|
|
3
|
+
|
|
4
|
+
## Lookup strategy
|
|
5
|
+
|
|
6
|
+
> A pre-built index lives in `.codebeacon/`. Use the 3-step lookup below
|
|
7
|
+
> before reaching for Glob or Grep.
|
|
8
|
+
|
|
9
|
+
> **Repo type:** `single` — Single-project repo.
|
|
10
|
+
|
|
11
|
+
### Step 1 — codebeacon wiki
|
|
12
|
+
Routes, controllers, services, entities.
|
|
13
|
+
```
|
|
14
|
+
.codebeacon/wiki/index.md ← global index
|
|
15
|
+
.codebeacon/wiki/{project}/controllers/{Name}.md ← controller logic
|
|
16
|
+
.codebeacon/wiki/{project}/services/{Name}.md ← service methods
|
|
17
|
+
.codebeacon/wiki/{project}/entities/{Name}.md ← data models
|
|
18
|
+
.codebeacon/wiki/routes.md ← all API routes across projects
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### Step 2 — obsidian notes
|
|
22
|
+
Class-level detail (methods, fields, incoming/outgoing edges) the wiki omits.
|
|
23
|
+
Look up by class name — replace `{project}` with the relevant folder:
|
|
24
|
+
```
|
|
25
|
+
.codebeacon/obsidian/{project}/{ClassName}.md
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
| Project | Notes | Example |
|
|
29
|
+
| --- | --- | --- |
|
|
30
|
+
| codebeacon | 398 services, 3 entities | `affected_from_paths.py.md` |
|
|
31
|
+
|
|
32
|
+
### Step 3 — source file
|
|
33
|
+
Open the paths surfaced by Steps 1–2.
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Projects
|
|
38
|
+
|
|
39
|
+
| Project | Framework | Routes | Services | Entities | Components |
|
|
40
|
+
| --- | --- | --- | --- | --- | --- |
|
|
41
|
+
| codebeacon | python | 5 | 398 | 3 | 0 |
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Common Commands
|
|
46
|
+
|
|
47
|
+
### codebeacon (python)
|
|
48
|
+
```bash
|
|
49
|
+
# see project README # build
|
|
50
|
+
# see project README # run
|
|
51
|
+
# see project README # all tests
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Architecture
|
|
57
|
+
|
|
58
|
+
**codebeacon**: **python** · python
|
|
59
|
+
Routes: 5 | Services: 398 | Entities: 3 | Components: 0
|
|
60
|
+
|
|
61
|
+
## High-Impact Files
|
|
62
|
+
|
|
63
|
+
Changes here affect many other files:
|
|
64
|
+
|
|
65
|
+
- `codebeacon/semantic_pipeline.py` (imported by 56 files)
|
|
66
|
+
- `codebeacon/pipeline.py` (imported by 12 files)
|
|
67
|
+
- `tests/test_graph.py` (imported by 6 files)
|
|
68
|
+
- `tests/integration/test_full_pipeline.py` (imported by 3 files)
|
|
69
|
+
- `tests/test_known_bugs.py` (imported by 2 files)
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
_Generated by [codebeacon](https://github.com/codebeacon/codebeacon) · 2026-05-31_
|
|
74
|
+
<!-- codebeacon:end -->
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
<!-- codebeacon:start -->
|
|
2
|
+
# AGENTS.md
|
|
3
|
+
|
|
4
|
+
## Lookup strategy
|
|
5
|
+
|
|
6
|
+
> A pre-built index lives in `.codebeacon/`. Follow the 3-step lookup below
|
|
7
|
+
> so parallel agents converge on the same answer.
|
|
8
|
+
|
|
9
|
+
> **Repo type:** `single` — Single-project repo.
|
|
10
|
+
|
|
11
|
+
### Step 1 — codebeacon wiki
|
|
12
|
+
Routes, controllers, services, entities.
|
|
13
|
+
```
|
|
14
|
+
.codebeacon/wiki/index.md ← global index
|
|
15
|
+
.codebeacon/wiki/{project}/controllers/{Name}.md ← controller logic
|
|
16
|
+
.codebeacon/wiki/{project}/services/{Name}.md ← service methods
|
|
17
|
+
.codebeacon/wiki/{project}/entities/{Name}.md ← data models
|
|
18
|
+
.codebeacon/wiki/routes.md ← all API routes across projects
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### Step 2 — obsidian notes
|
|
22
|
+
Class-level detail (methods, fields, incoming/outgoing edges) the wiki omits.
|
|
23
|
+
Look up by class name — replace `{project}` with the relevant folder:
|
|
24
|
+
```
|
|
25
|
+
.codebeacon/obsidian/{project}/{ClassName}.md
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
| Project | Notes | Example |
|
|
29
|
+
| --- | --- | --- |
|
|
30
|
+
| codebeacon | 398 services, 3 entities | `affected_from_paths.py.md` |
|
|
31
|
+
|
|
32
|
+
### Step 3 — source file
|
|
33
|
+
Open the paths surfaced by Steps 1–2.
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Projects
|
|
38
|
+
|
|
39
|
+
| Project | Framework | Routes | Services | Entities | Components |
|
|
40
|
+
| --- | --- | --- | --- | --- | --- |
|
|
41
|
+
| codebeacon | python | 5 | 398 | 3 | 0 |
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Common Commands
|
|
46
|
+
|
|
47
|
+
### codebeacon (python)
|
|
48
|
+
```bash
|
|
49
|
+
# see project README # build
|
|
50
|
+
# see project README # run
|
|
51
|
+
# see project README # all tests
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Architecture
|
|
57
|
+
|
|
58
|
+
**codebeacon**: **python** · python
|
|
59
|
+
Routes: 5 | Services: 398 | Entities: 3 | Components: 0
|
|
60
|
+
|
|
61
|
+
## High-Impact Files
|
|
62
|
+
|
|
63
|
+
Changes here affect many other files:
|
|
64
|
+
|
|
65
|
+
- `codebeacon/semantic_pipeline.py` (imported by 56 files)
|
|
66
|
+
- `codebeacon/pipeline.py` (imported by 12 files)
|
|
67
|
+
- `tests/test_graph.py` (imported by 6 files)
|
|
68
|
+
- `tests/integration/test_full_pipeline.py` (imported by 3 files)
|
|
69
|
+
- `tests/test_known_bugs.py` (imported by 2 files)
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
_Generated by [codebeacon](https://github.com/codebeacon/codebeacon) · 2026-05-31_
|
|
74
|
+
<!-- codebeacon:end -->
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
<!-- codebeacon:start -->
|
|
2
|
+
# CLAUDE.md
|
|
3
|
+
|
|
4
|
+
## Lookup strategy
|
|
5
|
+
|
|
6
|
+
> This repo ships a pre-built index in `.codebeacon/`. Check it first —
|
|
7
|
+
> most "where is X" questions resolve in one read without a full-repo search.
|
|
8
|
+
|
|
9
|
+
> **Repo type:** `single` — Single-project repo.
|
|
10
|
+
|
|
11
|
+
### Step 1 — codebeacon wiki
|
|
12
|
+
Routes, controllers, services, entities.
|
|
13
|
+
```
|
|
14
|
+
.codebeacon/wiki/index.md ← global index
|
|
15
|
+
.codebeacon/wiki/{project}/controllers/{Name}.md ← controller logic
|
|
16
|
+
.codebeacon/wiki/{project}/services/{Name}.md ← service methods
|
|
17
|
+
.codebeacon/wiki/{project}/entities/{Name}.md ← data models
|
|
18
|
+
.codebeacon/wiki/routes.md ← all API routes across projects
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### Step 2 — obsidian notes
|
|
22
|
+
Class-level detail (methods, fields, incoming/outgoing edges) the wiki omits.
|
|
23
|
+
Look up by class name — replace `{project}` with the relevant folder:
|
|
24
|
+
```
|
|
25
|
+
.codebeacon/obsidian/{project}/{ClassName}.md
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
| Project | Notes | Example |
|
|
29
|
+
| --- | --- | --- |
|
|
30
|
+
| codebeacon | 398 services, 3 entities | `affected_from_paths.py.md` |
|
|
31
|
+
|
|
32
|
+
### Step 3 — source file
|
|
33
|
+
Open the paths surfaced by Steps 1–2.
|
|
34
|
+
|
|
35
|
+
### Fall back to direct search
|
|
36
|
+
Reach for Glob, Grep, or the Explore agent when the index does not cover
|
|
37
|
+
what you need — new files, deep implementation details, or cross-cutting
|
|
38
|
+
searches that span projects.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Projects
|
|
43
|
+
|
|
44
|
+
| Project | Framework | Routes | Services | Entities | Components |
|
|
45
|
+
| --- | --- | --- | --- | --- | --- |
|
|
46
|
+
| codebeacon | python | 5 | 398 | 3 | 0 |
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## Common Commands
|
|
51
|
+
|
|
52
|
+
### codebeacon (python)
|
|
53
|
+
```bash
|
|
54
|
+
# see project README # build
|
|
55
|
+
# see project README # run
|
|
56
|
+
# see project README # all tests
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## Architecture
|
|
62
|
+
|
|
63
|
+
**codebeacon**: **python** · python
|
|
64
|
+
Routes: 5 | Services: 398 | Entities: 3 | Components: 0
|
|
65
|
+
|
|
66
|
+
## High-Impact Files
|
|
67
|
+
|
|
68
|
+
Changes here affect many other files:
|
|
69
|
+
|
|
70
|
+
- `codebeacon/semantic_pipeline.py` (imported by 56 files)
|
|
71
|
+
- `codebeacon/pipeline.py` (imported by 12 files)
|
|
72
|
+
- `tests/test_graph.py` (imported by 6 files)
|
|
73
|
+
- `tests/integration/test_full_pipeline.py` (imported by 3 files)
|
|
74
|
+
- `tests/test_known_bugs.py` (imported by 2 files)
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
_Generated by [codebeacon](https://github.com/codebeacon/codebeacon) · 2026-05-31_
|
|
79
|
+
<!-- codebeacon:end -->
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: codebeacon
|
|
3
|
-
Version: 0.6.
|
|
3
|
+
Version: 0.6.2
|
|
4
4
|
Summary: Source code AST analysis tool for AI context generation — unified multi-framework knowledge graph
|
|
5
5
|
Project-URL: Homepage, https://github.com/codebeacon/codebeacon
|
|
6
6
|
Project-URL: Repository, https://github.com/codebeacon/codebeacon
|
|
@@ -118,6 +118,22 @@ Description-Content-Type: text/markdown
|
|
|
118
118
|
|
|
119
119
|
---
|
|
120
120
|
|
|
121
|
+
## What's new in 0.6.1
|
|
122
|
+
|
|
123
|
+
Patch release — extraction correctness and reproducible output.
|
|
124
|
+
|
|
125
|
+
- **Six framework extractors restored** — the `laravel`, `angular`, `aspnet`, `actix`, `ktor`, and `vapor` tree-sitter queries had drifted out of sync with current grammar versions and silently extracted **nothing**: the query failed to compile and the error was swallowed as a warning. All six now compile and extract against the shipped grammars (Laravel `scope:`/`name:` fields, Angular `export class` decorators, ASP.NET `invocation_expression` fields, Actix sibling-anchored attributes, Kotlin 1.x node renames, Swift 0.0.1 node set), each with a regression test so they can't silently break again.
|
|
126
|
+
- **Reproducible `beacon.json`** — node `source_file` paths are rewritten relative to each project root before serialization, so scanning the same commit on two machines produces a byte-identical graph instead of churning absolute paths in diffs.
|
|
127
|
+
- **`affected` no longer over-reports** — changed-file seed matching is path-segment aligned, so `src/user.py` no longer drags in unrelated nodes such as `foosrc/user.py`.
|
|
128
|
+
- **`semantic-apply` crash fix** — a `confidence_score: null` in an archived/migrated JSONL edge no longer aborts the run with a `TypeError`; it coerces to the safe default like the rest of the pipeline.
|
|
129
|
+
- **NetworkX 3.6 forward-compat** — `beacon.json` is written with an explicit `edges="links"` key so an upstream default change can't silently alter the on-disk format; the MCP server now loads through the same compatibility shim.
|
|
130
|
+
- **Obsidian vault hygiene** — stale-note cleanup sweeps the whole vault (root + nested), and the cross-language import filter keys off the note's real source language instead of a filename suffix that never matched.
|
|
131
|
+
- **gitignore semantics** — anchored patterns like `build/*.js` no longer let `*` cross `/`, so nested files are not wrongly ignored.
|
|
132
|
+
- **Next.js App Router** — JS-based `page.js` / `page.jsx` routes are now discovered (previously only `.ts` / `.tsx`).
|
|
133
|
+
- **DI attribution fixes** — FastAPI `Depends()` and Angular constructor injection are attributed to the enclosing function/class by byte range instead of the first/last one in the file; Razor `@using` no longer emits duplicate edges.
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
121
137
|
## What's new in 0.6.0
|
|
122
138
|
|
|
123
139
|
- **`codebeacon affected`** — given a list of changed files (or a `--base <ref>` git diff), prints every graph node downstream of the change. Built for CI risk-scoring and PR review.
|
|
@@ -27,6 +27,22 @@
|
|
|
27
27
|
|
|
28
28
|
---
|
|
29
29
|
|
|
30
|
+
## Neu in 0.6.1
|
|
31
|
+
|
|
32
|
+
Patch-Release — Extraktionskorrektheit und reproduzierbare Ausgabe.
|
|
33
|
+
|
|
34
|
+
- **Sechs Framework-Extraktoren wiederhergestellt** — die tree-sitter-Queries für `laravel`, `angular`, `aspnet`, `actix`, `ktor` und `vapor` waren mit aktuellen Grammatik-Versionen aus dem Takt geraten und extrahierten **nichts**: die Query ließ sich nicht kompilieren und der Fehler wurde als Warnung verschluckt. Alle sechs kompilieren und extrahieren nun gegen die mitgelieferten Grammatiken (Laravel `scope:`/`name:`-Felder, Angular `export class`-Dekoratoren, ASP.NET `invocation_expression`-Felder, Actix geschwister-verankerte Attribute, Kotlin-1.x-Knotenumbenennungen, Swift-0.0.1-Knotensatz) — jeweils mit Regressionstest gegen erneutes stilles Brechen.
|
|
35
|
+
- **Reproduzierbare `beacon.json`** — `source_file`-Pfade der Knoten werden vor der Serialisierung relativ zum jeweiligen Projekt-Root umgeschrieben, sodass das Scannen desselben Commits auf zwei Maschinen einen byte-identischen Graphen erzeugt statt absolute Pfade im Diff zu wälzen.
|
|
36
|
+
- **`affected` meldet nicht mehr zu viel** — der Seed-Abgleich geänderter Dateien ist nun pfadsegment-ausgerichtet, sodass `src/user.py` keine fremden Knoten wie `foosrc/user.py` mehr hineinzieht.
|
|
37
|
+
- **`semantic-apply`-Absturz behoben** — ein `confidence_score: null` in einer archivierten/migrierten JSONL-Kante bricht den Lauf nicht mehr mit `TypeError` ab, sondern wird wie im Rest der Pipeline auf den sicheren Standard normalisiert.
|
|
38
|
+
- **NetworkX-3.6-Vorwärtskompatibilität** — `beacon.json` wird mit explizitem `edges="links"`-Schlüssel geschrieben, damit eine geänderte Upstream-Voreinstellung das Festplattenformat nicht still verändert; der MCP-Server lädt über dieselbe Kompatibilitätsschicht.
|
|
39
|
+
- **Obsidian-Vault-Hygiene** — die Bereinigung veralteter Notizen erfasst den gesamten Vault (Root + verschachtelt), und der Cross-Language-Import-Filter richtet sich nach der echten Quellsprache der Notiz statt nach einem Dateinamen-Suffix, das nie passte.
|
|
40
|
+
- **gitignore-Semantik** — verankerte Muster wie `build/*.js` lassen `*` nicht mehr über `/` greifen, sodass verschachtelte Dateien nicht fälschlich ignoriert werden.
|
|
41
|
+
- **Next.js App Router** — JS-basierte `page.js` / `page.jsx`-Routen werden nun erkannt (zuvor nur `.ts` / `.tsx`).
|
|
42
|
+
- **DI-Zuordnungskorrekturen** — FastAPI `Depends()` und Angular-Konstruktor-Injektion werden per Byte-Range der umschließenden Funktion/Klasse zugeordnet statt der ersten/letzten in der Datei; Razor `@using` erzeugt keine doppelten Kanten mehr.
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
30
46
|
## Neu in 0.6.0
|
|
31
47
|
|
|
32
48
|
- **`codebeacon affected`** — nimmt eine Liste geänderter Dateien (oder via `--base <ref>` ein git diff) und gibt jeden nachgelagerten Graphknoten aus. Für CI-Risikoeinstufung und PR-Reviews.
|
|
@@ -27,6 +27,22 @@
|
|
|
27
27
|
|
|
28
28
|
---
|
|
29
29
|
|
|
30
|
+
## Novedades en 0.6.1
|
|
31
|
+
|
|
32
|
+
Versión de parche — corrección de extracción y salida reproducible.
|
|
33
|
+
|
|
34
|
+
- **Seis extractores de frameworks restaurados** — las queries tree-sitter de `laravel`, `angular`, `aspnet`, `actix`, `ktor` y `vapor` se habían desincronizado de las versiones actuales de las gramáticas y no extraían **nada**: la query no compilaba y el error se silenciaba como advertencia. Las seis ahora compilan y extraen contra las gramáticas incluidas (campos `scope:`/`name:` de Laravel, decoradores `export class` de Angular, campos `invocation_expression` de ASP.NET, atributos anclados a hermanos de Actix, renombrados de nodos de Kotlin 1.x, conjunto de nodos de Swift 0.0.1), cada una con un test de regresión para que no vuelvan a romperse en silencio.
|
|
35
|
+
- **`beacon.json` reproducible** — las rutas `source_file` de los nodos se reescriben relativas a la raíz de cada proyecto antes de serializar, así escanear el mismo commit en dos máquinas produce un grafo idéntico byte a byte en lugar de remover rutas absolutas en los diffs.
|
|
36
|
+
- **`affected` ya no sobre-reporta** — la coincidencia de archivos cambiados está alineada por segmentos de ruta, de modo que `src/user.py` ya no arrastra nodos ajenos como `foosrc/user.py`.
|
|
37
|
+
- **Corrección de fallo en `semantic-apply`** — un `confidence_score: null` en una arista JSONL archivada/migrada ya no aborta la ejecución con `TypeError`; se normaliza al valor seguro por defecto como el resto del pipeline.
|
|
38
|
+
- **Compatibilidad futura con NetworkX 3.6** — `beacon.json` se escribe con la clave explícita `edges="links"` para que un cambio de valor por defecto upstream no altere en silencio el formato en disco; el servidor MCP carga a través de la misma capa de compatibilidad.
|
|
39
|
+
- **Higiene del vault de Obsidian** — la limpieza de notas obsoletas barre todo el vault (raíz + anidado), y el filtro de imports entre lenguajes se basa en el lenguaje real de la nota en vez de un sufijo de nombre de archivo que nunca coincidía.
|
|
40
|
+
- **Semántica de gitignore** — los patrones anclados como `build/*.js` ya no permiten que `*` cruce `/`, así los archivos anidados no se ignoran por error.
|
|
41
|
+
- **App Router de Next.js** — ahora se descubren las rutas `page.js` / `page.jsx` basadas en JS (antes solo `.ts` / `.tsx`).
|
|
42
|
+
- **Correcciones de atribución de DI** — `Depends()` de FastAPI y la inyección por constructor de Angular se atribuyen a la función/clase contenedora por rango de bytes en vez de la primera/última del archivo; `@using` de Razor ya no emite aristas duplicadas.
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
30
46
|
## Novedades en 0.6.0
|
|
31
47
|
|
|
32
48
|
- **`codebeacon affected`** — recibe una lista de archivos cambiados (o vía `--base <ref>` un git diff) e imprime todos los nodos del grafo aguas abajo. Pensado para puntuación de riesgo en CI y revisión de PR.
|
|
@@ -27,6 +27,22 @@
|
|
|
27
27
|
|
|
28
28
|
---
|
|
29
29
|
|
|
30
|
+
## Nouveautés en 0.6.1
|
|
31
|
+
|
|
32
|
+
Version corrective — exactitude de l'extraction et sortie reproductible.
|
|
33
|
+
|
|
34
|
+
- **Six extracteurs de frameworks restaurés** — les requêtes tree-sitter de `laravel`, `angular`, `aspnet`, `actix`, `ktor` et `vapor` s'étaient désynchronisées des versions actuelles des grammaires et n'extrayaient **rien** : la requête ne compilait pas et l'erreur était avalée sous forme d'avertissement. Les six compilent et extraient désormais avec les grammaires fournies (champs `scope:`/`name:` de Laravel, décorateurs `export class` d'Angular, champs `invocation_expression` d'ASP.NET, attributs ancrés aux frères d'Actix, renommages de nœuds de Kotlin 1.x, jeu de nœuds de Swift 0.0.1), chacun avec un test de régression pour ne plus se casser en silence.
|
|
35
|
+
- **`beacon.json` reproductible** — les chemins `source_file` des nœuds sont réécrits relativement à la racine de chaque projet avant la sérialisation, de sorte que scanner le même commit sur deux machines produit un graphe identique octet par octet au lieu de brasser des chemins absolus dans les diffs.
|
|
36
|
+
- **`affected` ne sur-rapporte plus** — la correspondance des fichiers modifiés est alignée par segments de chemin, donc `src/user.py` n'entraîne plus de nœuds étrangers comme `foosrc/user.py`.
|
|
37
|
+
- **Correction de plantage de `semantic-apply`** — un `confidence_score: null` dans une arête JSONL archivée/migrée n'interrompt plus l'exécution avec `TypeError` ; il est normalisé vers la valeur sûre par défaut comme le reste du pipeline.
|
|
38
|
+
- **Compatibilité ascendante NetworkX 3.6** — `beacon.json` est écrit avec la clé explicite `edges="links"` pour qu'un changement de valeur par défaut en amont ne modifie pas silencieusement le format sur disque ; le serveur MCP charge via la même couche de compatibilité.
|
|
39
|
+
- **Hygiène du vault Obsidian** — le nettoyage des notes obsolètes balaie tout le vault (racine + imbriqué), et le filtre d'imports inter-langages se base sur le vrai langage source de la note au lieu d'un suffixe de nom de fichier qui ne correspondait jamais.
|
|
40
|
+
- **Sémantique gitignore** — les motifs ancrés comme `build/*.js` ne laissent plus `*` franchir `/`, donc les fichiers imbriqués ne sont plus ignorés à tort.
|
|
41
|
+
- **App Router Next.js** — les routes `page.js` / `page.jsx` basées sur JS sont désormais découvertes (auparavant seulement `.ts` / `.tsx`).
|
|
42
|
+
- **Corrections d'attribution de DI** — `Depends()` de FastAPI et l'injection par constructeur d'Angular sont attribués à la fonction/classe englobante par plage d'octets plutôt qu'à la première/dernière du fichier ; `@using` de Razor n'émet plus d'arêtes en double.
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
30
46
|
## Nouveautés en 0.6.0
|
|
31
47
|
|
|
32
48
|
- **`codebeacon affected`** — prend une liste de fichiers modifiés (ou via `--base <ref>` un git diff) et imprime tous les nœuds du graphe en aval. Pensé pour le scoring de risque en CI et la revue de PR.
|
|
@@ -27,6 +27,22 @@
|
|
|
27
27
|
|
|
28
28
|
---
|
|
29
29
|
|
|
30
|
+
## 0.6.1 の新機能
|
|
31
|
+
|
|
32
|
+
パッチリリース — 抽出の正確性と再現可能な出力。
|
|
33
|
+
|
|
34
|
+
- **6 つのフレームワーク抽出器を復旧** — `laravel`・`angular`・`aspnet`・`actix`・`ktor`・`vapor` の tree-sitter クエリが現行の文法バージョンとずれて **何も抽出しない** 状態でした(クエリのコンパイルに失敗し、そのエラーが警告として握り潰されていた)。6 つすべてを同梱の文法でコンパイル・抽出できるよう修正し(Laravel の `scope:`/`name:` フィールド、Angular の `export class` デコレータ、ASP.NET の `invocation_expression` フィールド、Actix の兄弟ノードアンカー、Kotlin 1.x のノード改名、Swift 0.0.1 のノードセット)、再び黙って壊れないよう各々に回帰テストを追加しました。
|
|
35
|
+
- **再現可能な `beacon.json`** — シリアライズ前にノードの `source_file` パスを各プロジェクトルート相対に書き換えるため、同じコミットを別マシンでスキャンしてもバイト単位で同一のグラフが得られます(diff に絶対パスの揺れが出ない)。
|
|
36
|
+
- **`affected` の過剰報告を修正** — 変更ファイルの seed マッチングをパスセグメント単位に整合させ、`src/user.py` が `foosrc/user.py` のような無関係なノードを巻き込まないようにしました。
|
|
37
|
+
- **`semantic-apply` のクラッシュ修正** — アーカイブ/移行済み JSONL エッジの `confidence_score: null` が `TypeError` で実行を中断させる問題を解消し、パイプラインの他部分と同様に安全な既定値へ補正します。
|
|
38
|
+
- **NetworkX 3.6 前方互換** — `beacon.json` を `edges="links"` キー明示で書き出し、上流の既定値変更がディスク形式を黙って変えないようにしました。MCP サーバーも同じ互換ローダーを使用します。
|
|
39
|
+
- **Obsidian ボルトの整理** — 古いノートの掃除がボルト全体(ルート+ネスト)を対象にし、言語間 import フィルタはファイル名サフィックスではなくノードの実際のソース言語を基準に動作します。
|
|
40
|
+
- **gitignore セマンティクス** — `build/*.js` のようなアンカー付きパターンで `*` が `/` を跨がないよう修正し、ネストしたファイルが誤って無視されないようにしました。
|
|
41
|
+
- **Next.js App Router** — JS ベースの `page.js` / `page.jsx` ルートも検出するようになりました(従来は `.ts` / `.tsx` のみ)。
|
|
42
|
+
- **DI 帰属の修正** — FastAPI の `Depends()` と Angular のコンストラクタ注入を、ファイル内の最初/最後ではなくバイト範囲で囲む関数・クラスに正しく帰属させます。Razor の `@using` は重複エッジを生成しなくなりました。
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
30
46
|
## 0.6.0 の新機能
|
|
31
47
|
|
|
32
48
|
- **`codebeacon affected`** — 変更されたファイル一覧(または `--base <ref>` で git diff)を受け取り、その影響範囲にあるグラフノードをすべて出力。CI のリスクスコアリングや PR レビュー向け。
|
|
@@ -27,6 +27,22 @@
|
|
|
27
27
|
|
|
28
28
|
---
|
|
29
29
|
|
|
30
|
+
## 0.6.1 새 소식
|
|
31
|
+
|
|
32
|
+
패치 릴리스 — 추출 정확성과 재현 가능한 출력.
|
|
33
|
+
|
|
34
|
+
- **6개 프레임워크 추출기 복구** — `laravel`, `angular`, `aspnet`, `actix`, `ktor`, `vapor` tree-sitter 쿼리가 현재 grammar 버전과 어긋나 **아무것도 추출하지 못하던** 문제 수정: 쿼리가 컴파일에 실패하고 그 에러가 경고로 묻혀 있었습니다. 6개 모두 설치된 grammar로 컴파일·추출되도록 수정(Laravel `scope:`/`name:` 필드, Angular `export class` 데코레이터, ASP.NET `invocation_expression` 필드, Actix 형제 노드 앵커, Kotlin 1.x 노드 개명, Swift 0.0.1 노드셋)했으며, 재발 방지 회귀 테스트를 각각 추가했습니다.
|
|
35
|
+
- **재현 가능한 `beacon.json`** — 직렬화 전에 노드 `source_file` 경로를 각 프로젝트 루트 기준 상대경로로 변환 → 같은 커밋을 다른 머신에서 스캔해도 바이트 단위로 동일한 그래프 생성(절대경로 diff 잡음 제거).
|
|
36
|
+
- **`affected` 과다 보고 수정** — 변경 파일 seed 매칭을 경로 세그먼트 단위로 정렬 → `src/user.py`가 `foosrc/user.py` 같은 무관한 노드를 끌어오지 않음.
|
|
37
|
+
- **`semantic-apply` 크래시 수정** — 아카이브/마이그레이션된 JSONL 엣지의 `confidence_score: null`이 `TypeError`로 실행을 중단시키던 문제 제거, 파이프라인의 나머지와 동일하게 안전 기본값으로 보정.
|
|
38
|
+
- **NetworkX 3.6 호환** — `beacon.json`을 `edges="links"` 키로 명시 기록 → 상위 기본값 변경이 디스크 포맷을 조용히 바꾸지 못하게 함. MCP 서버도 동일한 호환 로더 사용.
|
|
39
|
+
- **Obsidian 볼트 정리** — stale 노트 정리가 볼트 전체(루트+중첩)를 sweep하고, cross-language import 필터가 파일명 접미사 대신 노트의 실제 소스 언어를 기준으로 동작.
|
|
40
|
+
- **gitignore 의미** — `build/*.js` 같은 anchored 패턴에서 `*`가 `/`를 넘지 않도록 수정 → 중첩 파일이 잘못 무시되지 않음.
|
|
41
|
+
- **Next.js App Router** — JS 기반 `page.js` / `page.jsx` 라우트도 탐색(이전엔 `.ts` / `.tsx`만).
|
|
42
|
+
- **DI 귀속 수정** — FastAPI `Depends()`와 Angular 생성자 주입을 파일 내 첫/마지막이 아니라 byte-range로 감싸는 함수·클래스에 정확히 귀속. Razor `@using`은 더 이상 중복 엣지를 만들지 않음.
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
30
46
|
## 0.6.0 새 소식
|
|
31
47
|
|
|
32
48
|
- **`codebeacon affected`** — 변경된 파일 목록(또는 `--base <ref>`로 git diff)을 받아 그 영향권에 있는 그래프 노드를 모두 출력. CI 리스크 스코어링·PR 리뷰용.
|
|
@@ -25,6 +25,22 @@
|
|
|
25
25
|
|
|
26
26
|
---
|
|
27
27
|
|
|
28
|
+
## What's new in 0.6.1
|
|
29
|
+
|
|
30
|
+
Patch release — extraction correctness and reproducible output.
|
|
31
|
+
|
|
32
|
+
- **Six framework extractors restored** — the `laravel`, `angular`, `aspnet`, `actix`, `ktor`, and `vapor` tree-sitter queries had drifted out of sync with current grammar versions and silently extracted **nothing**: the query failed to compile and the error was swallowed as a warning. All six now compile and extract against the shipped grammars (Laravel `scope:`/`name:` fields, Angular `export class` decorators, ASP.NET `invocation_expression` fields, Actix sibling-anchored attributes, Kotlin 1.x node renames, Swift 0.0.1 node set), each with a regression test so they can't silently break again.
|
|
33
|
+
- **Reproducible `beacon.json`** — node `source_file` paths are rewritten relative to each project root before serialization, so scanning the same commit on two machines produces a byte-identical graph instead of churning absolute paths in diffs.
|
|
34
|
+
- **`affected` no longer over-reports** — changed-file seed matching is path-segment aligned, so `src/user.py` no longer drags in unrelated nodes such as `foosrc/user.py`.
|
|
35
|
+
- **`semantic-apply` crash fix** — a `confidence_score: null` in an archived/migrated JSONL edge no longer aborts the run with a `TypeError`; it coerces to the safe default like the rest of the pipeline.
|
|
36
|
+
- **NetworkX 3.6 forward-compat** — `beacon.json` is written with an explicit `edges="links"` key so an upstream default change can't silently alter the on-disk format; the MCP server now loads through the same compatibility shim.
|
|
37
|
+
- **Obsidian vault hygiene** — stale-note cleanup sweeps the whole vault (root + nested), and the cross-language import filter keys off the note's real source language instead of a filename suffix that never matched.
|
|
38
|
+
- **gitignore semantics** — anchored patterns like `build/*.js` no longer let `*` cross `/`, so nested files are not wrongly ignored.
|
|
39
|
+
- **Next.js App Router** — JS-based `page.js` / `page.jsx` routes are now discovered (previously only `.ts` / `.tsx`).
|
|
40
|
+
- **DI attribution fixes** — FastAPI `Depends()` and Angular constructor injection are attributed to the enclosing function/class by byte range instead of the first/last one in the file; Razor `@using` no longer emits duplicate edges.
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
28
44
|
## What's new in 0.6.0
|
|
29
45
|
|
|
30
46
|
- **`codebeacon affected`** — given a list of changed files (or a `--base <ref>` git diff), prints every graph node downstream of the change. Built for CI risk-scoring and PR review.
|
|
@@ -27,6 +27,22 @@
|
|
|
27
27
|
|
|
28
28
|
---
|
|
29
29
|
|
|
30
|
+
## Novidades na 0.6.1
|
|
31
|
+
|
|
32
|
+
Versão de correção — exatidão de extração e saída reproduzível.
|
|
33
|
+
|
|
34
|
+
- **Seis extratores de frameworks restaurados** — as queries tree-sitter de `laravel`, `angular`, `aspnet`, `actix`, `ktor` e `vapor` haviam se desencontrado das versões atuais das gramáticas e não extraíam **nada**: a query não compilava e o erro era engolido como aviso. As seis agora compilam e extraem contra as gramáticas incluídas (campos `scope:`/`name:` do Laravel, decoradores `export class` do Angular, campos `invocation_expression` do ASP.NET, atributos ancorados a irmãos do Actix, renomeações de nós do Kotlin 1.x, conjunto de nós do Swift 0.0.1), cada uma com um teste de regressão para não quebrarem silenciosamente de novo.
|
|
35
|
+
- **`beacon.json` reproduzível** — os caminhos `source_file` dos nós são reescritos relativos à raiz de cada projeto antes da serialização, então escanear o mesmo commit em duas máquinas produz um grafo idêntico byte a byte em vez de remexer caminhos absolutos nos diffs.
|
|
36
|
+
- **`affected` não super-reporta mais** — a correspondência de arquivos alterados é alinhada por segmentos de caminho, então `src/user.py` não arrasta mais nós alheios como `foosrc/user.py`.
|
|
37
|
+
- **Correção de crash no `semantic-apply`** — um `confidence_score: null` em uma aresta JSONL arquivada/migrada não aborta mais a execução com `TypeError`; é normalizado para o padrão seguro como o resto do pipeline.
|
|
38
|
+
- **Compatibilidade futura com NetworkX 3.6** — `beacon.json` é gravado com a chave explícita `edges="links"` para que uma mudança de padrão upstream não altere silenciosamente o formato em disco; o servidor MCP carrega pela mesma camada de compatibilidade.
|
|
39
|
+
- **Higiene do vault do Obsidian** — a limpeza de notas obsoletas varre o vault inteiro (raiz + aninhado), e o filtro de imports entre linguagens se baseia na linguagem-fonte real da nota em vez de um sufixo de nome de arquivo que nunca casava.
|
|
40
|
+
- **Semântica do gitignore** — padrões ancorados como `build/*.js` não deixam mais `*` cruzar `/`, então arquivos aninhados não são ignorados por engano.
|
|
41
|
+
- **App Router do Next.js** — rotas `page.js` / `page.jsx` baseadas em JS agora são descobertas (antes só `.ts` / `.tsx`).
|
|
42
|
+
- **Correções de atribuição de DI** — `Depends()` do FastAPI e a injeção por construtor do Angular são atribuídos à função/classe contêiner por faixa de bytes em vez da primeira/última do arquivo; `@using` do Razor não emite mais arestas duplicadas.
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
30
46
|
## Novidades na 0.6.0
|
|
31
47
|
|
|
32
48
|
- **`codebeacon affected`** — recebe uma lista de arquivos alterados (ou via `--base <ref>` um git diff) e imprime todos os nós do grafo a jusante. Pensado para pontuação de risco em CI e revisão de PR.
|
|
@@ -27,6 +27,22 @@
|
|
|
27
27
|
|
|
28
28
|
---
|
|
29
29
|
|
|
30
|
+
## 0.6.1 新功能
|
|
31
|
+
|
|
32
|
+
补丁版本 — 提取正确性与可复现输出。
|
|
33
|
+
|
|
34
|
+
- **修复六个框架提取器** — `laravel`、`angular`、`aspnet`、`actix`、`ktor`、`vapor` 的 tree-sitter 查询与当前文法版本脱节,**提取不到任何内容**:查询无法编译,错误被当作警告吞掉。现已让六者都能针对随附文法编译并提取(Laravel 的 `scope:`/`name:` 字段、Angular 的 `export class` 装饰器、ASP.NET 的 `invocation_expression` 字段、Actix 的兄弟节点锚定、Kotlin 1.x 节点改名、Swift 0.0.1 节点集),并为每个添加回归测试,防止再次悄然失效。
|
|
35
|
+
- **可复现的 `beacon.json`** — 序列化前将节点的 `source_file` 路径改写为相对各项目根目录,因此在两台机器上扫描同一提交会生成逐字节相同的图,而不再在 diff 中翻搅绝对路径。
|
|
36
|
+
- **`affected` 不再过度报告** — 变更文件的种子匹配按路径段对齐,因此 `src/user.py` 不再拉入 `foosrc/user.py` 之类无关节点。
|
|
37
|
+
- **`semantic-apply` 崩溃修复** — 归档/迁移的 JSONL 边中的 `confidence_score: null` 不再以 `TypeError` 中断运行,而是像管线其余部分一样归一到安全默认值。
|
|
38
|
+
- **NetworkX 3.6 前向兼容** — `beacon.json` 以显式 `edges="links"` 键写出,使上游默认值变化不会悄悄改变磁盘格式;MCP 服务器也经由同一兼容层加载。
|
|
39
|
+
- **Obsidian 库整理** — 过期笔记清理覆盖整个库(根目录 + 嵌套),跨语言导入过滤器以笔记的真实源语言为准,而非从不匹配的文件名后缀。
|
|
40
|
+
- **gitignore 语义** — `build/*.js` 等锚定模式中的 `*` 不再跨越 `/`,因此嵌套文件不会被误忽略。
|
|
41
|
+
- **Next.js App Router** — 现在会发现基于 JS 的 `page.js` / `page.jsx` 路由(此前仅 `.ts` / `.tsx`)。
|
|
42
|
+
- **DI 归属修复** — FastAPI 的 `Depends()` 与 Angular 构造函数注入按字节范围归属到其外围函数/类,而非文件中的首个/末个;Razor 的 `@using` 不再产生重复边。
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
30
46
|
## 0.6.0 新功能
|
|
31
47
|
|
|
32
48
|
- **`codebeacon affected`** — 接收变更文件列表(或通过 `--base <ref>` 读取 git diff),输出受影响的所有图节点。面向 CI 风险评分与 PR 审查。
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.6.2"
|
|
@@ -97,12 +97,21 @@ def affected_from_paths(
|
|
|
97
97
|
# match by suffix (a relative suffix of the absolute node path).
|
|
98
98
|
seeds = [str(p).replace("\\", "/") for p in changed_paths]
|
|
99
99
|
|
|
100
|
+
def _suffix_match(a: str, b: str) -> bool:
|
|
101
|
+
# True when one path is a *path-segment-aligned* suffix of the other,
|
|
102
|
+
# e.g. "src/services/user.py" vs "/repo/src/services/user.py". The
|
|
103
|
+
# leading "/" guard prevents bogus hits like "foosrc/x.py" matching
|
|
104
|
+
# seed "src/x.py" (plain str.endswith has no segment boundary).
|
|
105
|
+
if a == b:
|
|
106
|
+
return True
|
|
107
|
+
return ("/" + a).endswith("/" + b) or ("/" + b).endswith("/" + a)
|
|
108
|
+
|
|
100
109
|
seed_node_ids: list[str] = []
|
|
101
110
|
for node_id, data in G.nodes(data=True):
|
|
102
111
|
src = (data.get("source_file") or "").replace("\\", "/")
|
|
103
112
|
if not src:
|
|
104
113
|
continue
|
|
105
|
-
if any(src
|
|
114
|
+
if any(_suffix_match(src, seed) for seed in seeds):
|
|
106
115
|
seed_node_ids.append(node_id)
|
|
107
116
|
|
|
108
117
|
# Walk *upstream* (predecessors): callers, controllers that depend on the
|
|
@@ -772,7 +772,30 @@ def _maybe_inject_scan(argv: list[str]) -> list[str]:
|
|
|
772
772
|
return ["scan", *argv]
|
|
773
773
|
|
|
774
774
|
|
|
775
|
+
def _ensure_utf8_stdio() -> None:
|
|
776
|
+
"""Stop ``UnicodeEncodeError`` from killing a command on a non-UTF-8 console.
|
|
777
|
+
|
|
778
|
+
Our output uses non-ASCII glyphs (``→``, ``⚠``, box-drawing) in warnings and
|
|
779
|
+
reports. On Windows the default console codepage is cp1252, where a single
|
|
780
|
+
``print("⚠ ...")`` raises ``UnicodeEncodeError`` and aborts the whole
|
|
781
|
+
command. Forcing each stream to UTF-8 with ``errors="replace"`` degrades a
|
|
782
|
+
legacy console to mojibake instead of crashing. Best-effort: streams that
|
|
783
|
+
are redirected, detached, or lack ``reconfigure`` are left untouched.
|
|
784
|
+
Mirrors graphify #992.
|
|
785
|
+
"""
|
|
786
|
+
for stream in (sys.stdout, sys.stderr):
|
|
787
|
+
reconfigure = getattr(stream, "reconfigure", None)
|
|
788
|
+
if reconfigure is None:
|
|
789
|
+
continue
|
|
790
|
+
try:
|
|
791
|
+
reconfigure(encoding="utf-8", errors="replace")
|
|
792
|
+
except (ValueError, OSError):
|
|
793
|
+
# Stream already detached/closed or doesn't support reconfigure.
|
|
794
|
+
pass
|
|
795
|
+
|
|
796
|
+
|
|
775
797
|
def main() -> None:
|
|
798
|
+
_ensure_utf8_stdio()
|
|
776
799
|
parser = build_parser()
|
|
777
800
|
argv = _maybe_inject_scan(sys.argv[1:])
|
|
778
801
|
args = parser.parse_args(argv)
|
|
@@ -18,6 +18,7 @@ Three concerns:
|
|
|
18
18
|
|
|
19
19
|
from __future__ import annotations
|
|
20
20
|
|
|
21
|
+
import hashlib
|
|
21
22
|
import re
|
|
22
23
|
import subprocess
|
|
23
24
|
from pathlib import Path
|
|
@@ -69,6 +70,38 @@ def escape_frontmatter_value(value: object) -> str:
|
|
|
69
70
|
return text
|
|
70
71
|
|
|
71
72
|
|
|
73
|
+
def cap_filename(name: str, limit: int = 200) -> str:
|
|
74
|
+
"""Cap a filename stem to ``limit`` UTF-8 *bytes*, collision-safely.
|
|
75
|
+
|
|
76
|
+
A single path component is capped at 255 bytes by every mainstream
|
|
77
|
+
filesystem, so a node label long enough to overflow that — roughly 85 CJK
|
|
78
|
+
characters at 3 bytes each, or 255 ASCII — makes ``Path.write_text`` raise
|
|
79
|
+
``OSError`` (ENAMETOOLONG) and aborts the *entire* obsidian / wiki export,
|
|
80
|
+
not just the one note. We cap to 200 bytes to leave headroom for the
|
|
81
|
+
trailing ``.md`` and any ``_N`` dedup suffix the caller appends.
|
|
82
|
+
|
|
83
|
+
Two properties matter:
|
|
84
|
+
|
|
85
|
+
* The budget is counted in **bytes**, not characters, so multi-byte scripts
|
|
86
|
+
(CJK, emoji) cannot slip past a character-count guard.
|
|
87
|
+
* When truncation actually happens we append ``_<sha1[:8]>`` of the original
|
|
88
|
+
name, so two labels sharing a long common prefix
|
|
89
|
+
(``"z"*250 + "_ALPHA"`` vs ``"z"*250 + "_BETA"``) still resolve to
|
|
90
|
+
distinct files instead of silently colliding.
|
|
91
|
+
|
|
92
|
+
Truncation slices the UTF-8 byte string and decodes with ``"ignore"`` so a
|
|
93
|
+
multi-byte character straddling the cut is dropped rather than producing
|
|
94
|
+
mojibake. Short names are returned untouched. Mirrors graphify 690b4e5.
|
|
95
|
+
"""
|
|
96
|
+
encoded = name.encode("utf-8")
|
|
97
|
+
if len(encoded) <= limit:
|
|
98
|
+
return name
|
|
99
|
+
digest = hashlib.sha1(name.encode("utf-8")).hexdigest()[:8]
|
|
100
|
+
keep = max(limit - 9, 0) # room for "_" + 8 hex chars
|
|
101
|
+
truncated = encoded[:keep].decode("utf-8", "ignore")
|
|
102
|
+
return f"{truncated}_{digest}"
|
|
103
|
+
|
|
104
|
+
|
|
72
105
|
def git_head(repo_path: str | Path) -> str:
|
|
73
106
|
"""Return the full HEAD commit SHA for ``repo_path``, or "" if not a repo.
|
|
74
107
|
|
|
@@ -62,6 +62,8 @@ class ServiceInfo:
|
|
|
62
62
|
methods: list = field(default_factory=list) # list[str] - method names
|
|
63
63
|
dependencies: list = field(default_factory=list) # list[str] - injected type names (unresolved)
|
|
64
64
|
annotations: list = field(default_factory=list) # list[str] - @Service, @Injectable, etc.
|
|
65
|
+
implements: list = field(default_factory=list) # list[str] - implemented interface names
|
|
66
|
+
extends: list = field(default_factory=list) # list[str] - superclass names
|
|
65
67
|
|
|
66
68
|
|
|
67
69
|
@dataclass(slots=True)
|
|
@@ -21,6 +21,7 @@ Lookup strategy encoded in each file:
|
|
|
21
21
|
from __future__ import annotations
|
|
22
22
|
|
|
23
23
|
import datetime
|
|
24
|
+
import os
|
|
24
25
|
from collections import defaultdict
|
|
25
26
|
from pathlib import Path
|
|
26
27
|
from typing import Any
|
|
@@ -257,6 +258,23 @@ def _hub_files(G: nx.DiGraph, top_n: int = 5) -> list[tuple[str, int]]:
|
|
|
257
258
|
return ranked[:top_n]
|
|
258
259
|
|
|
259
260
|
|
|
261
|
+
def _relativize_to(file_path: str, root: Path) -> str:
|
|
262
|
+
"""Return ``file_path`` relative to ``root`` (POSIX), or unchanged if it is
|
|
263
|
+
already relative or lives outside the root.
|
|
264
|
+
|
|
265
|
+
Keeps absolute machine paths out of the committed CLAUDE.md / AGENTS.md.
|
|
266
|
+
"""
|
|
267
|
+
if not file_path or not os.path.isabs(file_path):
|
|
268
|
+
return file_path
|
|
269
|
+
try:
|
|
270
|
+
rel = os.path.relpath(file_path, str(root))
|
|
271
|
+
except ValueError:
|
|
272
|
+
return file_path # different drive on Windows
|
|
273
|
+
if rel == ".." or rel.startswith(".." + os.sep):
|
|
274
|
+
return file_path
|
|
275
|
+
return rel.replace(os.sep, "/")
|
|
276
|
+
|
|
277
|
+
|
|
260
278
|
# ── Content builders ──────────────────────────────────────────────────────────
|
|
261
279
|
|
|
262
280
|
_REPO_TYPE_BLURB = {
|
|
@@ -432,8 +450,13 @@ def _build_content(
|
|
|
432
450
|
# ── High-impact files ──
|
|
433
451
|
if hub_files:
|
|
434
452
|
lines += ["## High-Impact Files", "", "Changes here affect many other files:", ""]
|
|
453
|
+
# CLAUDE.md is committed, so absolute machine paths here would leak one
|
|
454
|
+
# developer's home directory into the repo and churn diffs. Show paths
|
|
455
|
+
# relative to the project root (``output_dir`` is ``<root>/.codebeacon``).
|
|
456
|
+
# Mirrors graphify #999.
|
|
457
|
+
project_root = output_dir.parent
|
|
435
458
|
for fp, cnt in hub_files:
|
|
436
|
-
lines.append(f"- `{fp}` (imported by {cnt} files)")
|
|
459
|
+
lines.append(f"- `{_relativize_to(fp, project_root)}` (imported by {cnt} files)")
|
|
437
460
|
lines += ["", "---", ""]
|
|
438
461
|
|
|
439
462
|
# ── Skills ──
|
|
@@ -395,13 +395,13 @@ def extract_convention_routes(project: ProjectInfo) -> list[str]:
|
|
|
395
395
|
pages_dir = root / "pages"
|
|
396
396
|
if pages_dir.exists():
|
|
397
397
|
routes.extend(_fs_routes_from_dir(pages_dir, pages_dir))
|
|
398
|
-
# App Router: app/**/page.{ts,tsx,js,jsx} → route
|
|
398
|
+
# App Router: app/**/page.{ts,tsx,js,jsx} → route. JS-based projects use
|
|
399
|
+
# page.js/page.jsx, so globbing only .ts/.tsx silently dropped them.
|
|
399
400
|
app_dir = root / "app"
|
|
400
401
|
if app_dir.exists():
|
|
401
|
-
for
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
routes.append(_app_router_path(f, app_dir))
|
|
402
|
+
for ext in ("tsx", "ts", "jsx", "js"):
|
|
403
|
+
for f in app_dir.rglob(f"page.{ext}"):
|
|
404
|
+
routes.append(_app_router_path(f, app_dir))
|
|
405
405
|
|
|
406
406
|
elif project.framework == "nuxt":
|
|
407
407
|
pages_dir = root / "pages"
|