#686/#661 night shift wave 1: spawn + drone + flow -> 100% seedgo. spawn.py main() intercepts <cmd> --help before dispatch (Subcommand_Help 0->100). drone rm.py + flow aggregate_central/registry_monitor route status output via cli success()/error() (Output_Routing ->100). Tests green: spawn 316, drone 864, flow 730.
This commit is contained in:
@@ -17,7 +17,7 @@ from __future__ import annotations
|
||||
import tempfile
|
||||
|
||||
from aipass.prax import logger
|
||||
from aipass.cli.apps.modules import console
|
||||
from aipass.cli.apps.modules import console, error, success
|
||||
from aipass.drone.apps.handlers.json import json_handler
|
||||
from aipass.drone.apps.handlers.rm_handler import (
|
||||
safe_delete as _safe_delete,
|
||||
@@ -76,11 +76,11 @@ def handle_command(command: str | None = None, args: list[str] | None = None) ->
|
||||
|
||||
results = _safe_delete(paths)
|
||||
ok = True
|
||||
for _path_str, success, message in results:
|
||||
if success:
|
||||
console.print(f"[green]✓[/green] {message}")
|
||||
for _path_str, succeeded, message in results:
|
||||
if succeeded:
|
||||
success(message)
|
||||
else:
|
||||
console.print(f"[red]✗[/red] {message}")
|
||||
error(message)
|
||||
ok = False
|
||||
return ok
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ from typing import List
|
||||
_PKG_ROOT = Path(__file__).resolve().parents[3] # file.py -> modules/ -> apps/ -> flow/ -> aipass/
|
||||
FLOW_ROOT = _PKG_ROOT / "flow"
|
||||
|
||||
from aipass.cli.apps.modules import console
|
||||
from aipass.cli.apps.modules import console, error
|
||||
from aipass.prax.apps.modules.logger import system_logger as logger
|
||||
|
||||
# JSON handler for operation tracking
|
||||
@@ -179,7 +179,7 @@ def handle_command(command: str, args: List[str]) -> bool:
|
||||
console.print("[green]Central plans aggregated successfully[/green]")
|
||||
else:
|
||||
logger.error("[aggregate_central] Central plans aggregation failed")
|
||||
console.print("[red]Central plans aggregation failed[/red]")
|
||||
error("Central plans aggregation failed")
|
||||
return result
|
||||
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ from aipass.prax.apps.modules.logger import system_logger as logger
|
||||
from aipass.flow.apps.handlers.json import json_handler
|
||||
|
||||
# CLI services for display
|
||||
from aipass.cli.apps.modules import console, error, warning
|
||||
from aipass.cli.apps.modules import console, error, success, warning
|
||||
|
||||
# Registry handlers
|
||||
from aipass.flow.apps.handlers.registry.load_registry import load_registry
|
||||
@@ -156,7 +156,7 @@ def handle_command(command: str, args: List[str]) -> bool:
|
||||
result = scan_plan_files()
|
||||
|
||||
console.print()
|
||||
console.print("[green]✓[/green] Scan complete")
|
||||
success("Scan complete")
|
||||
console.print(f" • Total plans: {result['total_plans']}")
|
||||
console.print(f" • Added: {len(result['added'])}")
|
||||
console.print(f" • Updated: {len(result['updated'])}")
|
||||
|
||||
@@ -233,6 +233,9 @@ def main():
|
||||
command = args[0]
|
||||
remaining = args[1:] if len(args) > 1 else []
|
||||
|
||||
if remaining and remaining[0] in ["--help", "-h"]:
|
||||
remaining = ["--help"]
|
||||
|
||||
if command == "create":
|
||||
return handle_create(remaining)
|
||||
|
||||
|
||||
@@ -429,7 +429,7 @@
|
||||
},
|
||||
"metadata": {
|
||||
"description": "Template file tracking registry for ID-based updates",
|
||||
"last_updated": "2026-07-10",
|
||||
"last_updated": "2026-07-11",
|
||||
"version": "1.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user