1
0

feat: swarm E2E, MCP tools, timmy-serve L402, tests, notifications

Major Features:
- Auto-spawn persona agents (Echo, Forge, Seer) on app startup
- WebSocket broadcasts for real-time swarm UI updates
- MCP tool integration: web search, file I/O, shell, Python execution
- New /tools dashboard page showing agent capabilities
- Real timmy-serve start with L402 payment gating middleware
- Browser push notifications for briefings and task events

Tests:
- test_docker_agent.py: 9 tests for Docker agent runner
- test_swarm_integration_full.py: 18 E2E lifecycle tests
- Fixed all pytest warnings (436 tests, 0 warnings)

Improvements:
- Fixed coroutine warnings in coordinator broadcasts
- Fixed ResourceWarning for unclosed process pipes
- Added pytest-asyncio config to pyproject.toml
- Test isolation with proper event loop cleanup
This commit is contained in:
Alexander Payne
2026-02-22 19:01:04 -05:00
parent c5f86b8960
commit f0aa43533f
17 changed files with 1628 additions and 13 deletions

View File

@@ -19,18 +19,30 @@ app = typer.Typer(help="Timmy Serve — sovereign AI agent with Lightning paymen
def start(
port: int = typer.Option(8402, "--port", "-p", help="Port for the serve API"),
host: str = typer.Option("0.0.0.0", "--host", "-h", help="Host to bind to"),
price: int = typer.Option(100, "--price", help="Price per request in sats"),
dry_run: bool = typer.Option(False, "--dry-run", help="Print config and exit (for testing)"),
):
"""Start Timmy in serve mode with L402 payment gating."""
typer.echo(f"Starting Timmy Serve on {host}:{port}")
typer.echo("L402 payment proxy active — agents pay in sats")
typer.echo(f"L402 payment proxy active — {price} sats per request")
typer.echo("Press Ctrl-C to stop")
# TODO: Start a FastAPI app with L402 middleware
# For now, print the configuration
typer.echo(f"\nEndpoints:")
typer.echo(f" POST /serve/chat — L402-gated chat (pay per request)")
typer.echo(f" GET /serve/invoice — Request a Lightning invoice")
typer.echo(f" GET /serve/status — Service status")
typer.echo(f" GET /health — Health check")
if dry_run:
typer.echo("\n(Dry run mode - not starting server)")
return
import uvicorn
from timmy_serve.app import create_timmy_serve_app
# Create and run the FastAPI app
serve_app = create_timmy_serve_app(price_sats=price)
uvicorn.run(serve_app, host=host, port=port)
@app.command()