codemesh 0.1.7__tar.gz → 0.1.8__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 (72) hide show
  1. {codemesh-0.1.7 → codemesh-0.1.8}/PKG-INFO +1 -1
  2. {codemesh-0.1.7 → codemesh-0.1.8}/codemesh/__init__.py +1 -1
  3. {codemesh-0.1.7 → codemesh-0.1.8}/codemesh/cli/install_cmd.py +18 -0
  4. {codemesh-0.1.7 → codemesh-0.1.8}/codemesh/cli/main.py +14 -9
  5. {codemesh-0.1.7 → codemesh-0.1.8}/codemesh/viz/server.py +5 -0
  6. codemesh-0.1.8/codemesh/viz/static/cytoscape.min.js +32 -0
  7. {codemesh-0.1.7 → codemesh-0.1.8}/codemesh/viz/templates/index.html +13 -10
  8. {codemesh-0.1.7 → codemesh-0.1.8}/pyproject.toml +1 -1
  9. {codemesh-0.1.7 → codemesh-0.1.8}/uv.lock +23 -1
  10. {codemesh-0.1.7 → codemesh-0.1.8}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
  11. {codemesh-0.1.7 → codemesh-0.1.8}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
  12. {codemesh-0.1.7 → codemesh-0.1.8}/.github/workflows/ci.yml +0 -0
  13. {codemesh-0.1.7 → codemesh-0.1.8}/.github/workflows/publish.yml +0 -0
  14. {codemesh-0.1.7 → codemesh-0.1.8}/.gitignore +0 -0
  15. {codemesh-0.1.7 → codemesh-0.1.8}/CHANGELOG.md +0 -0
  16. {codemesh-0.1.7 → codemesh-0.1.8}/CONTRIBUTING.md +0 -0
  17. {codemesh-0.1.7 → codemesh-0.1.8}/LICENSE +0 -0
  18. {codemesh-0.1.7 → codemesh-0.1.8}/Makefile +0 -0
  19. {codemesh-0.1.7 → codemesh-0.1.8}/README.md +0 -0
  20. {codemesh-0.1.7 → codemesh-0.1.8}/codemesh/__main__.py +0 -0
  21. {codemesh-0.1.7 → codemesh-0.1.8}/codemesh/cli/__init__.py +0 -0
  22. {codemesh-0.1.7 → codemesh-0.1.8}/codemesh/cli/init.py +0 -0
  23. {codemesh-0.1.7 → codemesh-0.1.8}/codemesh/context/__init__.py +0 -0
  24. {codemesh-0.1.7 → codemesh-0.1.8}/codemesh/context/builder.py +0 -0
  25. {codemesh-0.1.7 → codemesh-0.1.8}/codemesh/db/__init__.py +0 -0
  26. {codemesh-0.1.7 → codemesh-0.1.8}/codemesh/db/connection.py +0 -0
  27. {codemesh-0.1.7 → codemesh-0.1.8}/codemesh/db/queries.py +0 -0
  28. {codemesh-0.1.7 → codemesh-0.1.8}/codemesh/db/schema.py +0 -0
  29. {codemesh-0.1.7 → codemesh-0.1.8}/codemesh/embedding/__init__.py +0 -0
  30. {codemesh-0.1.7 → codemesh-0.1.8}/codemesh/extraction/__init__.py +0 -0
  31. {codemesh-0.1.7 → codemesh-0.1.8}/codemesh/extraction/languages/__init__.py +0 -0
  32. {codemesh-0.1.7 → codemesh-0.1.8}/codemesh/extraction/languages/c_family.py +0 -0
  33. {codemesh-0.1.7 → codemesh-0.1.8}/codemesh/extraction/languages/go.py +0 -0
  34. {codemesh-0.1.7 → codemesh-0.1.8}/codemesh/extraction/languages/java.py +0 -0
  35. {codemesh-0.1.7 → codemesh-0.1.8}/codemesh/extraction/languages/python.py +0 -0
  36. {codemesh-0.1.7 → codemesh-0.1.8}/codemesh/extraction/languages/rust.py +0 -0
  37. {codemesh-0.1.7 → codemesh-0.1.8}/codemesh/extraction/languages/swift.py +0 -0
  38. {codemesh-0.1.7 → codemesh-0.1.8}/codemesh/extraction/languages/typescript.py +0 -0
  39. {codemesh-0.1.7 → codemesh-0.1.8}/codemesh/extraction/orchestrator.py +0 -0
  40. {codemesh-0.1.7 → codemesh-0.1.8}/codemesh/graph/__init__.py +0 -0
  41. {codemesh-0.1.7 → codemesh-0.1.8}/codemesh/graph/query_manager.py +0 -0
  42. {codemesh-0.1.7 → codemesh-0.1.8}/codemesh/graph/traverser.py +0 -0
  43. {codemesh-0.1.7 → codemesh-0.1.8}/codemesh/indexer.py +0 -0
  44. {codemesh-0.1.7 → codemesh-0.1.8}/codemesh/mcp/__init__.py +0 -0
  45. {codemesh-0.1.7 → codemesh-0.1.8}/codemesh/mcp/server.py +0 -0
  46. {codemesh-0.1.7 → codemesh-0.1.8}/codemesh/mcp/tools.py +0 -0
  47. {codemesh-0.1.7 → codemesh-0.1.8}/codemesh/querier.py +0 -0
  48. {codemesh-0.1.7 → codemesh-0.1.8}/codemesh/resolution/__init__.py +0 -0
  49. {codemesh-0.1.7 → codemesh-0.1.8}/codemesh/resolution/frameworks/__init__.py +0 -0
  50. {codemesh-0.1.7 → codemesh-0.1.8}/codemesh/resolution/frameworks/django.py +0 -0
  51. {codemesh-0.1.7 → codemesh-0.1.8}/codemesh/resolution/frameworks/fastapi.py +0 -0
  52. {codemesh-0.1.7 → codemesh-0.1.8}/codemesh/resolution/import_resolver.py +0 -0
  53. {codemesh-0.1.7 → codemesh-0.1.8}/codemesh/resolution/name_matcher.py +0 -0
  54. {codemesh-0.1.7 → codemesh-0.1.8}/codemesh/resolution/resolver.py +0 -0
  55. {codemesh-0.1.7 → codemesh-0.1.8}/codemesh/retrieval/__init__.py +0 -0
  56. {codemesh-0.1.7 → codemesh-0.1.8}/codemesh/search/__init__.py +0 -0
  57. {codemesh-0.1.7 → codemesh-0.1.8}/codemesh/sync/__init__.py +0 -0
  58. {codemesh-0.1.7 → codemesh-0.1.8}/codemesh/sync/watcher.py +0 -0
  59. {codemesh-0.1.7 → codemesh-0.1.8}/codemesh/types.py +0 -0
  60. {codemesh-0.1.7 → codemesh-0.1.8}/codemesh/viz/__init__.py +0 -0
  61. {codemesh-0.1.7 → codemesh-0.1.8}/codemesh/viz/graph_builder.py +0 -0
  62. {codemesh-0.1.7 → codemesh-0.1.8}/tests/__init__.py +0 -0
  63. {codemesh-0.1.7 → codemesh-0.1.8}/tests/conftest.py +0 -0
  64. {codemesh-0.1.7 → codemesh-0.1.8}/tests/fixtures/__init__.py +0 -0
  65. {codemesh-0.1.7 → codemesh-0.1.8}/tests/test_adversarial.py +0 -0
  66. {codemesh-0.1.7 → codemesh-0.1.8}/tests/test_benchmark_repoqa.py +0 -0
  67. {codemesh-0.1.7 → codemesh-0.1.8}/tests/test_embedding_e2e.py +0 -0
  68. {codemesh-0.1.7 → codemesh-0.1.8}/tests/test_extraction.py +0 -0
  69. {codemesh-0.1.7 → codemesh-0.1.8}/tests/test_integration.py +0 -0
  70. {codemesh-0.1.7 → codemesh-0.1.8}/tests/test_llm_judge.py +0 -0
  71. {codemesh-0.1.7 → codemesh-0.1.8}/tests/test_performance.py +0 -0
  72. {codemesh-0.1.7 → codemesh-0.1.8}/tests/test_viz.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: codemesh
