codevira 3.5.0__tar.gz → 3.6.0__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.
- {codevira-3.5.0 → codevira-3.6.0}/CHANGELOG.md +66 -1
- {codevira-3.5.0/codevira.egg-info → codevira-3.6.0}/PKG-INFO +4 -2
- {codevira-3.5.0 → codevira-3.6.0}/README.md +3 -1
- {codevira-3.5.0 → codevira-3.6.0/codevira.egg-info}/PKG-INFO +4 -2
- {codevira-3.5.0 → codevira-3.6.0}/codevira.egg-info/SOURCES.txt +4 -0
- {codevira-3.5.0 → codevira-3.6.0}/docs/heroes/02-anti-regression.md +1 -1
- {codevira-3.5.0 → codevira-3.6.0}/indexer/graph_generator.py +23 -1
- {codevira-3.5.0 → codevira-3.6.0}/indexer/index_codebase.py +56 -12
- {codevira-3.5.0 → codevira-3.6.0}/indexer/sqlite_graph.py +44 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/__init__.py +1 -1
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/cli.py +47 -0
- codevira-3.6.0/mcp_server/cli_search.py +132 -0
- codevira-3.6.0/mcp_server/engine/policies/_region_detect.py +177 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/engine/policies/decision_lock.py +125 -13
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/engine/signals.py +3 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/engine/wiring/claude_code_hooks.py +9 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/server.py +45 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/storage/decisions_store.py +132 -5
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/storage/jsonl_store.py +37 -50
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/tools/learning.py +10 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/tools/search.py +19 -1
- {codevira-3.5.0 → codevira-3.6.0}/pyproject.toml +1 -1
- codevira-3.6.0/tests/test_cli_search.py +117 -0
- codevira-3.6.0/tests/test_cross_project_search.py +225 -0
- {codevira-3.5.0 → codevira-3.6.0}/tests/test_graph_generator.py +66 -0
- {codevira-3.5.0 → codevira-3.6.0}/tests/test_index_codebase.py +28 -0
- {codevira-3.5.0 → codevira-3.6.0}/tests/test_server.py +46 -0
- {codevira-3.5.0 → codevira-3.6.0}/tests/test_sqlite_graph.py +46 -0
- {codevira-3.5.0 → codevira-3.6.0}/LICENSE +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/MANIFEST.in +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/agents/qa/01-code-review.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/agents/qa/02-adversarial-fix-review.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/agents/qa/03-cross-module-impact.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/agents/qa/06-doc-drift.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/agents/qa/07-security-audit.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/agents/qa/12-llm-redteam.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/agents/qa/13-multi-ide-schema.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/agents/qa/22-competitor-benchmark.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/agents/qa/README.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/agents/qa/tier2-scripts.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/agents/qa/tier3-manual.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/codevira.egg-info/dependency_links.txt +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/codevira.egg-info/entry_points.txt +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/codevira.egg-info/requires.txt +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/codevira.egg-info/top_level.txt +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/config.example.yaml +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/docs/alpha-tester-invites.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/docs/architecture.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/docs/audit-2026-05-22.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/docs/demo/README.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/docs/foolproof-product-charter.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/docs/heroes/00-engine.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/docs/heroes/01-decision-lock.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/docs/heroes/03-scope-contract.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/docs/heroes/04-blast-radius.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/docs/heroes/05-cross-session.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/docs/heroes/06-token-budget.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/docs/heroes/07-live-style.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/docs/heroes/08-decision-replay.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/docs/heroes/09-intent-inference.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/docs/heroes/10-ai-promotion.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/docs/heroes/README.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/docs/heroes/pillar-1-setup.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/docs/hn-launch-day.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/docs/how-i-built-persistent-memory-for-ai-agents.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/docs/internal/competitive-landscape.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/docs/linkedin-article-ai-agent-memory.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/docs/linkedin-post-ai-agent-memory.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/docs/local-pypi-https.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/docs/medium-your-ai-coding-agent-has-amnesia.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/docs/morning-handoff-2026-05-22.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/docs/plans/v2.1.2.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/docs/plans/v2.1.3.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/docs/plans/v2.2.0.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/docs/plans/v3.0.0.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/docs/qa-playbook.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/docs/release-notes/v3.1.1.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/docs/release-process.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/docs/roadmap.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/docs/surface-cuts-2026-05-22.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/docs/troubleshooting/antigravity.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/docs/v2-completion-plan.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/docs/v2-execution-log.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/docs/v2-master-plan.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/docs/vs-other-memory-tools.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/graph/_schema.yaml +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/indexer/__init__.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/indexer/_dedupe_migration.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/indexer/_fork_safety.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/indexer/_sqlite_util.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/indexer/chunker.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/indexer/fix_history.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/indexer/global_db.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/indexer/outcome_classifier.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/indexer/outcome_tracker.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/indexer/treesitter_parser.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/__main__.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/_ghost_check.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/_mcp_registry.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/_project_inventory.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/_prompts.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/_repair_init.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/_safe_crash.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/auto_init.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/cli_consensus.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/cli_eval.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/cli_export.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/cli_graph.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/cli_hooks_admin.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/cli_induce.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/cli_init.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/cli_projects.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/cli_reflect.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/cli_replay.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/cli_sync.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/cli_transfer.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/cli_uninstall.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/cli_working.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/crash_logger.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/data/__init__.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/data/affordances.yaml +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/data/config.example.yaml +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/data/hooks/post_tool_use.sh +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/data/hooks/pre_tool_use.sh +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/data/hooks/session_start.sh +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/data/hooks/stop.sh +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/data/hooks/user_prompt_submit.sh +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/data/prompts/reflection_v1.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/data/rules/coding-standards-generic.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/data/rules/coding-standards-go.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/data/rules/coding-standards-typescript.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/data/rules/coding-standards.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/data/rules/engineering-excellence.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/data/rules/git-cicd-governance.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/data/rules/git_commits.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/data/rules/incremental-updates.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/data/rules/master_rule.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/data/rules/multi-language.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/data/rules/persistence.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/data/rules/resilience-observability.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/data/rules/smoke-testing.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/data/rules/testing-standards.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/decision_replay.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/detect.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/doctor.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/engine/__init__.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/engine/demo_policy.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/engine/events.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/engine/memory_fanout.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/engine/policies/__init__.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/engine/policies/_signature_detect.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/engine/policies/anti_regression.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/engine/policies/blast_radius.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/engine/policies/post_edit_refresh.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/engine/policies/prompt_capture.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/engine/policies/relevance_inject.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/engine/policies/session_log_enforcer.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/engine/policies/token_budget.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/engine/policy.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/engine/runner.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/engine/token_meter.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/engine/wiring/__init__.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/engine/wiring/_diff_envelope.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/engine/wiring/mcp_dispatch.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/eval/__init__.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/eval/composite.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/eval/judge.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/eval/relevance.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/eval/report.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/eval/weight_tuner.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/gitignore.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/global_sync.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/graph/__init__.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/graph/template.html +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/http_server.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/ide_inject.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/ingest/__init__.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/ingest/claude_code.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/ingest/codex.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/ingest/gemini.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/ingest/heuristics.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/ingest/models.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/ingest/scan.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/launchd.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/log_retention.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/migrate.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/paths.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/project_binding.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/prompts.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/roadmap_drift.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/setup_wizard.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/storage/__init__.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/storage/activity_store.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/storage/agents_md_generator.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/storage/atomic.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/storage/config.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/storage/consensus_store.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/storage/digest.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/storage/fts5_index.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/storage/learned_weights.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/storage/manifest.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/storage/origin.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/storage/outcomes_writer.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/storage/paths.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/storage/reflections_store.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/storage/sanitize.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/storage/sessions_store.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/storage/skills_store.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/storage/synonyms.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/storage/token_estimator.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/storage/working_store.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/tools/__init__.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/tools/changesets.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/tools/check_conflict.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/tools/code_reader.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/tools/consensus.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/tools/graph.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/tools/playbook.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/tools/preferences.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/tools/reflections.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/tools/roadmap.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/tools/skills.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/tools/spatial.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/tools/working.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/mcp_server/update_check.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/rules/coding-standards.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/rules/engineering-excellence.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/rules/git-cicd-governance.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/rules/git_commits.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/rules/incremental-updates.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/rules/master_rule.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/rules/persistence.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/rules/resilience-observability.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/rules/smoke-testing.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/rules/testing-standards.md +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/setup.cfg +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/tests/test__prompts.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/tests/test_auto_init.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/tests/test_binding_e2e.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/tests/test_call_edge_fk_safety.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/tests/test_check_conflict.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/tests/test_chunker.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/tests/test_cli_consensus.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/tests/test_cli_export.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/tests/test_cli_graph.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/tests/test_cli_induce.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/tests/test_cli_projects.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/tests/test_cli_replay.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/tests/test_cli_transfer.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/tests/test_cli_uninstall.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/tests/test_cli_version.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/tests/test_cli_working.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/tests/test_consensus_handshake.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/tests/test_crash_logger.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/tests/test_dedupe_migration.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/tests/test_detect.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/tests/test_doctor.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/tests/test_e1_summary_first.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/tests/test_eval_e3.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/tests/test_fk_safety_extended.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/tests/test_fork_safety.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/tests/test_ghost_check.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/tests/test_gitignore.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/tests/test_global_db.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/tests/test_global_sync.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/tests/test_hook_resilience.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/tests/test_http_server.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/tests/test_ide_inject.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/tests/test_ingest_e2.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/tests/test_launchd.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/tests/test_log_retention.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/tests/test_managed_files_e4.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/tests/test_migrate.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/tests/test_outcome_reconcile_p17.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/tests/test_outcome_tracker.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/tests/test_paths.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/tests/test_preferences_tools.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/tests/test_project_binding.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/tests/test_prompts.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/tests/test_record_decision.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/tests/test_reflections.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/tests/test_repair_init.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/tests/test_roadmap_drift.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/tests/test_setup_wizard.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/tests/test_sqlite_util.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/tests/test_synonym_widening_e5.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/tests/test_tools_code_reader.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/tests/test_tools_graph.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/tests/test_tools_learning.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/tests/test_tools_playbook.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/tests/test_tools_roadmap.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/tests/test_tools_skills.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/tests/test_tools_spatial.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/tests/test_tools_working.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/tests/test_treesitter_parser.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/tests/test_update_check.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/tests/test_watcher_circuit.py +0 -0
- {codevira-3.5.0 → codevira-3.6.0}/tests/test_weight_tuning_p13.py +0 -0
|
@@ -7,7 +7,72 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
-
## [
|
|
10
|
+
## [3.6.0] — 2026-06-27
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
- **Symbol / region-level decision locking.** A `do_not_revert` decision can now
|
|
14
|
+
be scoped to a single function or class via a new optional `symbol` argument
|
|
15
|
+
on `record_decision` (e.g. `record_decision(decision=…, file_path="auth.py",
|
|
16
|
+
symbol="login")`). The content-aware lock then blocks only edits that land
|
|
17
|
+
*inside* that symbol; an edit elsewhere in the same file downgrades to a warn
|
|
18
|
+
(it can't revert the protected region). At PRE_TOOL_USE the file still holds
|
|
19
|
+
the edit's `before` text, so the enclosing symbol is resolved by AST
|
|
20
|
+
(Python) / tree-sitter (TS/JS/Go/Rust) without needing the graph indexed.
|
|
21
|
+
Decisions with no `symbol` stay file-scoped — existing behavior is unchanged,
|
|
22
|
+
and the file is only parsed when a locked decision is actually symbol-scoped
|
|
23
|
+
(zero added cost for the common case). Restore strict file-level blocking
|
|
24
|
+
with `CODEVIRA_DECISION_LOCK_CONTENT_AWARE=0`.
|
|
25
|
+
- **`codevira search` CLI.** Decision search is no longer MCP-only — search
|
|
26
|
+
from the terminal: `codevira search "retry policy"` (rich table),
|
|
27
|
+
`--all-projects` to search every registered repo, `--json` for a
|
|
28
|
+
machine-readable payload, plus `--limit` / `--full`.
|
|
29
|
+
- **Cross-project decision search.** `search_decisions(query, all_projects=true)`
|
|
30
|
+
now searches *every* registered project's decision store — not just the
|
|
31
|
+
current one — each result tagged with the `project` + `project_path` it came
|
|
32
|
+
from. Recall how you solved something in another repo without leaving this
|
|
33
|
+
one. Reuses the same per-project FTS5 search (identical per-project ranking +
|
|
34
|
+
superseded filtering); the union is **interleaved by per-project rank** (raw
|
|
35
|
+
BM25 scores aren't comparable across repos, so each project's best gets fair
|
|
36
|
+
representation). Skips moved/ghost projects and invalid roots, dedups by
|
|
37
|
+
resolved path, caps the fan-out, and one project erroring never sinks the
|
|
38
|
+
search. Default `all_projects=false` keeps the current-project behavior
|
|
39
|
+
byte-for-byte unchanged.
|
|
40
|
+
- **`codevira status` shows activity counts.** Beyond Graph Nodes (a flat file
|
|
41
|
+
count), the panel now reports Symbols, Edges, and Decisions — counts that
|
|
42
|
+
move as you edit code and record decisions, so status reflects progress
|
|
43
|
+
instead of a number that barely changes.
|
|
44
|
+
|
|
45
|
+
### Fixed
|
|
46
|
+
- **Anti-Regression fix-history is now populated.** `scan_git_log()` is wired
|
|
47
|
+
into the startup daemon thread, so the fix-history DB the hero reads is
|
|
48
|
+
actually built (it previously had no production caller). Gated by
|
|
49
|
+
`CODEVIRA_NO_GIT_SCAN`; runs only at startup.
|
|
50
|
+
- **Native edits reach working memory.** `memory_fanout` now also fires from the
|
|
51
|
+
Claude Code hook path, so native `Edit`/`Write`/`Bash` populate working
|
|
52
|
+
memory — not just codevira's own MCP tool calls.
|
|
53
|
+
- **Decision-ID minting is collision-safe.** Next-ID generation now scans the
|
|
54
|
+
full store for `max(id) + 1` instead of trusting the last/tail record, so a
|
|
55
|
+
rewrite that leaves a lower id at the tail (junk cleanup, compact,
|
|
56
|
+
cross-project repair) can no longer re-issue an existing id and clobber a
|
|
57
|
+
record (including `do_not_revert` decisions).
|
|
58
|
+
- **`codevira index --full` now truly rebuilds the graph.** The graph-only
|
|
59
|
+
index path (the only path since v2.2.0) called the incremental
|
|
60
|
+
`generate_graph_sqlite`, whose file-node loop is add-if-absent — so a
|
|
61
|
+
re-index of an already-built project added 0 new nodes and printed a
|
|
62
|
+
confusing `Graph built: 0 nodes, N edges`. `--full` now clears the graph
|
|
63
|
+
first (new FK-cascading `SQLiteGraph.clear()`) and the result reports the
|
|
64
|
+
real `nodes_total`, so the count is honest and node metadata is refreshed.
|
|
65
|
+
- **Dropped the misleading "Semantic search unavailable — reinstall codevira"
|
|
66
|
+
notice.** Semantic code search (chromadb / torch) was removed in v2.2.0 and
|
|
67
|
+
is on hold (D0000PV / D0000XY); `_check_search_deps()` is hardcoded `False`,
|
|
68
|
+
so that notice printed on *every* index and pointed users at an upgrade that
|
|
69
|
+
could never restore it. Graph-only is the normal, complete result.
|
|
70
|
+
- **Graph node count now tracks the filesystem.** Indexing was add-if-absent
|
|
71
|
+
and never pruned nodes for deleted files, so the graph — and `codevira
|
|
72
|
+
status`'s node count — only ever grew; it never shrank when you removed a
|
|
73
|
+
file. A new FK-cascading `SQLiteGraph.remove_node` plus a prune pass in
|
|
74
|
+
`generate_graph_sqlite` now drop nodes whose source file is gone, so the
|
|
75
|
+
count reflects reality on every index.
|
|
11
76
|
|
|
12
77
|
## [3.5.0] — 2026-06-19
|
|
13
78
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: codevira
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.6.0
|
|
4
4
|
Summary: Cross-IDE decision enforcement for AI coding agents. 1 MB per project, in your repo, no cloud, no vectors. Claude Code, Cursor, Windsurf, Antigravity, Codex all share the same in-repo memory; hooks block AI tool calls that violate prior decisions. MIT, local-first.
|
|
5
5
|
Author-email: Sachin Shelke <sachin.worldnet@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -244,6 +244,7 @@ The CLI surface is 23 commands (the daily-use ones below):
|
|
|
244
244
|
| `codevira sync` | Regenerate AGENTS.md + manifest + digest from `decisions.jsonl` |
|
|
245
245
|
| `codevira observe-git` | Classify past decisions as kept/modified/reverted from git history |
|
|
246
246
|
| `codevira replay` | Browse the decisions timeline (terminal / markdown / HTML) |
|
|
247
|
+
| `codevira search <query>` | Search decisions from the terminal (FTS5/BM25); `--all-projects` searches every registered repo, `--json` for scripts |
|
|
247
248
|
| `codevira clean` | Remove orphaned project data |
|
|
248
249
|
| `codevira reset` | Destructive cleanup (auto-exports decisions first) |
|
|
249
250
|
| `codevira export` | Standalone decision backup (JSON / SQL); `export setup` bundles project memory + global learning for machine transfer |
|
|
@@ -398,7 +399,8 @@ kill list.
|
|
|
398
399
|
| Tool | Description |
|
|
399
400
|
|---|---|
|
|
400
401
|
| `get_session_context` | **THE main "catch me up" call.** Returns ~500 tokens: current phase, next action, recent decisions, top tags, last session brief. |
|
|
401
|
-
| `search_decisions(query)` | FTS5 BM25 search over `decisions.jsonl`. Default: top 5 truncated; pass `full=true` or `summary_only=true`. |
|
|
402
|
+
| `search_decisions(query)` | FTS5 BM25 search over `decisions.jsonl`. Default: top 5 truncated; pass `full=true` or `summary_only=true`. **`all_projects=true`** (v3.6) searches every registered repo, tagging each result with its project. |
|
|
403
|
+
| `record_decision(decision, …)` | Record a decision; `do_not_revert=true` locks it. **`symbol="login"`** (v3.6) scopes the lock to one function/class — edits elsewhere in the file warn instead of block. |
|
|
402
404
|
| `list_decisions` | Paginate / filter: `since_date`, `file_pattern`, `protected_only`, `tags`, `include_superseded`. |
|
|
403
405
|
| `list_tags` | Enumerate all tags with decision counts. |
|
|
404
406
|
| `get_history(file_path)` | Recent decisions touching a file. |
|
|
@@ -195,6 +195,7 @@ The CLI surface is 23 commands (the daily-use ones below):
|
|
|
195
195
|
| `codevira sync` | Regenerate AGENTS.md + manifest + digest from `decisions.jsonl` |
|
|
196
196
|
| `codevira observe-git` | Classify past decisions as kept/modified/reverted from git history |
|
|
197
197
|
| `codevira replay` | Browse the decisions timeline (terminal / markdown / HTML) |
|
|
198
|
+
| `codevira search <query>` | Search decisions from the terminal (FTS5/BM25); `--all-projects` searches every registered repo, `--json` for scripts |
|
|
198
199
|
| `codevira clean` | Remove orphaned project data |
|
|
199
200
|
| `codevira reset` | Destructive cleanup (auto-exports decisions first) |
|
|
200
201
|
| `codevira export` | Standalone decision backup (JSON / SQL); `export setup` bundles project memory + global learning for machine transfer |
|
|
@@ -349,7 +350,8 @@ kill list.
|
|
|
349
350
|
| Tool | Description |
|
|
350
351
|
|---|---|
|
|
351
352
|
| `get_session_context` | **THE main "catch me up" call.** Returns ~500 tokens: current phase, next action, recent decisions, top tags, last session brief. |
|
|
352
|
-
| `search_decisions(query)` | FTS5 BM25 search over `decisions.jsonl`. Default: top 5 truncated; pass `full=true` or `summary_only=true`. |
|
|
353
|
+
| `search_decisions(query)` | FTS5 BM25 search over `decisions.jsonl`. Default: top 5 truncated; pass `full=true` or `summary_only=true`. **`all_projects=true`** (v3.6) searches every registered repo, tagging each result with its project. |
|
|
354
|
+
| `record_decision(decision, …)` | Record a decision; `do_not_revert=true` locks it. **`symbol="login"`** (v3.6) scopes the lock to one function/class — edits elsewhere in the file warn instead of block. |
|
|
353
355
|
| `list_decisions` | Paginate / filter: `since_date`, `file_pattern`, `protected_only`, `tags`, `include_superseded`. |
|
|
354
356
|
| `list_tags` | Enumerate all tags with decision counts. |
|
|
355
357
|
| `get_history(file_path)` | Recent decisions touching a file. |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: codevira
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.6.0
|
|
4
4
|
Summary: Cross-IDE decision enforcement for AI coding agents. 1 MB per project, in your repo, no cloud, no vectors. Claude Code, Cursor, Windsurf, Antigravity, Codex all share the same in-repo memory; hooks block AI tool calls that violate prior decisions. MIT, local-first.
|
|
5
5
|
Author-email: Sachin Shelke <sachin.worldnet@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -244,6 +244,7 @@ The CLI surface is 23 commands (the daily-use ones below):
|
|
|
244
244
|
| `codevira sync` | Regenerate AGENTS.md + manifest + digest from `decisions.jsonl` |
|
|
245
245
|
| `codevira observe-git` | Classify past decisions as kept/modified/reverted from git history |
|
|
246
246
|
| `codevira replay` | Browse the decisions timeline (terminal / markdown / HTML) |
|
|
247
|
+
| `codevira search <query>` | Search decisions from the terminal (FTS5/BM25); `--all-projects` searches every registered repo, `--json` for scripts |
|
|
247
248
|
| `codevira clean` | Remove orphaned project data |
|
|
248
249
|
| `codevira reset` | Destructive cleanup (auto-exports decisions first) |
|
|
249
250
|
| `codevira export` | Standalone decision backup (JSON / SQL); `export setup` bundles project memory + global learning for machine transfer |
|
|
@@ -398,7 +399,8 @@ kill list.
|
|
|
398
399
|
| Tool | Description |
|
|
399
400
|
|---|---|
|
|
400
401
|
| `get_session_context` | **THE main "catch me up" call.** Returns ~500 tokens: current phase, next action, recent decisions, top tags, last session brief. |
|
|
401
|
-
| `search_decisions(query)` | FTS5 BM25 search over `decisions.jsonl`. Default: top 5 truncated; pass `full=true` or `summary_only=true`. |
|
|
402
|
+
| `search_decisions(query)` | FTS5 BM25 search over `decisions.jsonl`. Default: top 5 truncated; pass `full=true` or `summary_only=true`. **`all_projects=true`** (v3.6) searches every registered repo, tagging each result with its project. |
|
|
403
|
+
| `record_decision(decision, …)` | Record a decision; `do_not_revert=true` locks it. **`symbol="login"`** (v3.6) scopes the lock to one function/class — edits elsewhere in the file warn instead of block. |
|
|
402
404
|
| `list_decisions` | Paginate / filter: `since_date`, `file_pattern`, `protected_only`, `tags`, `include_superseded`. |
|
|
403
405
|
| `list_tags` | Enumerate all tags with decision counts. |
|
|
404
406
|
| `get_history(file_path)` | Recent decisions touching a file. |
|
|
@@ -95,6 +95,7 @@ mcp_server/cli_init.py
|
|
|
95
95
|
mcp_server/cli_projects.py
|
|
96
96
|
mcp_server/cli_reflect.py
|
|
97
97
|
mcp_server/cli_replay.py
|
|
98
|
+
mcp_server/cli_search.py
|
|
98
99
|
mcp_server/cli_sync.py
|
|
99
100
|
mcp_server/cli_transfer.py
|
|
100
101
|
mcp_server/cli_uninstall.py
|
|
@@ -149,6 +150,7 @@ mcp_server/engine/runner.py
|
|
|
149
150
|
mcp_server/engine/signals.py
|
|
150
151
|
mcp_server/engine/token_meter.py
|
|
151
152
|
mcp_server/engine/policies/__init__.py
|
|
153
|
+
mcp_server/engine/policies/_region_detect.py
|
|
152
154
|
mcp_server/engine/policies/_signature_detect.py
|
|
153
155
|
mcp_server/engine/policies/anti_regression.py
|
|
154
156
|
mcp_server/engine/policies/blast_radius.py
|
|
@@ -236,12 +238,14 @@ tests/test_cli_graph.py
|
|
|
236
238
|
tests/test_cli_induce.py
|
|
237
239
|
tests/test_cli_projects.py
|
|
238
240
|
tests/test_cli_replay.py
|
|
241
|
+
tests/test_cli_search.py
|
|
239
242
|
tests/test_cli_transfer.py
|
|
240
243
|
tests/test_cli_uninstall.py
|
|
241
244
|
tests/test_cli_version.py
|
|
242
245
|
tests/test_cli_working.py
|
|
243
246
|
tests/test_consensus_handshake.py
|
|
244
247
|
tests/test_crash_logger.py
|
|
248
|
+
tests/test_cross_project_search.py
|
|
245
249
|
tests/test_dedupe_migration.py
|
|
246
250
|
tests/test_detect.py
|
|
247
251
|
tests/test_doctor.py
|
|
@@ -13,7 +13,7 @@ Sprint week: **Week 8**. Smaller than Hero 4: most of the heavy lifting is in `i
|
|
|
13
13
|
Bug fixes decay in the AI's awareness. Six weeks ago you fixed a race condition by adding a `with self._lock:` guard. Today the AI is "simplifying" the same function and removes the lock again — your bug is back. The fix is in git history, but the AI didn't see it.
|
|
14
14
|
|
|
15
15
|
Codevira already has the data:
|
|
16
|
-
- `indexer/fix_history.py:scan_git_log()` walks `git log` for `fix:`/`bug:`/`hotfix:`/`fixes #N` patterns and records each touched file as a fix region.
|
|
16
|
+
- `indexer/fix_history.py:scan_git_log()` walks `git log` for `fix:`/`bug:`/`hotfix:`/`fixes #N` patterns and records each touched file as a fix region. *(Note: This scan is invoked only on server startup. Long-lived servers will not see new fix commits until restarted.)*
|
|
17
17
|
- `is_revert(proposed_change, fix)` heuristically detects whether the AI's diff moves the file back toward the pre-fix state.
|
|
18
18
|
- `signals.fixes(file_path)` returns the recorded fixes for a file.
|
|
19
19
|
|
|
@@ -207,7 +207,7 @@ def generate_graph_node(file_path: str, project_root: str) -> dict[str, Any]:
|
|
|
207
207
|
|
|
208
208
|
|
|
209
209
|
def generate_graph_sqlite(
|
|
210
|
-
project_root: str, db_path: str | None = None
|
|
210
|
+
project_root: str, db_path: str | None = None, full: bool = False
|
|
211
211
|
) -> dict[str, Any]:
|
|
212
212
|
if not db_path:
|
|
213
213
|
from mcp_server.paths import get_data_dir
|
|
@@ -216,6 +216,13 @@ def generate_graph_sqlite(
|
|
|
216
216
|
|
|
217
217
|
db = SQLiteGraph(db_path)
|
|
218
218
|
|
|
219
|
+
# full=True (codevira index --full) is a genuine from-scratch rebuild:
|
|
220
|
+
# wipe the existing graph so the add-if-absent loop below re-adds and
|
|
221
|
+
# refreshes every file-node instead of skipping ones already present.
|
|
222
|
+
# Without this, a re-run reports "0 nodes" because nothing is new. (3.5.1)
|
|
223
|
+
if full:
|
|
224
|
+
db.clear()
|
|
225
|
+
|
|
219
226
|
# Skip dirs that commonly contain symlinks to system/OS directories,
|
|
220
227
|
# or are otherwise not user source code. rglob() follows symlinks by
|
|
221
228
|
# default on macOS, which can walk into ~/Library/Group Containers/
|
|
@@ -309,6 +316,18 @@ def generate_graph_sqlite(
|
|
|
309
316
|
fp for fp in file_paths if "node_modules" not in fp and ".venv" not in fp
|
|
310
317
|
}
|
|
311
318
|
|
|
319
|
+
# Prune nodes for source files that no longer exist on disk, so the graph
|
|
320
|
+
# (and `codevira status`'s node count) tracks the filesystem and SHRINKS
|
|
321
|
+
# on deletion instead of accumulating orphans forever. Without this, a
|
|
322
|
+
# deleted file left its node behind and the count only ever grew. (3.5.1)
|
|
323
|
+
current_node_ids = {f"file:{fp}" for fp in all_node_paths}
|
|
324
|
+
nodes_removed = 0
|
|
325
|
+
for existing in db.list_file_nodes():
|
|
326
|
+
node_id = existing.get("id")
|
|
327
|
+
if node_id and node_id not in current_node_ids:
|
|
328
|
+
if db.remove_node(node_id):
|
|
329
|
+
nodes_removed += 1
|
|
330
|
+
|
|
312
331
|
# ---- Phase 2: Populate function-level symbols ----
|
|
313
332
|
symbols_added = 0
|
|
314
333
|
for fp in all_node_paths:
|
|
@@ -410,10 +429,13 @@ def generate_graph_sqlite(
|
|
|
410
429
|
db.add_edge(source_id, target_id, kind="imports")
|
|
411
430
|
edges_added += 1
|
|
412
431
|
|
|
432
|
+
nodes_total = db.count_nodes()
|
|
413
433
|
db.close()
|
|
414
434
|
return {
|
|
415
435
|
"files_processed": added + skipped,
|
|
416
436
|
"nodes_added": added,
|
|
437
|
+
"nodes_total": nodes_total,
|
|
438
|
+
"nodes_removed": nodes_removed,
|
|
417
439
|
"nodes_skipped": skipped,
|
|
418
440
|
"edges_added": edges_added,
|
|
419
441
|
"symbols_added": symbols_added,
|
|
@@ -492,17 +492,24 @@ def cmd_full_rebuild(verbose: bool = False):
|
|
|
492
492
|
db = SQLiteGraph(get_data_dir() / "graph" / "graph.db")
|
|
493
493
|
|
|
494
494
|
if not _check_search_deps():
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
)
|
|
498
|
-
#
|
|
495
|
+
# Graph-only is the ONLY mode since v2.2.0 — semantic code search
|
|
496
|
+
# (chromadb / torch / sentence-transformers) was removed and is on
|
|
497
|
+
# hold (D0000PV / D0000XY). There is nothing to "reinstall", so the
|
|
498
|
+
# old "Semantic search unavailable — reinstall codevira" notice
|
|
499
|
+
# (printed on every index, pointing at a fix that does nothing) is
|
|
500
|
+
# dropped. The "Graph built" line below is the real, complete result.
|
|
499
501
|
from indexer.graph_generator import generate_graph_sqlite
|
|
500
502
|
|
|
503
|
+
# full=True so `index --full` truly rebuilds (clears the graph first);
|
|
504
|
+
# the reported count is then the real graph total, not "0 new nodes".
|
|
501
505
|
result = generate_graph_sqlite(
|
|
502
|
-
str(_project_root()),
|
|
506
|
+
str(_project_root()),
|
|
507
|
+
str(get_data_dir() / "graph" / "graph.db"),
|
|
508
|
+
full=True,
|
|
503
509
|
)
|
|
504
510
|
console.print(
|
|
505
|
-
f"[green]✓[/green] Graph built: {result.get('
|
|
511
|
+
f"[green]✓[/green] Graph built: {result.get('nodes_total', 0)} nodes, "
|
|
512
|
+
f"{result.get('edges_added', 0)} edges."
|
|
506
513
|
)
|
|
507
514
|
db.close()
|
|
508
515
|
return
|
|
@@ -1146,6 +1153,39 @@ def start_background_full_index(callback=None) -> "threading.Thread":
|
|
|
1146
1153
|
return t
|
|
1147
1154
|
|
|
1148
1155
|
|
|
1156
|
+
def _status_entity_counts(db) -> dict[str, int]:
|
|
1157
|
+
"""Activity-bearing counts for `codevira status` (3.5.1).
|
|
1158
|
+
|
|
1159
|
+
Graph nodes are a flat file count that barely moves while you edit
|
|
1160
|
+
existing files; these extra counts reflect actual progress — symbols
|
|
1161
|
+
(functions/classes) and edges shift as you change code, and decisions
|
|
1162
|
+
track codevira usage. Each query is defensive (0 on any error) so status
|
|
1163
|
+
never crashes on a partial / schema-drifted graph.
|
|
1164
|
+
|
|
1165
|
+
Returns a dict with int keys: nodes, symbols, edges, decisions.
|
|
1166
|
+
"""
|
|
1167
|
+
|
|
1168
|
+
def _c(sql: str) -> int:
|
|
1169
|
+
try:
|
|
1170
|
+
return int(db.conn.execute(sql).fetchone()[0])
|
|
1171
|
+
except Exception:
|
|
1172
|
+
return 0
|
|
1173
|
+
|
|
1174
|
+
counts = {
|
|
1175
|
+
"nodes": _c("SELECT COUNT(*) FROM nodes"),
|
|
1176
|
+
"symbols": _c("SELECT COUNT(*) FROM symbols"),
|
|
1177
|
+
"edges": _c("SELECT COUNT(*) FROM edges"),
|
|
1178
|
+
"decisions": 0,
|
|
1179
|
+
}
|
|
1180
|
+
try:
|
|
1181
|
+
from mcp_server.storage import decisions_store
|
|
1182
|
+
|
|
1183
|
+
counts["decisions"] = int(decisions_store.list_all(limit=1).get("total", 0))
|
|
1184
|
+
except Exception:
|
|
1185
|
+
counts["decisions"] = 0
|
|
1186
|
+
return counts
|
|
1187
|
+
|
|
1188
|
+
|
|
1149
1189
|
def cmd_status(check_stale: bool = False, show_global: bool = False):
|
|
1150
1190
|
"""Print index health summary.
|
|
1151
1191
|
|
|
@@ -1226,11 +1266,12 @@ def cmd_status(check_stale: bool = False, show_global: bool = False):
|
|
|
1226
1266
|
console = Console()
|
|
1227
1267
|
db = SQLiteGraph(graph_db_path)
|
|
1228
1268
|
|
|
1229
|
-
#
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1269
|
+
# Activity-bearing counts so `status` reflects progress, not just a flat
|
|
1270
|
+
# file count: symbols (functions/classes) and edges move as you edit;
|
|
1271
|
+
# decisions track codevira usage. Single source of truth in
|
|
1272
|
+
# _status_entity_counts (testable without rendering). (3.5.1)
|
|
1273
|
+
counts = _status_entity_counts(db)
|
|
1274
|
+
nodes = counts["nodes"] # also referenced by the explanation logic below
|
|
1234
1275
|
|
|
1235
1276
|
# v2.2.0: ChromaDB / sentence-transformers / torch were deleted in
|
|
1236
1277
|
# Phase E. There is no semantic chunk count to display. `chunk_count`
|
|
@@ -1239,7 +1280,10 @@ def cmd_status(check_stale: bool = False, show_global: bool = False):
|
|
|
1239
1280
|
chunk_count = 0
|
|
1240
1281
|
|
|
1241
1282
|
table = Table(show_header=False, box=None)
|
|
1242
|
-
table.add_row("[cyan]Graph Nodes:[/cyan]", str(nodes))
|
|
1283
|
+
table.add_row("[cyan]Graph Nodes:[/cyan]", str(counts["nodes"]))
|
|
1284
|
+
table.add_row("[cyan]Symbols:[/cyan]", str(counts["symbols"]))
|
|
1285
|
+
table.add_row("[cyan]Edges:[/cyan]", str(counts["edges"]))
|
|
1286
|
+
table.add_row("[cyan]Decisions:[/cyan]", str(counts["decisions"]))
|
|
1243
1287
|
# v2.2.0: ChromaDB / semantic code search was removed entirely
|
|
1244
1288
|
# (Phase E). The "ChromaDB Chunks" / "Semantic Search" row is no
|
|
1245
1289
|
# longer meaningful; the code graph IS the search surface now.
|
|
@@ -412,6 +412,50 @@ class SQLiteGraph:
|
|
|
412
412
|
# offers the user "run --full" which is correct in this state too.
|
|
413
413
|
return 0
|
|
414
414
|
|
|
415
|
+
def clear(self) -> int:
|
|
416
|
+
"""Delete every node — and, via ``ON DELETE CASCADE``, its edges,
|
|
417
|
+
symbols, and call_edges — for a true from-scratch wipe of this
|
|
418
|
+
project's graph.
|
|
419
|
+
|
|
420
|
+
``codevira index --full`` (``cmd_full_rebuild``) calls this before
|
|
421
|
+
rebuilding so the add-if-absent loop in ``generate_graph_sqlite``
|
|
422
|
+
actually re-adds (and refreshes) every file-node instead of skipping
|
|
423
|
+
those already present — the reason a re-run used to report
|
|
424
|
+
"0 nodes". Cascade is relied upon: ``PRAGMA foreign_keys = ON`` is
|
|
425
|
+
set at connect, so emptying ``nodes`` empties the dependent tables.
|
|
426
|
+
|
|
427
|
+
Returns:
|
|
428
|
+
The node count removed (0 if already empty / table missing —
|
|
429
|
+
defensive, never raises).
|
|
430
|
+
"""
|
|
431
|
+
try:
|
|
432
|
+
removed = self.count_nodes()
|
|
433
|
+
with self.transaction() as conn:
|
|
434
|
+
conn.execute("DELETE FROM nodes")
|
|
435
|
+
return removed
|
|
436
|
+
except Exception:
|
|
437
|
+
return 0
|
|
438
|
+
|
|
439
|
+
def remove_node(self, node_id: str) -> bool:
|
|
440
|
+
"""Delete a single node and (via ``ON DELETE CASCADE``) its edges,
|
|
441
|
+
symbols, and call_edges.
|
|
442
|
+
|
|
443
|
+
Used to prune nodes for source files that no longer exist on disk so
|
|
444
|
+
the graph — and ``codevira status``'s node count — tracks the
|
|
445
|
+
filesystem and shrinks on deletion instead of accumulating orphans
|
|
446
|
+
forever. (3.5.1)
|
|
447
|
+
|
|
448
|
+
Returns:
|
|
449
|
+
True if a node row was deleted, False otherwise (already gone /
|
|
450
|
+
error — defensive, never raises).
|
|
451
|
+
"""
|
|
452
|
+
try:
|
|
453
|
+
with self.transaction() as conn:
|
|
454
|
+
cur = conn.execute("DELETE FROM nodes WHERE id = ?", (node_id,))
|
|
455
|
+
return bool(cur.rowcount)
|
|
456
|
+
except Exception:
|
|
457
|
+
return False
|
|
458
|
+
|
|
415
459
|
def get_blast_radius(self, node_id: str, max_depth: int = 3) -> list[dict]:
|
|
416
460
|
query = """
|
|
417
461
|
WITH RECURSIVE
|
|
@@ -925,6 +925,41 @@ def main() -> None:
|
|
|
925
925
|
# the upcoming `codevira uninstall` command. Discoverability bonus:
|
|
926
926
|
# users no longer need to remember two install paths.
|
|
927
927
|
|
|
928
|
+
# search (v3.6.0 — terminal decision search, incl. cross-project)
|
|
929
|
+
search_parser = subparsers.add_parser(
|
|
930
|
+
"search",
|
|
931
|
+
help="Search past decisions from the terminal (FTS5/BM25 keyword)",
|
|
932
|
+
description=(
|
|
933
|
+
"Keyword search over recorded decisions. Searches THIS project by "
|
|
934
|
+
"default; pass --all-projects to merge matches from every registered "
|
|
935
|
+
"project (interleaved by per-project rank), each row tagged with "
|
|
936
|
+
"where it came from."
|
|
937
|
+
),
|
|
938
|
+
epilog=(
|
|
939
|
+
"Tip: to search a term that starts with a dash, put it after --, "
|
|
940
|
+
"e.g. codevira search -- -flag"
|
|
941
|
+
),
|
|
942
|
+
)
|
|
943
|
+
search_parser.add_argument("query", help="Search terms (e.g. 'retry policy')")
|
|
944
|
+
search_parser.add_argument(
|
|
945
|
+
"--all-projects",
|
|
946
|
+
action="store_true",
|
|
947
|
+
dest="all_projects",
|
|
948
|
+
help="Search every registered project, not just the current one",
|
|
949
|
+
)
|
|
950
|
+
search_parser.add_argument(
|
|
951
|
+
"--limit", type=int, default=10, help="Max results (1-20, default 10)"
|
|
952
|
+
)
|
|
953
|
+
search_parser.add_argument(
|
|
954
|
+
"--full", action="store_true", help="Show untruncated decision text"
|
|
955
|
+
)
|
|
956
|
+
search_parser.add_argument(
|
|
957
|
+
"--json",
|
|
958
|
+
action="store_true",
|
|
959
|
+
dest="output_json",
|
|
960
|
+
help="Emit the raw payload as JSON instead of a table",
|
|
961
|
+
)
|
|
962
|
+
|
|
928
963
|
# replay (v2.0 hero 8 — Decision Replay)
|
|
929
964
|
replay_parser = subparsers.add_parser(
|
|
930
965
|
"replay",
|
|
@@ -1659,6 +1694,18 @@ def main() -> None:
|
|
|
1659
1694
|
out_file=Path(out_arg) if out_arg else None,
|
|
1660
1695
|
)
|
|
1661
1696
|
sys.exit(rc)
|
|
1697
|
+
elif args.command == "search":
|
|
1698
|
+
# v3.6.0 — terminal decision search (incl. cross-project).
|
|
1699
|
+
from mcp_server.cli_search import cmd_search
|
|
1700
|
+
|
|
1701
|
+
rc = cmd_search(
|
|
1702
|
+
query=getattr(args, "query", None),
|
|
1703
|
+
all_projects=getattr(args, "all_projects", False),
|
|
1704
|
+
limit=getattr(args, "limit", 10),
|
|
1705
|
+
full=getattr(args, "full", False),
|
|
1706
|
+
output_json=getattr(args, "output_json", False),
|
|
1707
|
+
)
|
|
1708
|
+
sys.exit(rc)
|
|
1662
1709
|
elif args.command == "clean":
|
|
1663
1710
|
cmd_clean(
|
|
1664
1711
|
clean_all=getattr(args, "all", False),
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
"""
|
|
2
|
+
cli_search.py — the `codevira search` command.
|
|
3
|
+
|
|
4
|
+
Brings decision search to the terminal. Until v3.6.0, `search_decisions` was
|
|
5
|
+
MCP-only (AI agents could search; humans couldn't from a shell). This wraps the
|
|
6
|
+
same tool so you can:
|
|
7
|
+
|
|
8
|
+
codevira search "retry policy"
|
|
9
|
+
codevira search "retry policy" --all-projects # every registered repo
|
|
10
|
+
codevira search "auth" --json # machine-readable
|
|
11
|
+
|
|
12
|
+
``--all-projects`` (v3.6.0) merges BM25-ranked matches from every registered
|
|
13
|
+
project, each row tagged with the project it came from.
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
|
|
18
|
+
import json
|
|
19
|
+
import logging
|
|
20
|
+
import sys
|
|
21
|
+
from typing import Any
|
|
22
|
+
|
|
23
|
+
logger = logging.getLogger(__name__)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def _clamp_limit(value: int | None, default: int = 10) -> int:
|
|
27
|
+
# Cap matches the search_decisions tool's own [1, 20] clamp so the CLI's
|
|
28
|
+
# advertised max isn't a lie about how many rows actually come back.
|
|
29
|
+
try:
|
|
30
|
+
return max(1, min(int(value), 20)) if value is not None else default
|
|
31
|
+
except (TypeError, ValueError):
|
|
32
|
+
return default
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def cmd_search(
|
|
36
|
+
*,
|
|
37
|
+
query: str | None,
|
|
38
|
+
all_projects: bool = False,
|
|
39
|
+
limit: int | None = 10,
|
|
40
|
+
full: bool = False,
|
|
41
|
+
output_json: bool = False,
|
|
42
|
+
) -> int:
|
|
43
|
+
"""Search decisions and print the results. Returns a process exit code.
|
|
44
|
+
|
|
45
|
+
Args:
|
|
46
|
+
query: search terms (FTS5/BM25). Empty → usage error (exit 2).
|
|
47
|
+
all_projects: search every registered project, not just the current.
|
|
48
|
+
limit: max rows (clamped to [1, 50]; default 10).
|
|
49
|
+
full: include untruncated decision text + snippet/origin.
|
|
50
|
+
output_json: emit the raw tool payload as JSON instead of a table.
|
|
51
|
+
|
|
52
|
+
Returns:
|
|
53
|
+
0 on success (including zero matches — not an error), 2 on empty query.
|
|
54
|
+
"""
|
|
55
|
+
q = (query or "").strip()
|
|
56
|
+
if not q:
|
|
57
|
+
print(
|
|
58
|
+
"Usage: codevira search <query> [--all-projects] [--limit N] "
|
|
59
|
+
"[--full] [--json]",
|
|
60
|
+
file=sys.stderr,
|
|
61
|
+
)
|
|
62
|
+
return 2
|
|
63
|
+
|
|
64
|
+
limit = _clamp_limit(limit)
|
|
65
|
+
|
|
66
|
+
from mcp_server.tools.search import search_decisions
|
|
67
|
+
|
|
68
|
+
result = search_decisions(q, limit=limit, full=full, all_projects=all_projects)
|
|
69
|
+
rows: list[dict[str, Any]] = result.get("results", [])
|
|
70
|
+
|
|
71
|
+
if output_json:
|
|
72
|
+
print(json.dumps(result, indent=2, default=str))
|
|
73
|
+
return 0
|
|
74
|
+
|
|
75
|
+
_render_table(q, rows, all_projects=all_projects)
|
|
76
|
+
return 0
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
def _render_table(
|
|
80
|
+
query: str, rows: list[dict[str, Any]], *, all_projects: bool
|
|
81
|
+
) -> None:
|
|
82
|
+
"""Pretty-print results as a rich table, with a plain-text fallback.
|
|
83
|
+
|
|
84
|
+
Every dynamic value (query, decision text, project, file) is markup-escaped
|
|
85
|
+
before it reaches rich. Decision text legitimately contains ``[...]`` (e.g.
|
|
86
|
+
``[provider]``, ``[red]``) which rich would otherwise parse as markup —
|
|
87
|
+
silently mangling content, or raising MarkupError on an unbalanced tag.
|
|
88
|
+
"""
|
|
89
|
+
scope = "all projects" if all_projects else "this project"
|
|
90
|
+
try:
|
|
91
|
+
from rich.console import Console
|
|
92
|
+
from rich.markup import escape
|
|
93
|
+
from rich.table import Table
|
|
94
|
+
|
|
95
|
+
console = Console()
|
|
96
|
+
q = escape(repr(query))
|
|
97
|
+
if not rows:
|
|
98
|
+
console.print(f"No decisions matched [bold]{q}[/bold] in {scope}.")
|
|
99
|
+
return
|
|
100
|
+
|
|
101
|
+
table = Table(
|
|
102
|
+
title=f"Decisions matching {q} ({scope})",
|
|
103
|
+
title_style="bold green",
|
|
104
|
+
show_lines=False,
|
|
105
|
+
)
|
|
106
|
+
table.add_column("ID", style="cyan", no_wrap=True)
|
|
107
|
+
if all_projects:
|
|
108
|
+
table.add_column("Project", style="magenta", no_wrap=True)
|
|
109
|
+
table.add_column("Decision")
|
|
110
|
+
table.add_column("File", style="dim", no_wrap=True)
|
|
111
|
+
table.add_column("🔒", justify="center", no_wrap=True)
|
|
112
|
+
|
|
113
|
+
for r in rows:
|
|
114
|
+
cells = [escape(str(r.get("id") or "?"))]
|
|
115
|
+
if all_projects:
|
|
116
|
+
cells.append(escape(str(r.get("project") or "?")))
|
|
117
|
+
cells.append(escape(str(r.get("decision") or "")))
|
|
118
|
+
cells.append(escape(str(r.get("file_path") or "")))
|
|
119
|
+
cells.append("🔒" if r.get("do_not_revert") else "")
|
|
120
|
+
table.add_row(*cells)
|
|
121
|
+
console.print(table)
|
|
122
|
+
except Exception as exc: # noqa: BLE001 — never let rendering break the command
|
|
123
|
+
# Plain fallback (also covers environments without a real rich). Log so
|
|
124
|
+
# an unexpected render failure is observable rather than silently masked.
|
|
125
|
+
logger.debug("codevira search: rich render failed (%s); plain fallback", exc)
|
|
126
|
+
if not rows:
|
|
127
|
+
print(f"No decisions matched {query!r} in {scope}.")
|
|
128
|
+
return
|
|
129
|
+
for r in rows:
|
|
130
|
+
prefix = f"[{r.get('project')}] " if all_projects else ""
|
|
131
|
+
lock = " (locked)" if r.get("do_not_revert") else ""
|
|
132
|
+
print(f" #{r.get('id')}: {prefix}{r.get('decision')}{lock}")
|