codecortex 0.11.0__tar.gz → 0.11.1__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 (73) hide show
  1. {codecortex-0.11.0/src/codecortex.egg-info → codecortex-0.11.1}/PKG-INFO +17 -1
  2. {codecortex-0.11.0 → codecortex-0.11.1}/README.md +16 -0
  3. {codecortex-0.11.0 → codecortex-0.11.1/src/codecortex.egg-info}/PKG-INFO +17 -1
  4. codecortex-0.11.1/src/codeintel/__init__.py +1 -0
  5. {codecortex-0.11.0 → codecortex-0.11.1}/src/codeintel/viewer/graph_template.html +23 -6
  6. codecortex-0.11.0/src/codeintel/__init__.py +0 -1
  7. {codecortex-0.11.0 → codecortex-0.11.1}/LICENSE +0 -0
  8. {codecortex-0.11.0 → codecortex-0.11.1}/pyproject.toml +0 -0
  9. {codecortex-0.11.0 → codecortex-0.11.1}/setup.cfg +0 -0
  10. {codecortex-0.11.0 → codecortex-0.11.1}/src/codecortex.egg-info/SOURCES.txt +0 -0
  11. {codecortex-0.11.0 → codecortex-0.11.1}/src/codecortex.egg-info/dependency_links.txt +0 -0
  12. {codecortex-0.11.0 → codecortex-0.11.1}/src/codecortex.egg-info/entry_points.txt +0 -0
  13. {codecortex-0.11.0 → codecortex-0.11.1}/src/codecortex.egg-info/requires.txt +0 -0
  14. {codecortex-0.11.0 → codecortex-0.11.1}/src/codecortex.egg-info/top_level.txt +0 -0
  15. {codecortex-0.11.0 → codecortex-0.11.1}/src/codeintel/__main__.py +0 -0
  16. {codecortex-0.11.0 → codecortex-0.11.1}/src/codeintel/auth.py +0 -0
  17. {codecortex-0.11.0 → codecortex-0.11.1}/src/codeintel/cache.py +0 -0
  18. {codecortex-0.11.0 → codecortex-0.11.1}/src/codeintel/config.py +0 -0
  19. {codecortex-0.11.0 → codecortex-0.11.1}/src/codeintel/doctor.py +0 -0
  20. {codecortex-0.11.0 → codecortex-0.11.1}/src/codeintel/gateway.py +0 -0
  21. {codecortex-0.11.0 → codecortex-0.11.1}/src/codeintel/grapher.py +0 -0
  22. {codecortex-0.11.0 → codecortex-0.11.1}/src/codeintel/http_server.py +0 -0
  23. {codecortex-0.11.0 → codecortex-0.11.1}/src/codeintel/indexer.py +0 -0
  24. {codecortex-0.11.0 → codecortex-0.11.1}/src/codeintel/injector.py +0 -0
  25. {codecortex-0.11.0 → codecortex-0.11.1}/src/codeintel/installer.py +0 -0
  26. {codecortex-0.11.0 → codecortex-0.11.1}/src/codeintel/logconfig.py +0 -0
  27. {codecortex-0.11.0 → codecortex-0.11.1}/src/codeintel/mapper.py +0 -0
  28. {codecortex-0.11.0 → codecortex-0.11.1}/src/codeintel/metrics.py +0 -0
  29. {codecortex-0.11.0 → codecortex-0.11.1}/src/codeintel/onboarding.py +0 -0
  30. {codecortex-0.11.0 → codecortex-0.11.1}/src/codeintel/policy.py +0 -0
  31. {codecortex-0.11.0 → codecortex-0.11.1}/src/codeintel/provider.py +0 -0
  32. {codecortex-0.11.0 → codecortex-0.11.1}/src/codeintel/providers/__init__.py +0 -0
  33. {codecortex-0.11.0 → codecortex-0.11.1}/src/codeintel/providers/graph.py +0 -0
  34. {codecortex-0.11.0 → codecortex-0.11.1}/src/codeintel/providers/lsp.py +0 -0
  35. {codecortex-0.11.0 → codecortex-0.11.1}/src/codeintel/providers/none.py +0 -0
  36. {codecortex-0.11.0 → codecortex-0.11.1}/src/codeintel/providers/semantic.py +0 -0
  37. {codecortex-0.11.0 → codecortex-0.11.1}/src/codeintel/reindexer.py +0 -0
  38. {codecortex-0.11.0 → codecortex-0.11.1}/src/codeintel/reset.py +0 -0
  39. {codecortex-0.11.0 → codecortex-0.11.1}/src/codeintel/searcher.py +0 -0
  40. {codecortex-0.11.0 → codecortex-0.11.1}/src/codeintel/semantic_db.py +0 -0
  41. {codecortex-0.11.0 → codecortex-0.11.1}/src/codeintel/server.py +0 -0
  42. {codecortex-0.11.0 → codecortex-0.11.1}/src/codeintel/term.py +0 -0
  43. {codecortex-0.11.0 → codecortex-0.11.1}/src/codeintel/viewer/__init__.py +0 -0
  44. {codecortex-0.11.0 → codecortex-0.11.1}/tests/test_cache.py +0 -0
  45. {codecortex-0.11.0 → codecortex-0.11.1}/tests/test_chunking.py +0 -0
  46. {codecortex-0.11.0 → codecortex-0.11.1}/tests/test_config.py +0 -0
  47. {codecortex-0.11.0 → codecortex-0.11.1}/tests/test_doctor.py +0 -0
  48. {codecortex-0.11.0 → codecortex-0.11.1}/tests/test_e2e.py +0 -0
  49. {codecortex-0.11.0 → codecortex-0.11.1}/tests/test_enterprise.py +0 -0
  50. {codecortex-0.11.0 → codecortex-0.11.1}/tests/test_gateway.py +0 -0
  51. {codecortex-0.11.0 → codecortex-0.11.1}/tests/test_graph_provider.py +0 -0
  52. {codecortex-0.11.0 → codecortex-0.11.1}/tests/test_graph_real.py +0 -0
  53. {codecortex-0.11.0 → codecortex-0.11.1}/tests/test_graph_stdin.py +0 -0
  54. {codecortex-0.11.0 → codecortex-0.11.1}/tests/test_grapher.py +0 -0
  55. {codecortex-0.11.0 → codecortex-0.11.1}/tests/test_hardening.py +0 -0
  56. {codecortex-0.11.0 → codecortex-0.11.1}/tests/test_http_auth.py +0 -0
  57. {codecortex-0.11.0 → codecortex-0.11.1}/tests/test_http_server.py +0 -0
  58. {codecortex-0.11.0 → codecortex-0.11.1}/tests/test_installer.py +0 -0
  59. {codecortex-0.11.0 → codecortex-0.11.1}/tests/test_integration.py +0 -0
  60. {codecortex-0.11.0 → codecortex-0.11.1}/tests/test_lsp_provider.py +0 -0
  61. {codecortex-0.11.0 → codecortex-0.11.1}/tests/test_lsp_real.py +0 -0
  62. {codecortex-0.11.0 → codecortex-0.11.1}/tests/test_mapper.py +0 -0
  63. {codecortex-0.11.0 → codecortex-0.11.1}/tests/test_mcp_server.py +0 -0
  64. {codecortex-0.11.0 → codecortex-0.11.1}/tests/test_model_dimension.py +0 -0
  65. {codecortex-0.11.0 → codecortex-0.11.1}/tests/test_never_raise.py +0 -0
  66. {codecortex-0.11.0 → codecortex-0.11.1}/tests/test_onboarding.py +0 -0
  67. {codecortex-0.11.0 → codecortex-0.11.1}/tests/test_rbac.py +0 -0
  68. {codecortex-0.11.0 → codecortex-0.11.1}/tests/test_reindexer.py +0 -0
  69. {codecortex-0.11.0 → codecortex-0.11.1}/tests/test_rerank.py +0 -0
  70. {codecortex-0.11.0 → codecortex-0.11.1}/tests/test_reset.py +0 -0
  71. {codecortex-0.11.0 → codecortex-0.11.1}/tests/test_semantic_provider.py +0 -0
  72. {codecortex-0.11.0 → codecortex-0.11.1}/tests/test_term.py +0 -0
  73. {codecortex-0.11.0 → codecortex-0.11.1}/tests/test_treesitter.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: codecortex
