codeprobe 0.3.7__tar.gz → 0.3.8__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {codeprobe-0.3.7 → codeprobe-0.3.8}/PKG-INFO +1 -1
- {codeprobe-0.3.7 → codeprobe-0.3.8}/pyproject.toml +1 -1
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/__init__.py +1 -1
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/cli/init_cmd.py +42 -8
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/cli/wizard.py +16 -7
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe.egg-info/PKG-INFO +1 -1
- {codeprobe-0.3.7 → codeprobe-0.3.8}/tests/test_init_wizard.py +4 -4
- {codeprobe-0.3.7 → codeprobe-0.3.8}/LICENSE +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/README.md +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/setup.cfg +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/__main__.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/adapters/__init__.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/adapters/_base.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/adapters/claude.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/adapters/codex.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/adapters/copilot.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/adapters/openai_compat.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/adapters/protocol.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/adapters/session.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/adapters/telemetry.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/analysis/__init__.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/analysis/ranking.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/analysis/report.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/analysis/stats.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/api.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/assess/__init__.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/assess/heuristics.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/cli/__init__.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/cli/assess_cmd.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/cli/auth_cmd.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/cli/doctor_cmd.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/cli/experiment_cmd.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/cli/interpret_cmd.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/cli/json_display.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/cli/mine_cmd.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/cli/preamble_cmd.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/cli/probe_cmd.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/cli/ratings_cmd.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/cli/rich_display.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/cli/run_cmd.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/cli/scaffold_cmd.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/cli/validate_cmd.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/cli/yaml_writer.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/config/__init__.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/config/loader.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/config/redact.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/contrib/__init__.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/contrib/_shared.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/contrib/adaptive.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/contrib/counterfactual.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/contrib/debate.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/contrib/decision_tree.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/contrib/elo.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/contrib/fingerprint.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/contrib/mutation.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/contrib/pareto.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/contrib/sprt.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/contrib/tournament.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/core/__init__.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/core/__main__.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/core/checkpoint.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/core/events.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/core/executor.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/core/experiment.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/core/isolation.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/core/llm.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/core/mcp_discovery.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/core/preamble.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/core/registry.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/core/sandbox.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/core/scoring.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/loaders/__init__.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/loaders/suite.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/mining/__init__.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/mining/_graph.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/mining/_lang.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/mining/comprehension.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/mining/comprehension_writer.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/mining/curator.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/mining/curator_backends.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/mining/curator_tiers.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/mining/extractor.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/mining/multi_repo.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/mining/org_scale.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/mining/org_scale_families.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/mining/org_scale_oracle.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/mining/org_scale_scanner.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/mining/org_scale_validate.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/mining/sg_auth.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/mining/sg_ground_truth.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/mining/sources.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/mining/writer.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/models/__init__.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/models/evalrc.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/models/experiment.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/models/preamble.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/models/suite.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/models/task.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/preambles/__init__.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/preambles/github.md +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/preambles/sourcegraph.md +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/probe/__init__.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/probe/adapter.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/probe/generator.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/probe/writer.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/ratings/__init__.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/ratings/collector.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/scaffold/__init__.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/scaffold/writer.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/templates/__init__.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/templates/evalrc-mcp-comparison.yaml +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/templates/evalrc-model-comparison.yaml +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe/templates/evalrc-prompt-comparison.yaml +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe.egg-info/SOURCES.txt +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe.egg-info/dependency_links.txt +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe.egg-info/entry_points.txt +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe.egg-info/requires.txt +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/src/codeprobe.egg-info/top_level.txt +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/tests/test_adapter_contracts.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/tests/test_adapters.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/tests/test_analysis.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/tests/test_api.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/tests/test_artifact_scorer.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/tests/test_assess.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/tests/test_auth_cmd.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/tests/test_changed_symbols.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/tests/test_checkpoint.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/tests/test_checkpoint_scoring.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/tests/test_cli.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/tests/test_comprehension.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/tests/test_config_loader.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/tests/test_contrib.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/tests/test_ctrlc_integration.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/tests/test_curator_backends.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/tests/test_curator_core.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/tests/test_curator_integration.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/tests/test_curator_tiers.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/tests/test_doctor_cmd.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/tests/test_events.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/tests/test_executor.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/tests/test_executor_events.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/tests/test_experiment_cmd.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/tests/test_experiment_core.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/tests/test_isolation.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/tests/test_json_display.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/tests/test_llm.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/tests/test_loaders.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/tests/test_mcp_families_mining.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/tests/test_mcp_validate.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/tests/test_mine_cli.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/tests/test_mine_goals.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/tests/test_mine_presets.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/tests/test_mine_profiles.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/tests/test_mining.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/tests/test_models.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/tests/test_multi_repo_e2e.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/tests/test_multi_repo_mining.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/tests/test_new_families.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/tests/test_openai_compat.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/tests/test_oracle_types.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/tests/test_org_scale.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/tests/test_pipeline_integration.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/tests/test_preamble.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/tests/test_preamble_cmd.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/tests/test_probe.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/tests/test_probe_adapter.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/tests/test_ratings.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/tests/test_ratings_cmd.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/tests/test_registry.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/tests/test_run_config_resolution.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/tests/test_scaffold.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/tests/test_scanner_refactor.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/tests/test_scoring.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/tests/test_secret_redaction.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/tests/test_session.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/tests/test_sg_auth.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/tests/test_sg_ground_truth.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/tests/test_shell_shim.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/tests/test_show_prompt.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/tests/test_suite.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/tests/test_suite_manifest.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/tests/test_telemetry.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/tests/test_validate_cmd.py +0 -0
- {codeprobe-0.3.7 → codeprobe-0.3.8}/tests/test_weighted_f1.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: codeprobe
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.8
|
|
4
4
|
Summary: Benchmark AI coding agents against your own codebase. Mine real tasks from repo history, run agents, interpret results.
|
|
5
5
|
Author: codeprobe contributors
|
|
6
6
|
License-Expression: Apache-2.0
|
|
@@ -194,6 +194,32 @@ def _prompt_sourcegraph_url() -> str | None:
|
|
|
194
194
|
return url if url else None
|
|
195
195
|
|
|
196
196
|
|
|
197
|
+
def _extract_sourcegraph_mcp(
|
|
198
|
+
discovered: list[tuple[Path, list[str]]],
|
|
199
|
+
) -> dict | None:
|
|
200
|
+
"""Load the Sourcegraph MCP config from a discovered config file.
|
|
201
|
+
|
|
202
|
+
Returns the full MCP config dict with only the Sourcegraph server,
|
|
203
|
+
or None if no Sourcegraph server is found.
|
|
204
|
+
"""
|
|
205
|
+
import json
|
|
206
|
+
|
|
207
|
+
sg_names = {"sourcegraph", "sg", "sourcegraph-mcp"}
|
|
208
|
+
for path, server_names in discovered:
|
|
209
|
+
matching = [n for n in server_names if n.lower() in sg_names]
|
|
210
|
+
if not matching:
|
|
211
|
+
continue
|
|
212
|
+
try:
|
|
213
|
+
data = json.loads(path.read_text(encoding="utf-8"))
|
|
214
|
+
except (json.JSONDecodeError, OSError):
|
|
215
|
+
continue
|
|
216
|
+
servers = data.get("mcpServers", {})
|
|
217
|
+
for name in matching:
|
|
218
|
+
if name in servers:
|
|
219
|
+
return {"mcpServers": {name: servers[name]}}
|
|
220
|
+
return None
|
|
221
|
+
|
|
222
|
+
|
|
197
223
|
def _goal_mcp(agents: list[str], name: str) -> _Result:
|
|
198
224
|
"""Goal 1: MCP comparison prompts."""
|
|
199
225
|
agent = _prompt_agent(agents)
|
|
@@ -201,19 +227,27 @@ def _goal_mcp(agents: list[str], name: str) -> _Result:
|
|
|
201
227
|
|
|
202
228
|
# Check if Sourcegraph is available in discovered MCP configs
|
|
203
229
|
discovered = discover_mcp_configs()
|
|
204
|
-
use_sourcegraph = False
|
|
205
230
|
|
|
206
231
|
if _detect_sourcegraph_in_mcp(discovered):
|
|
207
232
|
click.echo()
|
|
208
233
|
click.echo("Detected Sourcegraph MCP server in your configuration.")
|
|
209
|
-
click.
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
234
|
+
if click.confirm("Use this Sourcegraph config?", default=True):
|
|
235
|
+
sg_config = _extract_sourcegraph_mcp(discovered)
|
|
236
|
+
if sg_config:
|
|
237
|
+
return ask_mcp_comparison(
|
|
238
|
+
experiment_name=name,
|
|
239
|
+
agent=agent,
|
|
240
|
+
model=model,
|
|
241
|
+
mcp_config=sg_config,
|
|
242
|
+
)
|
|
243
|
+
|
|
244
|
+
click.echo()
|
|
245
|
+
click.echo("MCP server options:")
|
|
246
|
+
click.echo(" 1. Use a Sourcegraph access token (PAT)")
|
|
247
|
+
click.echo(" 2. Use an existing MCP config file")
|
|
248
|
+
choice = click.prompt("Choose", type=click.IntRange(1, 2), default=1)
|
|
215
249
|
|
|
216
|
-
if
|
|
250
|
+
if choice == 1:
|
|
217
251
|
token = _prompt_sourcegraph_token()
|
|
218
252
|
sg_url = _prompt_sourcegraph_url()
|
|
219
253
|
return ask_mcp_comparison(
|
|
@@ -45,26 +45,35 @@ def ask_mcp_comparison(
|
|
|
45
45
|
agent: str,
|
|
46
46
|
model: str | None,
|
|
47
47
|
mcp_config_path: str | None = None,
|
|
48
|
+
mcp_config: dict | None = None,
|
|
48
49
|
sourcegraph_token: str | None = None,
|
|
49
50
|
sourcegraph_url: str | None = None,
|
|
50
51
|
) -> tuple[EvalrcConfig, list[ExperimentConfig]]:
|
|
51
52
|
"""Goal 1: Compare baseline agent vs MCP-augmented agent.
|
|
52
53
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
*mcp_config_path
|
|
54
|
+
Resolution order for MCP config:
|
|
55
|
+
1. *mcp_config* — pre-built dict (e.g. from discovered Claude Code config)
|
|
56
|
+
2. *sourcegraph_token* — build HTTP config with Authorization header
|
|
57
|
+
3. *mcp_config_path* — load from a JSON file on disk
|
|
57
58
|
"""
|
|
58
|
-
if
|
|
59
|
+
if mcp_config is not None:
|
|
60
|
+
mcp_data = mcp_config
|
|
61
|
+
# Detect if this is a Sourcegraph config for preamble
|
|
62
|
+
servers = mcp_data.get("mcpServers", {})
|
|
63
|
+
sg_names = {"sourcegraph", "sg", "sourcegraph-mcp"}
|
|
64
|
+
preambles: tuple[str, ...] = (
|
|
65
|
+
("sourcegraph",) if any(k.lower() in sg_names for k in servers) else ()
|
|
66
|
+
)
|
|
67
|
+
elif sourcegraph_token is not None:
|
|
59
68
|
mcp_data = build_sourcegraph_mcp_config(
|
|
60
69
|
token=sourcegraph_token,
|
|
61
70
|
url=sourcegraph_url or _DEFAULT_SOURCEGRAPH_URL,
|
|
62
71
|
)
|
|
63
|
-
preambles
|
|
72
|
+
preambles = ("sourcegraph",)
|
|
64
73
|
else:
|
|
65
74
|
if mcp_config_path is None:
|
|
66
75
|
raise click.BadParameter(
|
|
67
|
-
"
|
|
76
|
+
"Provide mcp_config, sourcegraph_token, or mcp_config_path."
|
|
68
77
|
)
|
|
69
78
|
mcp_data = _load_json(mcp_config_path)
|
|
70
79
|
preambles = ()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: codeprobe
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.8
|
|
4
4
|
Summary: Benchmark AI coding agents against your own codebase. Mine real tasks from repo history, run agents, interpret results.
|
|
5
5
|
Author: codeprobe contributors
|
|
6
6
|
License-Expression: Apache-2.0
|
|
@@ -473,8 +473,8 @@ class TestInitCliIntegration:
|
|
|
473
473
|
|
|
474
474
|
runner = CliRunner()
|
|
475
475
|
# Inputs: goal=1, experiment name (enter=default), agent (enter=default),
|
|
476
|
-
# model (enter=skip),
|
|
477
|
-
input_text = f"1\n\nclaude\n\
|
|
476
|
+
# model (enter=skip), choose=2 (MCP config file), mcp config path
|
|
477
|
+
input_text = f"1\n\nclaude\n\n2\n{mcp_file}\n"
|
|
478
478
|
result = runner.invoke(main, ["init", str(tmp_path)], input=input_text)
|
|
479
479
|
assert result.exit_code == 0, result.output
|
|
480
480
|
assert not (tmp_path / ".evalrc.yaml").exists()
|
|
@@ -489,8 +489,8 @@ class TestInitCliIntegration:
|
|
|
489
489
|
|
|
490
490
|
runner = CliRunner()
|
|
491
491
|
# Inputs: goal=1, name=default, agent=claude, model=skip,
|
|
492
|
-
#
|
|
493
|
-
input_text = "1\n\nclaude\n\
|
|
492
|
+
# choose=1 (PAT), choose=1 (paste now), token, url=default (enter)
|
|
493
|
+
input_text = "1\n\nclaude\n\n1\n1\ntok_test123\n\n"
|
|
494
494
|
result = runner.invoke(main, ["init", str(tmp_path)], input=input_text)
|
|
495
495
|
assert result.exit_code == 0, result.output
|
|
496
496
|
assert not (tmp_path / ".evalrc.yaml").exists()
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|