codecortex 0.29.0__tar.gz → 0.29.3__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.
- {codecortex-0.29.0/src/codecortex.egg-info → codecortex-0.29.3}/PKG-INFO +3 -3
- {codecortex-0.29.0 → codecortex-0.29.3}/README.md +2 -2
- {codecortex-0.29.0 → codecortex-0.29.3/src/codecortex.egg-info}/PKG-INFO +3 -3
- codecortex-0.29.3/src/codeintel/__init__.py +1 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/commands/index.py +10 -5
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/semantic_db.py +27 -5
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_cli_commands.py +16 -2
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_index_failure_reason.py +44 -2
- codecortex-0.29.0/src/codeintel/__init__.py +0 -1
- {codecortex-0.29.0 → codecortex-0.29.3}/LICENSE +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/pyproject.toml +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/setup.cfg +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codecortex.egg-info/SOURCES.txt +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codecortex.egg-info/dependency_links.txt +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codecortex.egg-info/entry_points.txt +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codecortex.egg-info/requires.txt +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codecortex.egg-info/top_level.txt +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/__main__.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/agent_prompt.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/auth.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/c4.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/c4_check.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/c4_layers.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/cache.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/changed_range.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/commands/__init__.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/commands/_common.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/commands/c4.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/commands/doctor.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/commands/gen_token.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/commands/graph.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/commands/install.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/commands/map.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/commands/prompt.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/commands/query.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/commands/reset.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/commands/serve.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/commands/serve_http.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/commands/setup.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/commands/status.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/commands/uninstall.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/config.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/containment.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/doctor.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/filelock.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/gateway.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/graph_answer.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/graph_backend.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/graph_changed.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/graph_confidence.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/graph_dispatch.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/graph_edges.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/graph_ops.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/graph_render.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/graph_resolution.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/graph_targets.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/grapher.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/http_server.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/indexer.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/injector.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/installer.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/lang_config.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/loc.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/logconfig.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/mapper.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/metrics.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/onboarding.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/outcome.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/paths.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/per_thread.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/policy.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/progress.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/provider.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/providers/__init__.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/providers/graph.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/providers/lsp.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/providers/none.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/providers/semantic.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/py.typed +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/qualifier_scan.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/query_ops.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/redact.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/reindexer.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/reset.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/searcher.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/server.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/source_kind.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/symbol_diff.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/term.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/verify.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/viewer/__init__.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/viewer/graph_template.html +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/src/codeintel/wire_text.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_agent_prompt.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_backend_failure_detail.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_backend_reaper.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_background_index_failure.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_bench_corpus_typed.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_bench_gate.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_bench_graphify.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_bench_oracle.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_bench_oracle_ts.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_bench_qualified.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_c4.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_c4_check.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_c4_layers.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_c4_model.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_c4_output.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_cache.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_changed_range.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_chunking.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_cli_help.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_cli_install_dry_run.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_cli_install_offer_injection.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_cold_process.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_config.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_corpus.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_could_not_ask_semantic.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_dispatch_callers.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_docs_ci_claims.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_docs_deadcode_withdrawal.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_docs_trust_claims.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_doctor.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_e2e.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_edge_confidence.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_edge_endpoint_cap.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_engine_adoption.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_enterprise.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_gateway.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_graph_failure_population.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_graph_provider.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_graph_real.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_graph_stdin.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_grapher.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_hard_exit.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_hardening.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_http_auth.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_http_server.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_incompleteness.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_index_incompleteness.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_index_progress.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_indexer_binary.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_installer.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_integration.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_lang_config.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_loc_census.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_lsp_language_coverage.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_lsp_provider.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_lsp_real.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_mapper.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_mcp_answer_size.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_mcp_handshake.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_mcp_server.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_missing_target.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_model_dimension.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_never_raise.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_null_reason_and_ripple.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_onboarding.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_per_thread.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_qualifier_scan.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_query_budget.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_rbac.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_redaction_boundary.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_reindex_lock.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_reindexer.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_rerank.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_reset.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_semantic_provider.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_source_kind.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_staleness.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_summary_integrity.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_symbol_context.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_symbol_diff.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_term.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_treesitter.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_uninstall.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_upgrade_path.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_verify.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_verify_call.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_version_skew.py +0 -0
- {codecortex-0.29.0 → codecortex-0.29.3}/tests/test_wire_text.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: codecortex
|
|
3
|
-
Version: 0.29.
|
|
3
|
+
Version: 0.29.3
|
|
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
|
|
@@ -283,7 +283,7 @@ Prefer plain text? `codeintel map` writes a **readable architecture overview** t
|
|
|
283
283
|
**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:
|
|
284
284
|
|
|
285
285
|
- **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 short, tool-naming pointer block into `AGENTS.md` (the cross-tool surface read by Codex, Cursor, Zed, and others — created with your consent if it doesn't exist yet) plus a one-line `@AGENTS.md` import into `CLAUDE.md`, and writes the fuller `USING_CODEINTEL.md` guide the block points to — into **your** repo, which is why there is no such file to click here — so an agent knows to reach for `code.query` before it reaches for grep, not just that a `CODE_INTEL.md` exists.
|
|
286
|
-
- **A committed, diffable overview.** It lives *in the repo* — reviewable in a PR, browsable on GitHub, available offline.
|
|
286
|
+
- **A committed, diffable overview.** It lives *in the repo* — reviewable in a PR, browsable on GitHub, available offline. Once it exists, `codeintel index` keeps it current; `index` never creates it on its own.
|
|
287
287
|
- **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. The ranking counts `CALLS` edges into **callable** nodes only (functions, methods, classes, interfaces, routes), and skips test, generated and archived files. Both constraints are load-bearing rather than tidy-up: without them a 12,638-node TypeScript repo ranked `logger` (a *folder* node) at 716 and `onClick` at 107, and a Python repo ranked YAML and JSON keys — `flow` from a `.flow.yaml`, `feature` from a `.schema.json` — as its most depended-on symbols. This repo's own map is Python-heavy and barely showed it, which is exactly why dogfooding did not catch it.
|
|
288
288
|
|
|
289
289
|
See **[docs/map-file.md](docs/map-file.md)** for the format and the `--inject` flow.
|
|
@@ -449,7 +449,7 @@ Full system docs live in [`docs/`](docs/) — start with the index:
|
|
|
449
449
|
| `codeintel install [--agent auto\|claude\|codex\|gemini\|zed\|all] [--no-verify] [--relative-command]` | Register codeintel with the agents installed on this machine (`auto`, the default), then prove it by completing a real MCP handshake against the registered command |
|
|
450
450
|
| `codeintel setup [project_root] [--all] [--index] [--warm] [--languages] [--install-uv] [--install-deps] [--json]` | Prepare backends + index this repo (`--all` = one command: do everything automatable, idempotent); ends with a health report + **Next:** steps |
|
|
451
451
|
| `codeintel prompt [project_root] [--agent auto\|claude\|codex\|gemini\|zed] [--fresh] [--deep]` | Print a paste-to-your-agent setup prompt; probes health and emits only the outstanding steps (or "just restart me" when already healthy). `--fresh` = the full sequence from `pip install`, to send a friend |
|
|
452
|
-
| `codeintel index [project_root] [--quiet]` | Index a repo (semantic embeddings + best-effort graph
|
|
452
|
+
| `codeintel index [project_root] [--quiet]` | Index a repo (semantic embeddings + best-effort graph refresh, and a refresh of `CODE_INTEL.md` if `codeintel map` already created one), with a live progress display; `--quiet` prints only the result line |
|
|
453
453
|
| `codeintel serve` | Start the MCP server (stdio transport) |
|
|
454
454
|
| `codeintel serve-http [--host HOST] [--port 8766] [--allow-remote] [--token TOKEN]` | Start the HTTP transport (loopback-only unless `--allow-remote`; `--token` requires a bearer token on every request) |
|
|
455
455
|
| `codeintel query --op OP --target TARGET [--engine auto] [--project-root DIR] [--json]` | Run a single query and print the result |
|
|
@@ -242,7 +242,7 @@ Prefer plain text? `codeintel map` writes a **readable architecture overview** t
|
|
|
242
242
|
**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:
|
|
243
243
|
|
|
244
244
|
- **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 short, tool-naming pointer block into `AGENTS.md` (the cross-tool surface read by Codex, Cursor, Zed, and others — created with your consent if it doesn't exist yet) plus a one-line `@AGENTS.md` import into `CLAUDE.md`, and writes the fuller `USING_CODEINTEL.md` guide the block points to — into **your** repo, which is why there is no such file to click here — so an agent knows to reach for `code.query` before it reaches for grep, not just that a `CODE_INTEL.md` exists.
|
|
245
|
-
- **A committed, diffable overview.** It lives *in the repo* — reviewable in a PR, browsable on GitHub, available offline.
|
|
245
|
+
- **A committed, diffable overview.** It lives *in the repo* — reviewable in a PR, browsable on GitHub, available offline. Once it exists, `codeintel index` keeps it current; `index` never creates it on its own.
|
|
246
246
|
- **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. The ranking counts `CALLS` edges into **callable** nodes only (functions, methods, classes, interfaces, routes), and skips test, generated and archived files. Both constraints are load-bearing rather than tidy-up: without them a 12,638-node TypeScript repo ranked `logger` (a *folder* node) at 716 and `onClick` at 107, and a Python repo ranked YAML and JSON keys — `flow` from a `.flow.yaml`, `feature` from a `.schema.json` — as its most depended-on symbols. This repo's own map is Python-heavy and barely showed it, which is exactly why dogfooding did not catch it.
|
|
247
247
|
|
|
248
248
|
See **[docs/map-file.md](docs/map-file.md)** for the format and the `--inject` flow.
|
|
@@ -408,7 +408,7 @@ Full system docs live in [`docs/`](docs/) — start with the index:
|
|
|
408
408
|
| `codeintel install [--agent auto\|claude\|codex\|gemini\|zed\|all] [--no-verify] [--relative-command]` | Register codeintel with the agents installed on this machine (`auto`, the default), then prove it by completing a real MCP handshake against the registered command |
|
|
409
409
|
| `codeintel setup [project_root] [--all] [--index] [--warm] [--languages] [--install-uv] [--install-deps] [--json]` | Prepare backends + index this repo (`--all` = one command: do everything automatable, idempotent); ends with a health report + **Next:** steps |
|
|
410
410
|
| `codeintel prompt [project_root] [--agent auto\|claude\|codex\|gemini\|zed] [--fresh] [--deep]` | Print a paste-to-your-agent setup prompt; probes health and emits only the outstanding steps (or "just restart me" when already healthy). `--fresh` = the full sequence from `pip install`, to send a friend |
|
|
411
|
-
| `codeintel index [project_root] [--quiet]` | Index a repo (semantic embeddings + best-effort graph
|
|
411
|
+
| `codeintel index [project_root] [--quiet]` | Index a repo (semantic embeddings + best-effort graph refresh, and a refresh of `CODE_INTEL.md` if `codeintel map` already created one), with a live progress display; `--quiet` prints only the result line |
|
|
412
412
|
| `codeintel serve` | Start the MCP server (stdio transport) |
|
|
413
413
|
| `codeintel serve-http [--host HOST] [--port 8766] [--allow-remote] [--token TOKEN]` | Start the HTTP transport (loopback-only unless `--allow-remote`; `--token` requires a bearer token on every request) |
|
|
414
414
|
| `codeintel query --op OP --target TARGET [--engine auto] [--project-root DIR] [--json]` | Run a single query and print the result |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: codecortex
|
|
3
|
-
Version: 0.29.
|
|
3
|
+
Version: 0.29.3
|
|
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
|
|
@@ -283,7 +283,7 @@ Prefer plain text? `codeintel map` writes a **readable architecture overview** t
|
|
|
283
283
|
**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:
|
|
284
284
|
|
|
285
285
|
- **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 short, tool-naming pointer block into `AGENTS.md` (the cross-tool surface read by Codex, Cursor, Zed, and others — created with your consent if it doesn't exist yet) plus a one-line `@AGENTS.md` import into `CLAUDE.md`, and writes the fuller `USING_CODEINTEL.md` guide the block points to — into **your** repo, which is why there is no such file to click here — so an agent knows to reach for `code.query` before it reaches for grep, not just that a `CODE_INTEL.md` exists.
|
|
286
|
-
- **A committed, diffable overview.** It lives *in the repo* — reviewable in a PR, browsable on GitHub, available offline.
|
|
286
|
+
- **A committed, diffable overview.** It lives *in the repo* — reviewable in a PR, browsable on GitHub, available offline. Once it exists, `codeintel index` keeps it current; `index` never creates it on its own.
|
|
287
287
|
- **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. The ranking counts `CALLS` edges into **callable** nodes only (functions, methods, classes, interfaces, routes), and skips test, generated and archived files. Both constraints are load-bearing rather than tidy-up: without them a 12,638-node TypeScript repo ranked `logger` (a *folder* node) at 716 and `onClick` at 107, and a Python repo ranked YAML and JSON keys — `flow` from a `.flow.yaml`, `feature` from a `.schema.json` — as its most depended-on symbols. This repo's own map is Python-heavy and barely showed it, which is exactly why dogfooding did not catch it.
|
|
288
288
|
|
|
289
289
|
See **[docs/map-file.md](docs/map-file.md)** for the format and the `--inject` flow.
|
|
@@ -449,7 +449,7 @@ Full system docs live in [`docs/`](docs/) — start with the index:
|
|
|
449
449
|
| `codeintel install [--agent auto\|claude\|codex\|gemini\|zed\|all] [--no-verify] [--relative-command]` | Register codeintel with the agents installed on this machine (`auto`, the default), then prove it by completing a real MCP handshake against the registered command |
|
|
450
450
|
| `codeintel setup [project_root] [--all] [--index] [--warm] [--languages] [--install-uv] [--install-deps] [--json]` | Prepare backends + index this repo (`--all` = one command: do everything automatable, idempotent); ends with a health report + **Next:** steps |
|
|
451
451
|
| `codeintel prompt [project_root] [--agent auto\|claude\|codex\|gemini\|zed] [--fresh] [--deep]` | Print a paste-to-your-agent setup prompt; probes health and emits only the outstanding steps (or "just restart me" when already healthy). `--fresh` = the full sequence from `pip install`, to send a friend |
|
|
452
|
-
| `codeintel index [project_root] [--quiet]` | Index a repo (semantic embeddings + best-effort graph
|
|
452
|
+
| `codeintel index [project_root] [--quiet]` | Index a repo (semantic embeddings + best-effort graph refresh, and a refresh of `CODE_INTEL.md` if `codeintel map` already created one), with a live progress display; `--quiet` prints only the result line |
|
|
453
453
|
| `codeintel serve` | Start the MCP server (stdio transport) |
|
|
454
454
|
| `codeintel serve-http [--host HOST] [--port 8766] [--allow-remote] [--token TOKEN]` | Start the HTTP transport (loopback-only unless `--allow-remote`; `--token` requires a bearer token on every request) |
|
|
455
455
|
| `codeintel query --op OP --target TARGET [--engine auto] [--project-root DIR] [--json]` | Run a single query and print the result |
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.29.3"
|
|
@@ -182,13 +182,18 @@ def run(args: Any) -> int:
|
|
|
182
182
|
|
|
183
183
|
lock.close()
|
|
184
184
|
|
|
185
|
-
# best-effort map refresh after index (fast, kept silent — not worth a checklist row)
|
|
185
|
+
# best-effort map refresh after index (fast, kept silent — not worth a checklist row). REFRESH
|
|
186
|
+
# only: `index` keeps a CODE_INTEL.md that `codeintel map` already wrote current, and never
|
|
187
|
+
# creates one. Creating it put an uncommitted file into every repo on the first `index` —
|
|
188
|
+
# including one whose index had just failed — when writing into the repo is `map`'s job, asked
|
|
189
|
+
# for by name.
|
|
186
190
|
try:
|
|
187
|
-
|
|
188
|
-
|
|
191
|
+
if os.path.isfile(os.path.join(project_root, "CODE_INTEL.md")):
|
|
192
|
+
from codeintel.mapper import MapGenerator
|
|
193
|
+
from codeintel.providers.graph import GraphProvider
|
|
189
194
|
|
|
190
|
-
|
|
191
|
-
|
|
195
|
+
gen = MapGenerator(GraphProvider())
|
|
196
|
+
gen.write(project_root, gen.generate(project_root))
|
|
192
197
|
except Exception:
|
|
193
198
|
pass
|
|
194
199
|
|
|
@@ -114,11 +114,19 @@ def load_embedder(model_name: str):
|
|
|
114
114
|
try:
|
|
115
115
|
return TextEmbedding(model_name=model_name)
|
|
116
116
|
except ValueError as exc:
|
|
117
|
-
# fastembed
|
|
118
|
-
# list before any network call (measured: 0.000s, no
|
|
119
|
-
#
|
|
120
|
-
#
|
|
121
|
-
#
|
|
117
|
+
# fastembed raises ValueError for TWO different causes. One is a model it does not ship,
|
|
118
|
+
# raised from its own supported-model list before any network call (measured: 0.000s, no
|
|
119
|
+
# request attempted). The other is `Could not load model <name> from any source.`, raised
|
|
120
|
+
# by fastembed 0.9 after its download retries are exhausted — for a name it DOES ship.
|
|
121
|
+
# Telling the second one to check the `model` key sent a blocked download off to debug a
|
|
122
|
+
# correct config. The type cannot separate them, so ask fastembed's own list (structural,
|
|
123
|
+
# not the message text): a name it ships failed to download.
|
|
124
|
+
if _fastembed_ships(TextEmbedding, model_name) is True:
|
|
125
|
+
raise EmbeddingModelUnavailable(model_name, exc, _download_remedy()) from exc
|
|
126
|
+
# This is a CONFIGURATION error — the `model` key names something that does not exist —
|
|
127
|
+
# and the download remedy is actively misleading for it: there is no proxy to fix and no
|
|
128
|
+
# cache to pre-seed, because nothing was ever going to be fetched. Also the fallback when
|
|
129
|
+
# the list cannot be read at all.
|
|
122
130
|
raise EmbeddingModelUnavailable(
|
|
123
131
|
model_name, exc,
|
|
124
132
|
"that is not a model fastembed ships — check the `model` key in your codeintel "
|
|
@@ -149,6 +157,20 @@ def load_embedder(model_name: str):
|
|
|
149
157
|
raise EmbeddingModelUnavailable(model_name, exc, _download_remedy()) from exc
|
|
150
158
|
|
|
151
159
|
|
|
160
|
+
def _fastembed_ships(text_embedding, model_name: str) -> bool | None:
|
|
161
|
+
"""Whether fastembed's supported-model list names *model_name*; None when it cannot be read.
|
|
162
|
+
|
|
163
|
+
Only consulted on the failure path, so the listing is paid once per failed load. Never raises:
|
|
164
|
+
a classifier that throws would replace the error it exists to explain.
|
|
165
|
+
"""
|
|
166
|
+
try:
|
|
167
|
+
models = text_embedding.list_supported_models()
|
|
168
|
+
wanted = str(model_name).lower()
|
|
169
|
+
return any(str(m.get("model", "")).lower() == wanted for m in models)
|
|
170
|
+
except Exception:
|
|
171
|
+
return None
|
|
172
|
+
|
|
173
|
+
|
|
152
174
|
def release_embedder(embedder) -> None:
|
|
153
175
|
"""Release fastembed/onnxruntime native state before interpreter finalization.
|
|
154
176
|
|
|
@@ -698,9 +698,14 @@ class _FakeDb:
|
|
|
698
698
|
self.closed = True
|
|
699
699
|
|
|
700
700
|
|
|
701
|
-
def _stub_index(monkeypatch, tmp_path, *, count=3, indexer_exc=None, has_graph_backend=False
|
|
702
|
-
|
|
701
|
+
def _stub_index(monkeypatch, tmp_path, *, count=3, indexer_exc=None, has_graph_backend=False,
|
|
702
|
+
has_map=True):
|
|
703
|
+
"""Stand in for the whole semantic pass. Returns the recorder the assertions read.
|
|
704
|
+
|
|
705
|
+
*has_map* seeds a CODE_INTEL.md, since `index` only refreshes a map that already exists."""
|
|
703
706
|
seen: dict = {"db": None, "reindexed": False, "mapped": False}
|
|
707
|
+
if has_map:
|
|
708
|
+
(tmp_path / "CODE_INTEL.md").write_text("# existing map\n")
|
|
704
709
|
|
|
705
710
|
def _make_db(path):
|
|
706
711
|
seen["db"] = _FakeDb(path)
|
|
@@ -787,6 +792,15 @@ def test_index_still_refreshes_the_map_after_a_semantic_failure(monkeypatch, tmp
|
|
|
787
792
|
assert seen["mapped"] is True
|
|
788
793
|
|
|
789
794
|
|
|
795
|
+
def test_index_never_creates_a_map_the_repo_does_not_have(monkeypatch, tmp_path):
|
|
796
|
+
"""Writing a file into the user's repo is `codeintel map`'s job, asked for by name. `index`
|
|
797
|
+
created CODE_INTEL.md on first run in every repo it touched — even when the index failed."""
|
|
798
|
+
seen = _stub_index(monkeypatch, tmp_path, has_map=False)
|
|
799
|
+
assert import_module("codeintel.commands.index").run(_args(project_root=str(tmp_path))) == 0
|
|
800
|
+
assert seen["mapped"] is False
|
|
801
|
+
assert not (tmp_path / "CODE_INTEL.md").exists()
|
|
802
|
+
|
|
803
|
+
|
|
790
804
|
def test_index_skips_the_graph_reindex_when_the_backend_is_absent(monkeypatch, tmp_path):
|
|
791
805
|
seen = _stub_index(monkeypatch, tmp_path, has_graph_backend=False)
|
|
792
806
|
import_module("codeintel.commands.index").run(_args(project_root=str(tmp_path)))
|
|
@@ -50,8 +50,11 @@ _DOWNLOAD_REMEDY = (
|
|
|
50
50
|
)
|
|
51
51
|
|
|
52
52
|
|
|
53
|
-
def _load_with(cause: BaseException, model_name: str = DEFAULT_MODEL):
|
|
54
|
-
"""`load_embedder` with fastembed's constructor forced to raise *cause* — the real path.
|
|
53
|
+
def _load_with(cause: BaseException, model_name: str = DEFAULT_MODEL, supported=None):
|
|
54
|
+
"""`load_embedder` with fastembed's constructor forced to raise *cause* — the real path.
|
|
55
|
+
|
|
56
|
+
*supported*, when given, is the model-name list `list_supported_models()` reports; when left
|
|
57
|
+
out the fake has no such method, which is the "cannot read the list" fallback."""
|
|
55
58
|
import builtins
|
|
56
59
|
|
|
57
60
|
import codeintel.semantic_db as sdb
|
|
@@ -63,6 +66,9 @@ def _load_with(cause: BaseException, model_name: str = DEFAULT_MODEL):
|
|
|
63
66
|
class _TE:
|
|
64
67
|
def __init__(self, *_a, **_k):
|
|
65
68
|
raise cause
|
|
69
|
+
if supported is not None:
|
|
70
|
+
_TE.list_supported_models = classmethod( # type: ignore[attr-defined]
|
|
71
|
+
lambda cls: [{"model": m} for m in supported])
|
|
66
72
|
return type("_M", (), {"TextEmbedding": _TE})
|
|
67
73
|
return real_import(name, *a, **k)
|
|
68
74
|
|
|
@@ -96,6 +102,42 @@ def test_an_unsupported_model_is_a_config_error_not_a_network_one():
|
|
|
96
102
|
assert MODEL_CACHE_ENV not in msg # nothing to pre-seed
|
|
97
103
|
|
|
98
104
|
|
|
105
|
+
def test_a_shipped_model_that_failed_to_download_is_the_network_not_the_config():
|
|
106
|
+
"""fastembed 0.9 raises the SAME ValueError type after its download retries run out, for a
|
|
107
|
+
model it does ship. Reproduced against huggingface.co behind a 403 proxy: the user was told to
|
|
108
|
+
check a `model` key that was correct. The supported-model list is what separates the two."""
|
|
109
|
+
cause = ValueError(f"Could not load model {DEFAULT_MODEL} from any source.")
|
|
110
|
+
with pytest.raises(EmbeddingModelUnavailable) as caught:
|
|
111
|
+
_load_with(cause, DEFAULT_MODEL, supported=["other/model", DEFAULT_MODEL.upper()])
|
|
112
|
+
|
|
113
|
+
msg = str(caught.value)
|
|
114
|
+
assert _DOWNLOAD_REMEDY in msg
|
|
115
|
+
assert "fastembed ships" not in msg
|
|
116
|
+
assert "check the `model` key" not in msg
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
def test_an_unlisted_model_stays_a_config_error_when_the_list_is_readable():
|
|
120
|
+
cause = ValueError("Model nonsense/x is not supported in TextEmbedding.")
|
|
121
|
+
with pytest.raises(EmbeddingModelUnavailable) as caught:
|
|
122
|
+
_load_with(cause, "nonsense/x", supported=[DEFAULT_MODEL])
|
|
123
|
+
|
|
124
|
+
msg = str(caught.value)
|
|
125
|
+
assert "check the `model` key" in msg
|
|
126
|
+
assert MODEL_HOST not in msg
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
def test_a_list_that_raises_falls_back_to_the_config_remedy():
|
|
130
|
+
"""The classifier must never replace the error it explains with one of its own."""
|
|
131
|
+
import codeintel.semantic_db as sdb
|
|
132
|
+
|
|
133
|
+
class _Broken:
|
|
134
|
+
@classmethod
|
|
135
|
+
def list_supported_models(cls):
|
|
136
|
+
raise RuntimeError("registry import failed")
|
|
137
|
+
|
|
138
|
+
assert sdb._fastembed_ships(_Broken, DEFAULT_MODEL) is None
|
|
139
|
+
|
|
140
|
+
|
|
99
141
|
@pytest.mark.parametrize(
|
|
100
142
|
"errno_name",
|
|
101
143
|
[
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.29.0"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|