mirror of
https://github.com/johndoe6345789/AutoMetabuilder.git
synced 2026-04-24 13:54:59 +00:00
Introduce AutoMetabuilder core components and workflow packages:
- Implement core components: CLI argument parsing, environment loading, GitHub service creation, and logging configuration. - Add support for OpenAI client setup and model resolution. - Develop SDLC context loader from GitHub and repository files. - Implement workflow context and engine builders. - Introduce major workflow packages: `game_tick_loop` and `contextual_iterative_loop`. - Update localization files with new package descriptions and labels. - Streamline web navigation by loading items from a dedicated JSON file.
This commit is contained in:
19
backend/autometabuilder/web/routes/run.py
Normal file
19
backend/autometabuilder/web/routes/run.py
Normal file
@@ -0,0 +1,19 @@
|
||||
"""Run route for triggering the bot."""
|
||||
from __future__ import annotations
|
||||
|
||||
from flask import Blueprint, request
|
||||
|
||||
from ..run_state import start_bot
|
||||
|
||||
run_bp = Blueprint("run", __name__)
|
||||
|
||||
|
||||
@run_bp.route("/api/run", methods=["POST"])
|
||||
def api_run() -> tuple[dict[str, object], int]:
|
||||
payload = request.get_json(silent=True) or {}
|
||||
mode = payload.get("mode", "once")
|
||||
iterations = int(payload.get("iterations", 1))
|
||||
yolo = bool(payload.get("yolo", True))
|
||||
stop_at_mvp = bool(payload.get("stop_at_mvp", False))
|
||||
started = start_bot(mode, iterations, yolo, stop_at_mvp)
|
||||
return {"started": started}, 202 if started else 409
|
||||
Reference in New Issue
Block a user