3
- Version: 0.1.7
3
+ Version: 0.1.8
4
4
  Summary: BM25 keyword search and graph walk for code intelligence
5
5
  Project-URL: Homepage, https://github.com/gkatte/codemesh
6
6
  Project-URL: Repository, https://github.com/gkatte/codemesh
@@ -2,4 +2,4 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- __version__ = "0.1.7"
5
+ __version__ = "0.1.8"
@@ -632,3 +632,21 @@ def clean_project(root: Path, force: bool = False) -> dict:
632
632
  removed.append(str(cursor_rules))
633
633
 
634
634
  return {"removed": removed, "modified": modified}
635
+
636
+
637
+ def has_project_artifacts(root: Path) -> bool:
638
+ """Check if any CodeMesh project artifacts exist at the given root."""
639
+ codemesh_dir = root / ".codemesh"
640
+ claude_md = root / "CLAUDE.md"
641
+ agents_md = root / "AGENTS.md"
642
+ cursor_rules = root / ".cursor" / "rules" / "codemesh.mdc"
643
+
644
+ if codemesh_dir.exists():
645
+ return True
646
+ if claude_md.exists() and "CodeMesh" in claude_md.read_text():
647
+ return True
648
+ if agents_md.exists() and "CodeMesh" in agents_md.read_text():
649
+ return True
650
+ if cursor_rules.exists():
651
+ return True
652
+ return False
@@ -174,6 +174,7 @@ def uninstall(
174
174
  uninstall_cursor,
175
175
  uninstall_hermes,
176
176
  clean_project,
177
+ has_project_artifacts,
177
178
  select_agents_interactive,
178
179
  )
