delimit-cli 3.6.9 → 3.6.10

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.
@@ -327,78 +327,30 @@ Run full governance compliance checks. Verify security, policy compliance, evide
327
327
  }
328
328
  }
329
329
 
330
- // Step 6: Auto-detect API keys for multi-model deliberation
331
- step(6, 'Detecting AI model API keys...');
332
-
330
+ // Silent: auto-detect API keys and configure models.json (no output)
333
331
  const modelsPath = path.join(DELIMIT_HOME, 'models.json');
334
- const keyDetection = {
335
- grok: { env: 'XAI_API_KEY', name: 'Grok (xAI)', found: false },
336
- gemini: { env: 'GOOGLE_APPLICATION_CREDENTIALS', name: 'Gemini (Vertex AI)', found: false },
337
- codex: { env: 'OPENAI_API_KEY', name: 'Codex (OpenAI)', found: false },
338
- };
339
-
340
- // Check which keys exist in environment
341
- for (const [id, info] of Object.entries(keyDetection)) {
342
- if (process.env[info.env]) {
343
- info.found = true;
344
- }
345
- }
346
-
347
- const foundKeys = Object.entries(keyDetection).filter(([, v]) => v.found);
348
- const missingKeys = Object.entries(keyDetection).filter(([, v]) => !v.found);
349
-
350
- if (foundKeys.length > 0 && !fs.existsSync(modelsPath)) {
351
- // Auto-generate models.json from detected keys
332
+ if (!fs.existsSync(modelsPath)) {
352
333
  const models = {};
353
- if (keyDetection.grok.found) {
354
- models.grok = {
355
- name: 'Grok 4',
356
- api_url: 'https://api.x.ai/v1/chat/completions',
357
- model: 'grok-4-0709',
358
- env_key: 'XAI_API_KEY',
359
- enabled: true,
360
- };
334
+ if (process.env.XAI_API_KEY) {
335
+ models.grok = { name: 'Grok', api_url: 'https://api.x.ai/v1/chat/completions', model: 'grok-4-0709', env_key: 'XAI_API_KEY', enabled: true };
361
336
  }
362
- if (keyDetection.gemini.found) {
363
- const project = process.env.GOOGLE_CLOUD_PROJECT || 'default';
364
- models.gemini = {
365
- name: 'Gemini 2.5 Flash',
366
- api_url: `https://us-central1-aiplatform.googleapis.com/v1/projects/{project}/locations/us-central1/publishers/google/models/gemini-2.5-flash:generateContent`,
367
- model: 'gemini-2.5-flash',
368
- format: 'vertex_ai',
369
- enabled: true,
370
- };
337
+ if (process.env.GOOGLE_APPLICATION_CREDENTIALS) {
338
+ const project = process.env.GOOGLE_CLOUD_PROJECT || process.env.GCLOUD_PROJECT || '';
339
+ models.gemini = { name: 'Gemini', api_url: `https://us-central1-aiplatform.googleapis.com/v1/projects/{project}/locations/us-central1/publishers/google/models/gemini-2.5-flash:generateContent`, model: 'gemini-2.5-flash', format: 'vertex_ai', enabled: true };
371
340
  }
372
- if (keyDetection.codex.found) {
373
- models.codex = {
374
- name: 'Codex (GPT-5.4)',
375
- format: 'codex_cli',
376
- model: 'gpt-5.4',
377
- enabled: true,
378
- };
341
+ if (process.env.OPENAI_API_KEY) {
342
+ models.openai = { name: 'GPT', api_url: 'https://api.openai.com/v1/chat/completions', model: 'gpt-4o', env_key: 'OPENAI_API_KEY', enabled: true };
379
343
  }
380
- fs.writeFileSync(modelsPath, JSON.stringify(models, null, 2));
381
- log(` ${green('')} Auto-configured ${foundKeys.length} model(s) for deliberation:`);
382
- foundKeys.forEach(([, v]) => log(` ${green('✓')} ${v.name}`));
383
- } else if (fs.existsSync(modelsPath)) {
384
- try {
385
- const existing = JSON.parse(fs.readFileSync(modelsPath, 'utf-8'));
386
- const enabled = Object.values(existing).filter(m => m.enabled);
387
- log(` ${green('✓')} ${enabled.length} model(s) already configured for deliberation`);
388
- } catch {
389
- log(` ${yellow('!')} models.json exists but could not be read`);
344
+ if (process.env.ANTHROPIC_API_KEY) {
345
+ models.anthropic = { name: 'Claude', api_url: 'https://api.anthropic.com/v1/messages', model: 'claude-sonnet-4-5-20250514', env_key: 'ANTHROPIC_API_KEY', format: 'anthropic', enabled: true };
346
+ }
347
+ if (Object.keys(models).length > 0) {
348
+ fs.writeFileSync(modelsPath, JSON.stringify(models, null, 2));
390
349
  }
391
- } else {
392
- log(` ${dim(' No AI API keys detected in environment')}`);
393
- }
394
-
395
- if (missingKeys.length > 0 && foundKeys.length < 2 && !fs.existsSync(modelsPath)) {
396
- log(` ${dim(' For multi-model deliberation, set 2+ of:')}`);
397
- missingKeys.forEach(([, v]) => log(` ${dim(`export ${v.env}=your-key`)}`));
398
350
  }
399
351
 
400
- // Step 7: Done
401
- step(7, 'Done!');
352
+ // Step 6: Done
353
+ step(6, 'Done!');
402
354
  log('');
403
355
  log(` ${green('Delimit is installed.')} Your AI now has persistent memory and governance.`);
404
356
  log('');
@@ -409,16 +361,6 @@ Run full governance compliance checks. Verify security, policy compliance, evide
409
361
  if (fs.existsSync(GEMINI_DIR)) tools.push('Gemini CLI');
410
362
  log(` ${green('✓')} ${tools.join(', ')}`);
411
363
 
412
- // Show deliberation status
413
- if (foundKeys.length >= 2) {
414
- log(` ${green('✓')} Multi-model deliberation: ${foundKeys.map(([,v]) => v.name).join(' + ')}`);
415
- } else if (foundKeys.length === 1) {
416
- log(` ${yellow('!')} Deliberation: needs 1 more API key (${missingKeys.slice(0,2).map(([,v]) => v.env).join(' or ')})`);
417
- } else if (fs.existsSync(modelsPath)) {
418
- log(` ${green('✓')} Deliberation: configured via ~/.delimit/models.json`);
419
- } else {
420
- log(` ${dim(' Deliberation: not configured (optional — set API keys to enable)')}`);
421
- }
422
364
  log('');
423
365
  log(' Try it now:');
424
366
  log(` ${bold('$ claude')}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "delimit-cli",
3
- "version": "3.6.9",
3
+ "version": "3.6.10",
4
4
  "description": "Catch breaking API changes before they ship. GitHub Action + CLI for OpenAPI specs.",
5
5
  "main": "index.js",
6
6
  "files": [