diff --git a/specs/ai/ai.spec.md b/specs/ai/ai.spec.md index 7227f64..a34665f 100644 --- a/specs/ai/ai.spec.md +++ b/specs/ai/ai.spec.md @@ -5,7 +5,7 @@ status: stable files: - src/ai.rs db_tables: [] -tracks: [110] +tracks: [19] depends_on: - specs/types/types.spec.md --- diff --git a/specs/archive/archive.spec.md b/specs/archive/archive.spec.md index cda61d1..274d6a7 100644 --- a/specs/archive/archive.spec.md +++ b/specs/archive/archive.spec.md @@ -5,6 +5,7 @@ status: stable files: - src/archive.rs db_tables: [] +tracks: [94] depends_on: - specs/validator/validator.spec.md --- diff --git a/specs/cli/cli.spec.md b/specs/cli/cli.spec.md index f839fb6..b416377 100644 --- a/specs/cli/cli.spec.md +++ b/specs/cli/cli.spec.md @@ -5,6 +5,7 @@ status: stable files: - src/main.rs db_tables: [] +tracks: [120] depends_on: - specs/config/config.spec.md - specs/parser/parser.spec.md diff --git a/specs/compact/compact.spec.md b/specs/compact/compact.spec.md index 43959f5..8bfc59c 100644 --- a/specs/compact/compact.spec.md +++ b/specs/compact/compact.spec.md @@ -5,6 +5,7 @@ status: stable files: - src/compact.rs db_tables: [] +tracks: [94] depends_on: - specs/validator/validator.spec.md --- diff --git a/specs/config/config.spec.md b/specs/config/config.spec.md index 97e5acf..5e7c9fd 100644 --- a/specs/config/config.spec.md +++ b/specs/config/config.spec.md @@ -5,6 +5,7 @@ status: stable files: - src/config.rs db_tables: [] +tracks: [31] depends_on: - specs/types/types.spec.md - specs/exports/exports.spec.md diff --git a/specs/exports/exports.spec.md b/specs/exports/exports.spec.md index cc50157..8a5ad78 100644 --- a/specs/exports/exports.spec.md +++ b/specs/exports/exports.spec.md @@ -16,6 +16,7 @@ files: - src/exports/php.rs - src/exports/ruby.rs db_tables: [] +tracks: [60] depends_on: - specs/types/types.spec.md --- diff --git a/specs/generator/generator.spec.md b/specs/generator/generator.spec.md index 012f612..70032e5 100644 --- a/specs/generator/generator.spec.md +++ b/specs/generator/generator.spec.md @@ -5,7 +5,7 @@ status: stable files: - src/generator.rs db_tables: [] -tracks: [99] +tracks: [73] depends_on: - specs/types/types.spec.md - specs/ai/ai.spec.md diff --git a/specs/github/github.spec.md b/specs/github/github.spec.md index beff779..093df8c 100644 --- a/specs/github/github.spec.md +++ b/specs/github/github.spec.md @@ -5,7 +5,7 @@ status: stable files: - src/github.rs db_tables: [] -tracks: [97] +tracks: [102] depends_on: - specs/parser/parser.spec.md --- diff --git a/specs/hash_cache/hash_cache.spec.md b/specs/hash_cache/hash_cache.spec.md index 82ac687..2fe68ab 100644 --- a/specs/hash_cache/hash_cache.spec.md +++ b/specs/hash_cache/hash_cache.spec.md @@ -5,6 +5,7 @@ status: stable files: - src/hash_cache.rs db_tables: [] +tracks: [90] depends_on: - specs/parser/parser.spec.md --- diff --git a/specs/hooks/hooks.spec.md b/specs/hooks/hooks.spec.md index 9699e49..4163705 100644 --- a/specs/hooks/hooks.spec.md +++ b/specs/hooks/hooks.spec.md @@ -5,7 +5,7 @@ status: stable files: - src/hooks.rs db_tables: [] -tracks: [112] +tracks: [39] depends_on: [] --- diff --git a/specs/manifest/manifest.spec.md b/specs/manifest/manifest.spec.md index a2e5653..0ab89e8 100644 --- a/specs/manifest/manifest.spec.md +++ b/specs/manifest/manifest.spec.md @@ -5,6 +5,7 @@ status: stable files: - src/manifest.rs db_tables: [] +tracks: [55] depends_on: [] --- diff --git a/specs/mcp/mcp.spec.md b/specs/mcp/mcp.spec.md index 8ca2a09..98c28ba 100644 --- a/specs/mcp/mcp.spec.md +++ b/specs/mcp/mcp.spec.md @@ -5,7 +5,7 @@ status: stable files: - src/mcp.rs db_tables: [] -tracks: [113] +tracks: [30] depends_on: - specs/types/types.spec.md - specs/validator/validator.spec.md diff --git a/specs/parser/parser.spec.md b/specs/parser/parser.spec.md index 287caf8..831b125 100644 --- a/specs/parser/parser.spec.md +++ b/specs/parser/parser.spec.md @@ -5,6 +5,7 @@ status: stable files: - src/parser.rs db_tables: [] +tracks: [117] depends_on: - specs/types/types.spec.md --- diff --git a/specs/registry/registry.spec.md b/specs/registry/registry.spec.md index 42d7772..79053e8 100644 --- a/specs/registry/registry.spec.md +++ b/specs/registry/registry.spec.md @@ -5,6 +5,7 @@ status: stable files: - src/registry.rs db_tables: [] +tracks: [52] depends_on: - specs/types/types.spec.md --- diff --git a/specs/schema/schema.spec.md b/specs/schema/schema.spec.md index f24fcea..558d111 100644 --- a/specs/schema/schema.spec.md +++ b/specs/schema/schema.spec.md @@ -5,6 +5,7 @@ status: stable files: - src/schema.rs db_tables: [] +tracks: [63] depends_on: [] --- diff --git a/specs/scoring/scoring.spec.md b/specs/scoring/scoring.spec.md index 0b99a0a..28a7664 100644 --- a/specs/scoring/scoring.spec.md +++ b/specs/scoring/scoring.spec.md @@ -5,6 +5,7 @@ status: stable files: - src/scoring.rs db_tables: [] +tracks: [31] depends_on: - specs/types/types.spec.md - specs/parser/parser.spec.md diff --git a/specs/types/types.spec.md b/specs/types/types.spec.md index bd2b570..ae7583d 100644 --- a/specs/types/types.spec.md +++ b/specs/types/types.spec.md @@ -5,6 +5,7 @@ status: stable files: - src/types.rs db_tables: [] +tracks: [118] depends_on: [] --- diff --git a/specs/validator/validator.spec.md b/specs/validator/validator.spec.md index 918364b..d55df1c 100644 --- a/specs/validator/validator.spec.md +++ b/specs/validator/validator.spec.md @@ -5,6 +5,7 @@ status: stable files: - src/validator.rs db_tables: [] +tracks: [119] depends_on: - specs/types/types.spec.md - specs/parser/parser.spec.md diff --git a/specs/view/view.spec.md b/specs/view/view.spec.md index 3ac7357..73f9828 100644 --- a/specs/view/view.spec.md +++ b/specs/view/view.spec.md @@ -5,6 +5,7 @@ status: stable files: - src/view.rs db_tables: [] +tracks: [94] depends_on: - specs/parser/parser.spec.md --- diff --git a/specs/watch/watch.spec.md b/specs/watch/watch.spec.md index 186fd7d..8818a26 100644 --- a/specs/watch/watch.spec.md +++ b/specs/watch/watch.spec.md @@ -5,7 +5,7 @@ status: stable files: - src/watch.rs db_tables: [] -tracks: [114] +tracks: [4] depends_on: - specs/config/config.spec.md --- diff --git a/src/ai.rs b/src/ai.rs index c88bf19..ca97924 100644 --- a/src/ai.rs +++ b/src/ai.rs @@ -168,14 +168,18 @@ pub fn resolve_ai_provider( return resolve_api_provider(&provider, config); } + // Check command_for_provider first — some providers (e.g. Cursor) have + // no CLI pipe mode and should return their specific error message + // before we check binary availability. + let cmd = command_for_provider(&provider, config.ai_model.as_deref())?; + if !is_binary_available(provider.binary_name()) { return Err(format!( "Provider \"{name}\" selected but `{}` is not installed or not on PATH", provider.binary_name() )); } - return command_for_provider(&provider, config.ai_model.as_deref()) - .map(ResolvedProvider::Cli); + return Ok(ResolvedProvider::Cli(cmd)); } // 2. aiCommand in config (explicit override) @@ -189,6 +193,8 @@ pub fn resolve_ai_provider( return resolve_api_provider(provider, config); } + let cmd = command_for_provider(provider, config.ai_model.as_deref())?; + if !is_binary_available(provider.binary_name()) { return Err(format!( "Provider \"{}\" configured but `{}` is not installed or not on PATH", @@ -196,8 +202,7 @@ pub fn resolve_ai_provider( provider.binary_name() )); } - return command_for_provider(provider, config.ai_model.as_deref()) - .map(ResolvedProvider::Cli); + return Ok(ResolvedProvider::Cli(cmd)); } // 4. Environment variable