3
- Version: 0.11.0
3
+ Version: 0.11.1
4
4
  Summary: Local-first, MCP-native code-intelligence server — graph, LSP, and semantic search behind one safe code.query tool for coding agents.
5
5
  Author: Shammai Hamilton
6
6
  License-Expression: MIT
@@ -38,6 +38,22 @@ Dynamic: license-file
38
38
 
39
39
  [![CI](https://github.com/hamilton-sky/codeintel/actions/workflows/ci.yml/badge.svg)](https://github.com/hamilton-sky/codeintel/actions/workflows/ci.yml)
40
40
 
41
+ ![codeintel's own call graph — an interactive, self-contained HTML view with force / radial / layered / module layouts, complexity-sized nodes, and click-to-inspect metrics.](docs/images/graph-codeintel.png)
42
+
43
+ > *codeintel visualizing its own codebase.* One command — `codeintel graph <repo> --html` — turns any indexed repo into a **self-contained, interactive call graph** you can open offline or share as a file. Layouts, complexity-sized nodes, click-to-inspect metrics, and JSON/Markdown/SVG/PNG export. See **[docs/graph-viewer.md](docs/graph-viewer.md)**.
44
+
45
+ Prefer plain text? `codeintel map` writes a **readable architecture overview** to `CODE_INTEL.md` — node/edge counts, ranked symbols by caller count, and entry points — for skimming or for MCP hosts that can't render a graph:
46
+
47
+ <img src="docs/images/code-intel-map.png" width="520" alt="CODE_INTEL.md — the codeintel map: an architecture overview with node/edge counts and symbols ranked by caller count.">
48
+
49
+ **What `CODE_INTEL.md` is for.** It's a *static, committable* snapshot of a codebase's shape — meant to be read (by a person or an agent) **first**, instead of reconstructing structure by grepping. It covers the cases the live `code.query` tool doesn't:
50
+
51
+ - **Agents & hosts that don't speak MCP.** Not every agent supports MCP, and the server isn't always running. `codeintel map` writes a plain file any agent can read; `codeintel map --inject` also drops a pointer into `CLAUDE.md` / `AGENTS.md`, so an agent picks up the codebase's structure automatically at the start of a session.
52
+ - **A committed, diffable overview.** It lives *in the repo* — reviewable in a PR, browsable on GitHub, available offline. Re-run `codeintel map` after `codeintel index` to refresh it.
53
+ - **The load-bearing code at a glance.** Ranking symbols by caller count surfaces what most of the codebase depends on (the risky-to-change core) plus the entry points — the first things a newcomer, or an agent, should understand before touching anything.
54
+
55
+ See **[docs/map-file.md](docs/map-file.md)** for the format and the `--inject` flow.
56
+
41
57
  ## Why an agent needs it
42
58
 
43
59
  Without structural tools, an agent dropped into unfamiliar code falls back on `grep` and reads whole files to reconstruct relationships by hand — burning tokens, missing call sites, and guessing at blast radius before it edits anything. codeintel answers those questions directly instead:
@@ -4,6 +4,22 @@
4
4
 
5
5
  [![CI](https://github.com/hamilton-sky/codeintel/actions/workflows/ci.yml/badge.svg)](https://github.com/hamilton-sky/codeintel/actions/workflows/ci.yml)
6
6
 
7
+ ![codeintel's own call graph — an interactive, self-contained HTML view with force / radial / layered / module layouts, complexity-sized nodes, and click-to-inspect metrics.](docs/images/graph-codeintel.png)
8
+
9
+ > *codeintel visualizing its own codebase.* One command — `codeintel graph <repo> --html` — turns any indexed repo into a **self-contained, interactive call graph** you can open offline or share as a file. Layouts, complexity-sized nodes, click-to-inspect metrics, and JSON/Markdown/SVG/PNG export. See **[docs/graph-viewer.md](docs/graph-viewer.md)**.
10
+
11
+ Prefer plain text? `codeintel map` writes a **readable architecture overview** to `CODE_INTEL.md` — node/edge counts, ranked symbols by caller count, and entry points — for skimming or for MCP hosts that can't render a graph:
12
+
13
+ <img src="docs/images/code-intel-map.png" width="520" alt="CODE_INTEL.md — the codeintel map: an architecture overview with node/edge counts and symbols ranked by caller count.">
14
+
15
+ **What `CODE_INTEL.md` is for.** It's a *static, committable* snapshot of a codebase's shape — meant to be read (by a person or an agent) **first**, instead of reconstructing structure by grepping. It covers the cases the live `code.query` tool doesn't:
16
+
17
+ - **Agents & hosts that don't speak MCP.** Not every agent supports MCP, and the server isn't always running. `codeintel map` writes a plain file any agent can read; `codeintel map --inject` also drops a pointer into `CLAUDE.md` / `AGENTS.md`, so an agent picks up the codebase's structure automatically at the start of a session.
18
+ - **A committed, diffable overview.** It lives *in the repo* — reviewable in a PR, browsable on GitHub, available offline. Re-run `codeintel map` after `codeintel index` to refresh it.
19
+ - **The load-bearing code at a glance.** Ranking symbols by caller count surfaces what most of the codebase depends on (the risky-to-change core) plus the entry points — the first things a newcomer, or an agent, should understand before touching anything.
20
+
21
+ See **[docs/map-file.md](docs/map-file.md)** for the format and the `--inject` flow.
22
+
7
23
  ## Why an agent needs it
8
24
 
9
25
  Without structural tools, an agent dropped into unfamiliar code falls back on `grep` and reads whole files to reconstruct relationships by hand — burning tokens, missing call sites, and guessing at blast radius before it edits anything. codeintel answers those questions directly instead:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: codecortex
3
- Version: 0.11.0
3
+ Version: 0.11.1
4
4
  Summary: Local-first, MCP-native code-intelligence server — graph, LSP, and semantic search behind one safe code.query tool for coding agents.
5
5
  Author: Shammai Hamilton
6
6
  License-Expression: MIT
@@ -38,6 +38,22 @@ Dynamic: license-file
38
38
 
39
39
  [![CI](https://github.com/hamilton-sky/codeintel/actions/workflows/ci.yml/badge.svg)](https://github.com/hamilton-sky/codeintel/actions/workflows/ci.yml)
40
40
 
41
+ ![codeintel's own call graph — an interactive, self-contained HTML view with force / radial / layered / module layouts, complexity-sized nodes, and click-to-inspect metrics.](docs/images/graph-codeintel.png)
42
+
43
+ > *codeintel visualizing its own codebase.* One command — `codeintel graph <repo> --html` — turns any indexed repo into a **self-contained, interactive call graph** you can open offline or share as a file. Layouts, complexity-sized nodes, click-to-inspect metrics, and JSON/Markdown/SVG/PNG export. See **[docs/graph-viewer.md](docs/graph-viewer.md)**.
44
+
45
+ Prefer plain text? `codeintel map` writes a **readable architecture overview** to `CODE_INTEL.md` — node/edge counts, ranked symbols by caller count, and entry points — for skimming or for MCP hosts that can't render a graph:
46
+
47
+ <img src="docs/images/code-intel-map.png" width="520" alt="CODE_INTEL.md — the codeintel map: an architecture overview with node/edge counts and symbols ranked by caller count.">
48
+
49
+ **What `CODE_INTEL.md` is for.** It's a *static, committable* snapshot of a codebase's shape — meant to be read (by a person or an agent) **first**, instead of reconstructing structure by grepping. It covers the cases the live `code.query` tool doesn't:
50
+
51
+ - **Agents & hosts that don't speak MCP.** Not every agent supports MCP, and the server isn't always running. `codeintel map` writes a plain file any agent can read; `codeintel map --inject` also drops a pointer into `CLAUDE.md` / `AGENTS.md`, so an agent picks up the codebase's structure automatically at the start of a session.
52
+ - **A committed, diffable overview.** It lives *in the repo* — reviewable in a PR, browsable on GitHub, available offline. Re-run `codeintel map` after `codeintel index` to refresh it.
53
+ - **The load-bearing code at a glance.** Ranking symbols by caller count surfaces what most of the codebase depends on (the risky-to-change core) plus the entry points — the first things a newcomer, or an agent, should understand before touching anything.
54
+
55
+ See **[docs/map-file.md](docs/map-file.md)** for the format and the `--inject` flow.
56
+
41
57
  ## Why an agent needs it
42
58
 
43
59
  Without structural tools, an agent dropped into unfamiliar code falls back on `grep` and reads whole files to reconstruct relationships by hand — burning tokens, missing call sites, and guessing at blast radius before it edits anything. codeintel answers those questions directly instead:
@@ -0,0 +1 @@
1
+ __version__ = "0.11.1"
@@ -108,8 +108,8 @@
108
108
  .detail .dhead .sym{font-size:13.5px; font-weight:600; word-break:break-word; line-height:1.3}
109
109
  .detail .dhead .path{font-size:11px; color:var(--muted); margin-top:3px; word-break:break-all}
110
110
  .detail .metrics{display:grid; grid-template-columns:1fr 1fr; gap:1px; background:var(--line)}
111
- .detail .m{background:var(--panel); padding:10px 13px}
112
- .detail .m .k{font-size:10px; text-transform:uppercase; letter-spacing:.06em; color:var(--faint)}
111
+ .detail .m{background:var(--panel); padding:10px 13px; cursor:help}
112
+ .detail .m .k{font-size:10px; text-transform:uppercase; letter-spacing:.06em; color:var(--faint); border-bottom:1px dotted currentColor; display:inline-block; padding-bottom:1px}
113
113
  .detail .m .v{font-size:17px; font-weight:600; font-variant-numeric:tabular-nums; margin-top:2px}
114
114
  .detail .m .v.hi{color:var(--accent)}
115
115
  .detail .rel{padding:11px 15px 14px; font-size:11.5px; color:var(--muted)}
@@ -138,6 +138,8 @@
138
138
  .btn-primary:hover{filter:brightness(1.06); color:var(--accent-ink)}
139
139
  .toast{position:fixed; left:50%; bottom:26px; transform:translateX(-50%) translateY(20px); background:var(--ink); color:var(--bg); font-size:12.5px; font-weight:550; padding:9px 15px; border-radius:9px; opacity:0; transition:opacity .2s,transform .2s; z-index:30; pointer-events:none}
140
140
  .toast.show{opacity:1; transform:translateX(-50%) translateY(0)}
141
+ #tip{position:fixed; z-index:40; max-width:252px; background:var(--ink); color:var(--bg); font-size:11.5px; line-height:1.5; padding:9px 12px; border-radius:9px; box-shadow:var(--shadow); opacity:0; pointer-events:none; transition:opacity .12s}
142
+ #tip.show{opacity:1}
141
143
 
142
144
  @media (max-width:640px){
143
145
  .detail{width:auto; left:16px; right:16px; top:auto; bottom:16px}
@@ -191,10 +193,10 @@
191
193
  <button class="close" id="dclose" aria-label="Close">×</button>
192
194
  <div class="dhead"><div class="sym mono" id="d-sym"></div><div class="path mono" id="d-path"></div></div>
193
195
  <div class="metrics">
194
- <div class="m"><div class="k">Complexity</div><div class="v hi" id="d-cx">—</div></div>
195
- <div class="m"><div class="k">Cognitive</div><div class="v" id="d-cog">—</div></div>
196
- <div class="m"><div class="k">Callers (in)</div><div class="v" id="d-in">—</div></div>
197
- <div class="m"><div class="k">Calls (out)</div><div class="v" id="d-out">—</div></div>
196
+ <div class="m" data-tip="Cyclomatic complexity — the number of independent paths through the code (each if / for / while / case / && adds one). Higher = more branches to test and reason about. 0 = no branching, or it isn't a function body (e.g. a decorator, import, or class name)."><div class="k">Complexity</div><div class="v hi" id="d-cx">—</div></div>
197
+ <div class="m" data-tip="Cognitive complexity — how hard the code is for a human to follow. Nested and broken control flow costs more than flat code; higher = harder to read."><div class="k">Cognitive</div><div class="v" id="d-cog">—</div></div>
198
+ <div class="m" data-tip="Fan-in — how many other symbols call or reference this one. High fan-in = widely depended on, so a change here ripples out to many places."><div class="k">Callers (in)</div><div class="v" id="d-in">—</div></div>
199
+ <div class="m" data-tip="Fan-out — how many distinct symbols this one calls. High fan-out = it coordinates or depends on a lot of other code."><div class="k">Calls (out)</div><div class="v" id="d-out">—</div></div>
198
200
  </div>
199
201
  <div class="rel" id="d-rel"></div>
200
202
  </div>
@@ -430,6 +432,21 @@ const DATA = __DATA__;
430
432
  document.querySelectorAll(".seg-btn").forEach(b=>b.onclick=()=>setLayout(b.dataset.layout));
431
433
  $("relayout").onclick=()=>setLayout(curLayout);
432
434
 
435
+ // ---- metric tooltips (custom + reliable — native `title` only re-fires after a fresh mouse "rest",
436
+ // so it silently skips adjacent cells; a per-cell mouseenter handler always fires) ----
437
+ const tipEl=document.createElement("div"); tipEl.id="tip"; document.body.appendChild(tipEl);
438
+ function showTip(el){
439
+ const t=el.getAttribute("data-tip"); if(!t) return;
440
+ tipEl.textContent=t; tipEl.classList.add("show"); tipEl.style.left="0px"; tipEl.style.top="0px";
441
+ const r=el.getBoundingClientRect(), tr=tipEl.getBoundingClientRect();
442
+ tipEl.style.left=Math.max(8, Math.min(innerWidth-tr.width-8, r.left+r.width/2-tr.width/2))+"px";
443
+ const y=r.top-tr.height-9; tipEl.style.top=(y<8 ? r.bottom+9 : y)+"px";
444
+ }
445
+ document.querySelectorAll(".metrics .m").forEach(m=>{
446
+ m.addEventListener("mouseenter",()=>showTip(m));
447
+ m.addEventListener("mouseleave",()=>tipEl.classList.remove("show"));
448
+ });
449
+
433
450
  // ---- exports ----
434
451
  function download(name,text,mime){ try{ const b=new Blob([text],{type:mime||"text/plain"}); const u=URL.createObjectURL(b); const a=document.createElement("a"); a.href=u; a.download=name; document.body.appendChild(a); a.click(); a.remove(); setTimeout(()=>URL.revokeObjectURL(u),1500); toast("Downloaded "+name); }catch(e){ toast("Download blocked here — use Copy"); } }
435
452
  function toMarkdown(){
@@ -1 +0,0 @@
1
- __version__ = "0.11.0"
File without changes
File without changes
File without changes