zwarm 2.3.5__tar.gz → 3.0.1__tar.gz

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.
Files changed (40) hide show
  1. {zwarm-2.3.5 → zwarm-3.0.1}/PKG-INFO +1 -1
  2. {zwarm-2.3.5 → zwarm-3.0.1}/pyproject.toml +1 -1
  3. {zwarm-2.3.5 → zwarm-3.0.1}/src/zwarm/cli/main.py +107 -0
  4. zwarm-3.0.1/src/zwarm/cli/pilot.py +1000 -0
  5. {zwarm-2.3.5 → zwarm-3.0.1}/src/zwarm/prompts/__init__.py +3 -0
  6. {zwarm-2.3.5 → zwarm-3.0.1}/src/zwarm/prompts/orchestrator.py +36 -29
  7. zwarm-3.0.1/src/zwarm/prompts/pilot.py +147 -0
  8. {zwarm-2.3.5 → zwarm-3.0.1}/src/zwarm/tools/delegation.py +71 -27
  9. {zwarm-2.3.5 → zwarm-3.0.1}/.gitignore +0 -0
  10. {zwarm-2.3.5 → zwarm-3.0.1}/README.md +0 -0
  11. {zwarm-2.3.5 → zwarm-3.0.1}/src/zwarm/__init__.py +0 -0
  12. {zwarm-2.3.5 → zwarm-3.0.1}/src/zwarm/adapters/__init__.py +0 -0
  13. {zwarm-2.3.5 → zwarm-3.0.1}/src/zwarm/adapters/base.py +0 -0
  14. {zwarm-2.3.5 → zwarm-3.0.1}/src/zwarm/adapters/claude_code.py +0 -0
  15. {zwarm-2.3.5 → zwarm-3.0.1}/src/zwarm/adapters/codex_mcp.py +0 -0
  16. {zwarm-2.3.5 → zwarm-3.0.1}/src/zwarm/adapters/registry.py +0 -0
  17. {zwarm-2.3.5 → zwarm-3.0.1}/src/zwarm/adapters/test_codex_mcp.py +0 -0
  18. {zwarm-2.3.5 → zwarm-3.0.1}/src/zwarm/adapters/test_registry.py +0 -0
  19. {zwarm-2.3.5 → zwarm-3.0.1}/src/zwarm/cli/__init__.py +0 -0
  20. {zwarm-2.3.5 → zwarm-3.0.1}/src/zwarm/core/__init__.py +0 -0
  21. {zwarm-2.3.5 → zwarm-3.0.1}/src/zwarm/core/compact.py +0 -0
  22. {zwarm-2.3.5 → zwarm-3.0.1}/src/zwarm/core/config.py +0 -0
  23. {zwarm-2.3.5 → zwarm-3.0.1}/src/zwarm/core/environment.py +0 -0
  24. {zwarm-2.3.5 → zwarm-3.0.1}/src/zwarm/core/models.py +0 -0
  25. {zwarm-2.3.5 → zwarm-3.0.1}/src/zwarm/core/state.py +0 -0
  26. {zwarm-2.3.5 → zwarm-3.0.1}/src/zwarm/core/test_compact.py +0 -0
  27. {zwarm-2.3.5 → zwarm-3.0.1}/src/zwarm/core/test_config.py +0 -0
  28. {zwarm-2.3.5 → zwarm-3.0.1}/src/zwarm/core/test_models.py +0 -0
  29. {zwarm-2.3.5 → zwarm-3.0.1}/src/zwarm/orchestrator.py +0 -0
  30. {zwarm-2.3.5 → zwarm-3.0.1}/src/zwarm/sessions/__init__.py +0 -0
  31. {zwarm-2.3.5 → zwarm-3.0.1}/src/zwarm/sessions/manager.py +0 -0
  32. {zwarm-2.3.5 → zwarm-3.0.1}/src/zwarm/test_orchestrator_watchers.py +0 -0
  33. {zwarm-2.3.5 → zwarm-3.0.1}/src/zwarm/tools/__init__.py +0 -0
  34. {zwarm-2.3.5 → zwarm-3.0.1}/src/zwarm/watchers/__init__.py +0 -0
  35. {zwarm-2.3.5 → zwarm-3.0.1}/src/zwarm/watchers/base.py +0 -0
  36. {zwarm-2.3.5 → zwarm-3.0.1}/src/zwarm/watchers/builtin.py +0 -0
  37. {zwarm-2.3.5 → zwarm-3.0.1}/src/zwarm/watchers/llm_watcher.py +0 -0
  38. {zwarm-2.3.5 → zwarm-3.0.1}/src/zwarm/watchers/manager.py +0 -0
  39. {zwarm-2.3.5 → zwarm-3.0.1}/src/zwarm/watchers/registry.py +0 -0
  40. {zwarm-2.3.5 → zwarm-3.0.1}/src/zwarm/watchers/test_watchers.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: zwarm
3
- Version: 2.3.5
3
+ Version: 3.0.1
4
4
  Summary: Multi-Agent CLI Orchestration Research Platform
5
5
  Requires-Python: <3.14,>=3.13
6
6
  Requires-Dist: python-dotenv>=1.0.0
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "zwarm"
3
- version = "2.3.5"
3
+ version = "3.0.1"
4
4
  description = "Multi-Agent CLI Orchestration Research Platform"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.13,<3.14"
