massgen 0.1.0a2__py3-none-any.whl → 0.1.0a3__py3-none-any.whl

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.

Potentially problematic release.


This version of massgen might be problematic. Click here for more details.

massgen/__init__.py CHANGED
@@ -68,7 +68,7 @@ from .chat_agent import (
68
68
  from .message_templates import MessageTemplates, get_templates
69
69
  from .orchestrator import Orchestrator, create_orchestrator
70
70
 
71
- __version__ = "0.1.0a2"
71
+ __version__ = "0.1.0a3"
72
72
  __author__ = "MassGen Contributors"
73
73
 
74
74
 
massgen/cli.py CHANGED
@@ -291,29 +291,33 @@ def create_backend(backend_type: str, **kwargs) -> Any:
291
291
  if backend_type == "openai":
292
292
  api_key = kwargs.get("api_key") or os.getenv("OPENAI_API_KEY")
293
293
  if not api_key:
294
- print("⚠️ Warning: OpenAI API key not found. Set OPENAI_API_KEY environment variable or add to .env file.", flush=True)
295
- print(" .env file locations: current directory, or ~/.massgen/.env", flush=True)
294
+ raise ConfigurationError(
295
+ "OpenAI API key not found. Set OPENAI_API_KEY environment variable.\n" "You can add it to a .env file in:\n" " - Current directory: .env\n" " - Global config: ~/.massgen/.env",
296
+ )
296
297
  return ResponseBackend(api_key=api_key, **kwargs)
297
298
 
298
299
  elif backend_type == "grok":
299
300
  api_key = kwargs.get("api_key") or os.getenv("XAI_API_KEY")
300
301
  if not api_key:
301
- print("⚠️ Warning: Grok API key not found. Set XAI_API_KEY environment variable or add to .env file.", flush=True)
302
- print(" .env file locations: current directory, or ~/.massgen/.env", flush=True)
302
+ raise ConfigurationError(
303
+ "Grok API key not found. Set XAI_API_KEY environment variable.\n" "You can add it to a .env file in:\n" " - Current directory: .env\n" " - Global config: ~/.massgen/.env",
304
+ )
303
305
  return GrokBackend(api_key=api_key, **kwargs)
304
306
 
305
307
  elif backend_type == "claude":
306
308
  api_key = kwargs.get("api_key") or os.getenv("ANTHROPIC_API_KEY")
307
309
  if not api_key:
308
- print("⚠️ Warning: Claude API key not found. Set ANTHROPIC_API_KEY environment variable or add to .env file.", flush=True)
309
- print(" .env file locations: current directory, or ~/.massgen/.env", flush=True)
310
+ raise ConfigurationError(
311
+ "Claude API key not found. Set ANTHROPIC_API_KEY environment variable.\n" "You can add it to a .env file in:\n" " - Current directory: .env\n" " - Global config: ~/.massgen/.env",
312
+ )
310
313
  return ClaudeBackend(api_key=api_key, **kwargs)
311
314
 
312
315
  elif backend_type == "gemini":
313
316
  api_key = kwargs.get("api_key") or os.getenv("GOOGLE_API_KEY") or os.getenv("GEMINI_API_KEY")
314
317
  if not api_key:
315
- print("⚠️ Warning: Gemini API key not found. Set GOOGLE_API_KEY environment variable or add to .env file.", flush=True)
316
- print(" .env file locations: current directory, or ~/.massgen/.env", flush=True)
318
+ raise ConfigurationError(
319
+ "Gemini API key not found. Set GOOGLE_API_KEY environment variable.\n" "You can add it to a .env file in:\n" " - Current directory: .env\n" " - Global config: ~/.massgen/.env",
320
+ )
317
321
  return GeminiBackend(api_key=api_key, **kwargs)
318
322
 
319
323
  elif backend_type == "chatcompletion":
@@ -325,43 +329,81 @@ def create_backend(backend_type: str, **kwargs) -> Any:
325
329
  if base_url and "cerebras.ai" in base_url:
326
330
  api_key = os.getenv("CEREBRAS_API_KEY")
327
331
  if not api_key:
328
- raise ConfigurationError("Cerebras AI API key not found. Set CEREBRAS_API_KEY or provide in config.")
332
+ raise ConfigurationError(
333
+ "Cerebras AI API key not found. Set CEREBRAS_API_KEY environment variable.\n"
334
+ "You can add it to a .env file in:\n"
335
+ " - Current directory: .env\n"
336
+ " - Global config: ~/.massgen/.env",
337
+ )
329
338
  elif base_url and "together.xyz" in base_url:
330
339
  api_key = os.getenv("TOGETHER_API_KEY")
331
340
  if not api_key:
332
- raise ConfigurationError("Together AI API key not found. Set TOGETHER_API_KEY or provide in config.")
341
+ raise ConfigurationError(
342
+ "Together AI API key not found. Set TOGETHER_API_KEY environment variable.\n"
343
+ "You can add it to a .env file in:\n"
344
+ " - Current directory: .env\n"
345
+ " - Global config: ~/.massgen/.env",
346
+ )
333
347
  elif base_url and "fireworks.ai" in base_url:
334
348
  api_key = os.getenv("FIREWORKS_API_KEY")
335
349
  if not api_key:
336
- raise ConfigurationError("Fireworks AI API key not found. Set FIREWORKS_API_KEY or provide in config.")
350
+ raise ConfigurationError(
351
+ "Fireworks AI API key not found. Set FIREWORKS_API_KEY environment variable.\n"
352
+ "You can add it to a .env file in:\n"
353
+ " - Current directory: .env\n"
354
+ " - Global config: ~/.massgen/.env",
355
+ )
337
356
  elif base_url and "groq.com" in base_url:
338
357
  api_key = os.getenv("GROQ_API_KEY")
339
358
  if not api_key:
340
- raise ConfigurationError("Groq API key not found. Set GROQ_API_KEY or provide in config.")
359
+ raise ConfigurationError(
360
+ "Groq API key not found. Set GROQ_API_KEY environment variable.\n" "You can add it to a .env file in:\n" " - Current directory: .env\n" " - Global config: ~/.massgen/.env",
361
+ )
341
362
  elif base_url and "nebius.com" in base_url:
342
363
  api_key = os.getenv("NEBIUS_API_KEY")
343
364
  if not api_key:
344
- raise ConfigurationError("Nebius AI Studio API key not found. Set NEBIUS_API_KEY or provide in config.")
365
+ raise ConfigurationError(
366
+ "Nebius AI Studio API key not found. Set NEBIUS_API_KEY environment variable.\n"
367
+ "You can add it to a .env file in:\n"
368
+ " - Current directory: .env\n"
369
+ " - Global config: ~/.massgen/.env",
370
+ )
345
371
  elif base_url and "openrouter.ai" in base_url:
346
372
  api_key = os.getenv("OPENROUTER_API_KEY")
347
373
  if not api_key:
348
- raise ConfigurationError("OpenRouter API key not found. Set OPENROUTER_API_KEY or provide in config.")
374
+ raise ConfigurationError(
375
+ "OpenRouter API key not found. Set OPENROUTER_API_KEY environment variable.\n"
376
+ "You can add it to a .env file in:\n"
377
+ " - Current directory: .env\n"
378
+ " - Global config: ~/.massgen/.env",
379
+ )
349
380
  elif base_url and ("z.ai" in base_url or "bigmodel.cn" in base_url):
350
381
  api_key = os.getenv("ZAI_API_KEY")
351
382
  if not api_key:
352
- raise ConfigurationError("ZAI API key not found. Set ZAI_API_KEY or provide in config.")
383
+ raise ConfigurationError(
384
+ "ZAI API key not found. Set ZAI_API_KEY environment variable.\n" "You can add it to a .env file in:\n" " - Current directory: .env\n" " - Global config: ~/.massgen/.env",
385
+ )
353
386
  elif base_url and ("moonshot.ai" in base_url or "moonshot.cn" in base_url):
354
387
  api_key = os.getenv("MOONSHOT_API_KEY") or os.getenv("KIMI_API_KEY")
355
388
  if not api_key:
356
- raise ConfigurationError("Kimi/Moonshot API key not found. Set MOONSHOT_API_KEY or KIMI_API_KEY or provide in config.")
389
+ raise ConfigurationError(
390
+ "Kimi/Moonshot API key not found. Set MOONSHOT_API_KEY or KIMI_API_KEY environment variable.\n"
391
+ "You can add it to a .env file in:\n"
392
+ " - Current directory: .env\n"
393
+ " - Global config: ~/.massgen/.env",
394
+ )
357
395
  elif base_url and "poe.com" in base_url:
358
396
  api_key = os.getenv("POE_API_KEY")
359
397
  if not api_key:
360
- raise ConfigurationError("POE API key not found. Set POE_API_KEY or provide in config.")
398
+ raise ConfigurationError(
399
+ "POE API key not found. Set POE_API_KEY environment variable.\n" "You can add it to a .env file in:\n" " - Current directory: .env\n" " - Global config: ~/.massgen/.env",
400
+ )
361
401
  elif base_url and "aliyuncs.com" in base_url:
362
402
  api_key = os.getenv("QWEN_API_KEY")
363
403
  if not api_key:
364
- raise ConfigurationError("Qwen API key not found. Set QWEN_API_KEY or provide in config.")
404
+ raise ConfigurationError(
405
+ "Qwen API key not found. Set QWEN_API_KEY environment variable.\n" "You can add it to a .env file in:\n" " - Current directory: .env\n" " - Global config: ~/.massgen/.env",
406
+ )
365
407
 
366
408
  return ChatCompletionsBackend(api_key=api_key, **kwargs)
367
409
 
@@ -370,7 +412,9 @@ def create_backend(backend_type: str, **kwargs) -> Any:
370
412
  # Supports both global (z.ai) and China (bigmodel.cn) endpoints
371
413
  api_key = kwargs.get("api_key") or os.getenv("ZAI_API_KEY")
372
414
  if not api_key:
373
- raise ConfigurationError("ZAI API key not found. Set ZAI_API_KEY or provide in config.")
415
+ raise ConfigurationError(
416
+ "ZAI API key not found. Set ZAI_API_KEY environment variable.\n" "You can add it to a .env file in:\n" " - Current directory: .env\n" " - Global config: ~/.massgen/.env",
417
+ )
374
418
  return ChatCompletionsBackend(api_key=api_key, **kwargs)
375
419
 
376
420
  elif backend_type == "lmstudio":
@@ -1219,13 +1263,13 @@ async def run_interactive_mode(
1219
1263
  rich_console.clear()
1220
1264
 
1221
1265
  # ASCII art for interactive multi-agent mode
1222
- ascii_art = """[bold cyan]
1266
+ ascii_art = """[bold #4A90E2]
1223
1267
  ███╗ ███╗ █████╗ ███████╗███████╗ ██████╗ ███████╗███╗ ██╗
1224
1268
  ████╗ ████║██╔══██╗██╔════╝██╔════╝██╔════╝ ██╔════╝████╗ ██║
1225
1269
  ██╔████╔██║███████║███████╗███████╗██║ ███╗█████╗ ██╔██╗ ██║
1226
1270
  ██║╚██╔╝██║██╔══██║╚════██║╚════██║██║ ██║██╔══╝ ██║╚██╗██║
1227
1271
  ██║ ╚═╝ ██║██║ ██║███████║███████║╚██████╔╝███████╗██║ ╚████║
1228
- ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚══════╝ ╚═════╝ ╚══════╝╚═╝ ╚═══╝[/bold cyan]
1272
+ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚══════╝ ╚═════╝ ╚══════╝╚═╝ ╚═══╝[/bold #4A90E2]
1229
1273
 
1230
1274
  [dim] 🤖 🤖 🤖 → 💬 collaborate → 🎯 winner → 📢 final[/dim]
1231
1275
  """
@@ -1233,7 +1277,7 @@ async def run_interactive_mode(
1233
1277
  # Wrap ASCII art in a panel
1234
1278
  ascii_panel = Panel(
1235
1279
  ascii_art,
1236
- border_style="bold cyan",
1280
+ border_style="bold #4A90E2",
1237
1281
  padding=(0, 2),
1238
1282
  width=80,
1239
1283
  )
massgen/config_builder.py CHANGED
@@ -33,11 +33,11 @@ load_dotenv()
33
33
  # Custom theme for the CLI - using colors that work on both light and dark backgrounds
34
34
  custom_theme = Theme(
35
35
  {
36
- "info": "bright_blue",
37
- "warning": "bright_yellow",
38
- "error": "bright_red bold",
39
- "success": "bright_green bold",
40
- "prompt": "bright_magenta bold",
36
+ "info": "#4A90E2", # Medium blue - matches system status colors
37
+ "warning": "#CC6600", # Orange-brown - works on both light and dark
38
+ "error": "#CC0000 bold", # Deep red - strong contrast
39
+ "success": "#00AA44 bold", # Deep green - visible on both
40
+ "prompt": "#6633CC bold", # Purple - good on both backgrounds
41
41
  },
42
42
  )
43
43
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: massgen
3
- Version: 0.1.0a2
3
+ Version: 0.1.0a3
4
4
  Summary: Multi-Agent Scaling System - A powerful framework for collaborative AI
5
5
  Author-email: MassGen Team <contact@massgen.dev>
6
6
  License: Apache-2.0
@@ -1,8 +1,8 @@
1
- massgen/__init__.py,sha256=IeHEyx_AoV8W59BzWjs-kv67adlhGssN5b9Ng1Rn1Y0,7976
1
+ massgen/__init__.py,sha256=QOvL8mdc_ZJsXZYUL9Vz-QnXa0zflAPFBcBQNR59_Yo,7976
2
2
  massgen/agent_config.py,sha256=FQZhOvEJq-h9oI2YEDKXX5o6sAWxBg2yu_g9NrI1sP0,30661
3
3
  massgen/chat_agent.py,sha256=doJSk6yhaqE1-Qy1AYpsSvUiJwHB92xXCBeS8hGh8wQ,18567
4
- massgen/cli.py,sha256=K-QfUSvgl9vQKIKzyZLCA6Kl5JAozL_1LcbRWTL1tzc,82016
5
- massgen/config_builder.py,sha256=oQmFtQMp84SC0UDU9jE8OFOcl7mhFG8og2reodqsTRM,112730
4
+ massgen/cli.py,sha256=5SZ2K1eU13H6kZZERycWSJ5PHmFdF8l_s4QocY2x7iQ,84217
5
+ massgen/config_builder.py,sha256=wR94ptSnnGH8LMw6J0lEZh-X5qHcKj8AWoUM2mIN3Pw,112897
6
6
  massgen/coordination_tracker.py,sha256=_r8Man3uomovpXKHrlc4YBI030tkuavYQ-6fEk2JsfM,28201
7
7
  massgen/logger_config.py,sha256=wga7v8yIASxDaO7vwjbw_gyCxe0ZxIggV6kGyyMGYlM,22686
8
8
  massgen/message_templates.py,sha256=toBE7Kdn0I6SsM6-DxC1El0nPBFWgakFZcAPdQVfl5E,37945
@@ -265,9 +265,9 @@ massgen/v1/examples/fast-4o-mini-config.yaml,sha256=t7zmN8sWQrrWivjaBB9w_WHFDnU-
265
265
  massgen/v1/examples/fast_config.yaml,sha256=BDBCpSYJPzTZi9vAEGsCZ3lt3JV25RN-4Nf_17JAhUU,846
266
266
  massgen/v1/examples/production.yaml,sha256=hrNqzOqlQG1sL-5U8ZlA8QpCwGSoiCtqMu7Mi2gOd9s,2002
267
267
  massgen/v1/examples/single_agent.yaml,sha256=h8ysGIwPjvgnpRxTcBqw5nBz5D2MTXI_Ygdn4D9RdIA,1256
268
- massgen-0.1.0a2.dist-info/licenses/LICENSE,sha256=_r2TwhSv0GcpGeIKfwbz9z2qzOI62FHCfgSfnZ1z2fc,11386
269
- massgen-0.1.0a2.dist-info/METADATA,sha256=hr3s2ooXNIjLs9yjQjF3d5OfZFdT8cbC04e3jM3nuYU,60212
270
- massgen-0.1.0a2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
271
- massgen-0.1.0a2.dist-info/entry_points.txt,sha256=On6OV7swWO0StsAXeOri3MzmuxhO9C-PUvKW-5pJ6gA,49
272
- massgen-0.1.0a2.dist-info/top_level.txt,sha256=jm8ZxEGdkjsh8aPWXvCpnexL_S2ZRkFeT9vl6vIm_3I,8
273
- massgen-0.1.0a2.dist-info/RECORD,,
268
+ massgen-0.1.0a3.dist-info/licenses/LICENSE,sha256=_r2TwhSv0GcpGeIKfwbz9z2qzOI62FHCfgSfnZ1z2fc,11386
269
+ massgen-0.1.0a3.dist-info/METADATA,sha256=kvSVW9g9NhVwuVaPZx0WuDqRBypOEvVz8EQlo5SZC3w,60212
270
+ massgen-0.1.0a3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
271
+ massgen-0.1.0a3.dist-info/entry_points.txt,sha256=On6OV7swWO0StsAXeOri3MzmuxhO9C-PUvKW-5pJ6gA,49
272
+ massgen-0.1.0a3.dist-info/top_level.txt,sha256=jm8ZxEGdkjsh8aPWXvCpnexL_S2ZRkFeT9vl6vIm_3I,8
273
+ massgen-0.1.0a3.dist-info/RECORD,,