groove-dev 0.25.8 → 0.25.9

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.
@@ -165,12 +165,33 @@ export class ProcessManager {
165
165
  }
166
166
  }
167
167
 
168
- // Validate provider exists and is installed
169
- const provider = getProvider(config.provider || 'claude-code');
168
+ // Resolve provider auto-detect best installed if not specified
169
+ let providerName = config.provider;
170
+ if (!providerName) {
171
+ const { getInstalledProviders } = await import('./providers/index.js');
172
+ const installed = getInstalledProviders();
173
+ if (installed.length === 0) {
174
+ throw new Error('No AI providers installed. Install Claude Code, Gemini CLI, Codex, or Ollama first.');
175
+ }
176
+ // Priority: claude-code > gemini > codex > ollama
177
+ const priority = ['claude-code', 'gemini', 'codex', 'ollama'];
178
+ const best = priority.find((p) => installed.some((i) => i.id === p)) || installed[0].id;
179
+ providerName = best;
180
+ }
181
+
182
+ const provider = getProvider(providerName);
170
183
  if (!provider) {
171
- throw new Error(`Unknown provider: ${config.provider}`);
184
+ throw new Error(`Unknown provider: ${providerName}`);
172
185
  }
173
186
  if (!provider.constructor.isInstalled()) {
187
+ // Try to find any installed provider as fallback
188
+ const { getInstalledProviders } = await import('./providers/index.js');
189
+ const installed = getInstalledProviders();
190
+ if (installed.length > 0) {
191
+ throw new Error(
192
+ `${provider.constructor.displayName} is not installed. Available providers: ${installed.map((p) => p.name).join(', ')}`
193
+ );
194
+ }
174
195
  throw new Error(
175
196
  `${provider.constructor.displayName} is not installed. Run: ${provider.constructor.installCommand()}`
176
197
  );
@@ -183,7 +204,7 @@ export class ProcessManager {
183
204
  // Register the agent in the registry
184
205
  const agent = registry.add({
185
206
  ...config,
186
- provider: config.provider || 'claude-code',
207
+ provider: providerName,
187
208
  model: isAutoRouted ? null : config.model, // Set after routing
188
209
  });
189
210