179
180
 
@@ -184,18 +185,20 @@ def uninstall(
184
185
  agents = detect_agents(root)
185
186
  configured = [a for a in agents if a.configured]
186
187
 
187
- if not configured:
188
- typer.echo("CodeMesh is not configured for any detected agents.")
189
- raise typer.Exit(1)
190
-
191
188
  if yes:
189
+ # Non-interactive: uninstall from all configured agents (may be empty)
192
190
  targets = [a.name for a in configured]
193
191
  else:
192
+ # Interactive
193
+ if not configured and not has_project_artifacts(root):
194
+ typer.echo("CodeMesh is not configured for any detected agents.")
195
+ raise typer.Exit(1)
194
196
  targets = select_agents_interactive(agents, mode="uninstall")
195
197
 
196
198
  if "all" in targets:
197
199
  targets = ["claude", "cursor", "codex", "hermes"]
198
200
 
201
+ # ── Remove MCP server configs ──────────────────────────────────────────
199
202
  _UNINSTALL_FUNCS = {
200
203
  "claude": lambda: uninstall_claude(root, global_config=global_config),
201
204
  "cursor": lambda: uninstall_cursor(root),
@@ -212,12 +215,14 @@ def uninstall(
212
215
  else:
213
216
  typer.echo(f"Unknown agent: {agent}", err=True)
214
217
 
215
- typer.echo("CodeMesh MCP server removed:")
216
- for agent, r in results.items():
217
- for key, val in r.items():
218
- if val:
219
- typer.echo(f" {agent}/{key}: {val}")
218
+ if results:
219
+ typer.echo("CodeMesh MCP server removed:")
220
+ for agent, r in results.items():
221
+ for key, val in r.items():
222
+ if val:
223
+ typer.echo(f" {agent}/{key}: {val}")
220
224
 
225
+ # ── Remove project artifacts ───────────────────────────────────────────
221
226
  if clean:
222
227
  removed = clean_project(root, force=yes)
223
228
  if removed["removed"] or removed["modified"]:
@@ -9,18 +9,23 @@ from typing import Annotated
9
9
 
10
10
  from fastapi import FastAPI, HTTPException, Query
11
11
  from fastapi.responses import HTMLResponse, JSONResponse
12
+ from fastapi.staticfiles import StaticFiles
12
13
 
13
14
  from codemesh.db.connection import create_connection, get_db_path
14
15
  from codemesh.db.queries import count_edges, count_nodes, get_node, search_nodes_fts
15
16
  from codemesh.viz.graph_builder import build_graph
16
17
 
17
18
  TEMPLATES_DIR = Path(__file__).parent / "templates"
19
+ STATIC_DIR = Path(__file__).parent / "static"
18
20
 
19
21
 
20
22
  def create_app(root: Path) -> FastAPI:
21
23
  """Create the FastAPI application."""
22
24
  app = FastAPI(title="CodeMesh Visualization")
23
25
 
26
+ if STATIC_DIR.exists():
27
+ app.mount("/static", StaticFiles(directory=str(STATIC_DIR)), name="static")
28
+
24
29
  @app.get("/", response_class=HTMLResponse)
25
30
  async def index():
26
31
  html_path = TEMPLATES_DIR / "index.html"