| 1 | //! SplitFire's side of the test setup: the conformance [`target`], and launch config for the |
| 2 | //! SDK-driven integration tests. The mock endpoint and the raw client come from `ed-acp-testkit`. |
| 3 | #![allow(dead_code)] |
| 4 | |
| 5 | use std::path::Path; |
| 6 | |
| 7 | use agent_client_protocol::AcpAgentConfig; |
| 8 | |
| 9 | #[allow(unused_imports)] |
| 10 | pub use ed_acp_testkit::{ |
| 11 | MODEL, MockStats, Script, Step, TEST_KEY, Target, start_mock_llm, temp_dir, |
| 12 | }; |
| 13 | |
| 14 | /// 5 workspace tools + 6 theory tools + analyze_audio + list_separations. |
| 15 | pub const BASE_TOOL_COUNT: usize = 13; |
| 16 | |
| 17 | /// splitfire-agent as the conformance suite sees it: built-in demucs off unless a test opts in. |
| 18 | pub fn target() -> Target { |
| 19 | Target { |
| 20 | bin: env!("CARGO_BIN_EXE_splitfire-agent").into(), |
| 21 | name: "splitfire-agent", |
| 22 | env_prefix: "SPLITFIRE", |
| 23 | mcp_stub: env!("CARGO_BIN_EXE_mcp_stdio_stub").into(), |
| 24 | base_tool_count: BASE_TOOL_COUNT, |
| 25 | env: vec![("SPLITFIRE_MCP_DEMUCS".into(), "off".into())], |
| 26 | } |
| 27 | } |
| 28 | |
| 29 | /// Launch config for the real binary: mock endpoint, dummy key, isolated data dir, and no |
| 30 | /// built-in demucs unless a test opts in. |
| 31 | pub fn agent_config(binary: &str, base_url: &str, data_dir: &Path) -> AcpAgentConfig { |
| 32 | AcpAgentConfig::new(binary) |
| 33 | .env("SPLITFIRE_BASE_URL", base_url) |
| 34 | .env("SPLITFIRE_MODEL", MODEL) |
| 35 | .env("ONDE_API_KEY", TEST_KEY) |
| 36 | .env("SPLITFIRE_DATA_DIR", data_dir.display().to_string()) |
| 37 | .env("SPLITFIRE_MCP_DEMUCS", "off") |
| 38 | } |