@@ -79,6 +79,7 @@ app = typer.Typer(
79
79
  [cyan]init[/] Initialize zwarm (creates .zwarm/ with config)
80
80
  [cyan]reset[/] Reset state and optionally config files
81
81
  [cyan]orchestrate[/] Start orchestrator to delegate tasks to executors
82
+ [cyan]pilot[/] Conversational orchestrator REPL (interactive)
82
83
  [cyan]exec[/] Run a single executor directly (for testing)
83
84
  [cyan]status[/] Show current state (sessions, tasks, events)
84
85
  [cyan]history[/] Show event history log
@@ -274,6 +275,112 @@ def orchestrate(
274
275
  sys.exit(1)
275
276
 
276
277
 
278
+ class PilotLM(str, Enum):
279
+ """LM options for pilot mode."""
280
+ gpt5_mini = "gpt5-mini" # GPT5MiniTester - fast, cheap, good for testing
281
+ gpt5 = "gpt5" # GPT5Large - standard
282
+ gpt5_verbose = "gpt5-verbose" # GPT5LargeVerbose - with extended thinking
283
+
284
+
285
+ @app.command()
286
+ def pilot(
287
+ task: Annotated[Optional[str], typer.Option("--task", "-t", help="Initial task (optional)")] = None,
288
+ task_file: Annotated[Optional[Path], typer.Option("--task-file", "-f", help="Read task from file")] = None,
289
+ config: Annotated[Optional[Path], typer.Option("--config", "-c", help="Path to config YAML")] = None,
290
+ overrides: Annotated[Optional[list[str]], typer.Option("--set", help="Override config (key=value)")] = None,
291
+ working_dir: Annotated[Path, typer.Option("--working-dir", "-w", help="Working directory")] = Path("."),
292
+ instance: Annotated[Optional[str], typer.Option("--instance", "-i", help="Instance ID (for isolation)")] = None,
293
+ instance_name: Annotated[Optional[str], typer.Option("--name", "-n", help="Human-readable instance name")] = None,
294
+ model: Annotated[PilotLM, typer.Option("--model", "-m", help="LM to use")] = PilotLM.gpt5_verbose,
295
+ ):
296
+ """
297
+ Interactive conversational orchestrator REPL.
298
+
299
+ Like 'orchestrate' but conversational: give instructions, watch the
300
+ orchestrator work, course-correct in real-time, time-travel to checkpoints.
301
+
302
+ [bold]Features:[/]
303
+ - Streaming display of orchestrator thinking and tool calls
304
+ - Turn-by-turn execution with checkpoints
305
+ - Time travel (:goto T1) to return to previous states
306
+ - Session visibility (:sessions) and state inspection (:state)
307
+
308
+ [bold]Commands:[/]
309
+ :help Show help
310
+ :history [N|all] Show turn checkpoints
311
+ :goto <turn|root> Time travel (e.g., :goto T1)
312
+ :state Show orchestrator state
313
+ :sessions Show active executor sessions
314
+ :reasoning on|off Toggle reasoning display
315
+ :quit Exit
316
+
317
+ [bold]LM Options:[/]
318
+ gpt5-mini GPT5MiniTester - fast/cheap, good for testing
319
+ gpt5 GPT5Large - standard model
320
+ gpt5-verbose GPT5LargeVerbose - with extended thinking (default)
321
+
322
+ [bold]Examples:[/]
323
+ [dim]# Start fresh, give instructions interactively[/]
324
+ $ zwarm pilot
325
+
326
+ [dim]# Start with an initial task[/]
327
+ $ zwarm pilot --task "Build user authentication"
328
+
329
+ [dim]# Use faster model for testing[/]
330
+ $ zwarm pilot --model gpt5-mini
331
+
332
+ [dim]# Named instance[/]
333
+ $ zwarm pilot --name my-feature
334
+ """
335
+ from zwarm.cli.pilot import run_pilot, build_pilot_orchestrator
336
+
337
+ # Resolve task (optional for pilot)
338
+ resolved_task = _resolve_task(task, task_file)
339
+
340
+ console.print(f"[bold]Starting pilot session...[/]")
341
+ console.print(f" Working dir: {working_dir.absolute()}")
342
+ console.print(f" Model: {model.value}")
343
+ if resolved_task:
344
+ console.print(f" Initial task: {resolved_task[:60]}...")
345
+ if instance:
346
+ console.print(f" Instance: {instance}" + (f" ({instance_name})" if instance_name else ""))
347
+ console.print()
348
+
349
+ orchestrator = None
350
+ try:
351
+ orchestrator = build_pilot_orchestrator(
352
+ config_path=config,
353
+ working_dir=working_dir.absolute(),
354
+ overrides=list(overrides or []),
355
+ instance_id=instance,
356
+ instance_name=instance_name,
357
+ lm_choice=model.value,
358
+ )
359
+
360
+ # Show instance ID if auto-generated
361
+ if orchestrator.instance_id and not instance:
362
+ console.print(f" [dim]Instance: {orchestrator.instance_id[:8]}[/]")
363
+
364
+ # Run the pilot REPL
365
+ run_pilot(orchestrator, initial_task=resolved_task)
366
+
367
+ # Save state on exit
368
+ orchestrator.save_state()
369
+ console.print("\n[dim]State saved.[/]")
370
+
371
+ except KeyboardInterrupt:
372
+ console.print("\n\n[yellow]Interrupted.[/]")
373
+ if orchestrator:
374
+ orchestrator.save_state()
375
+ console.print("[dim]State saved.[/]")
376
+ sys.exit(1)
377
+ except Exception as e:
378
+ console.print(f"\n[red]Error:[/] {e}")
379
+ import traceback
380
+ traceback.print_exc()
381
+ sys.exit(1)
382
+
383
+
277
384
  @app.command()
278
385
  def exec(
279
386
  task: Annotated[str, typer.Option("--task", "-t", help="Task to execute")],