auto-sync: tudo-para-ia-mais-humana 2026-05-02 07:28:45
This commit is contained in:
@@ -52,6 +52,7 @@ from .scanner import environment_summary, scan_ecosystem
|
||||
from .storage import table_counts
|
||||
from .targeted_sync_audit import run_targeted_sync_audit
|
||||
from .workspace_hygiene import run_workspace_hygiene
|
||||
from .workspace_hygiene_policy import policy_payload, run_hygiene_policy
|
||||
|
||||
|
||||
def build_parser() -> argparse.ArgumentParser:
|
||||
@@ -126,6 +127,10 @@ def build_parser() -> argparse.ArgumentParser:
|
||||
hygiene.add_argument("--project-root", default="G:/_codex-git/tudo-para-ia-mais-humana")
|
||||
hygiene.add_argument("--central-platform-folder", default="")
|
||||
hygiene.add_argument("--apply", action="store_true")
|
||||
hygiene_policy = sub.add_parser("workspace-hygiene-policy", help="Write executable workspace cleanup and ACL retention policy.")
|
||||
hygiene_policy.add_argument("--project-root", default="G:/_codex-git/tudo-para-ia-mais-humana")
|
||||
hygiene_policy.add_argument("--no-generated", action="store_true")
|
||||
hygiene_policy.add_argument("--limit", type=int, default=40)
|
||||
sync_audit = sub.add_parser("targeted-sync-audit", help="Write safe Git synchronization audit for the active round repos.")
|
||||
sync_audit.add_argument("--project-root", default="G:/_codex-git/tudo-para-ia-mais-humana")
|
||||
sync_audit.add_argument("--mcp-repo-root", default="G:/_codex-git/tudo-para-ia-mcps-internos-plataform")
|
||||
@@ -557,6 +562,19 @@ def command_workspace_hygiene(args: argparse.Namespace) -> int:
|
||||
return 0
|
||||
|
||||
|
||||
def command_workspace_hygiene_policy(args: argparse.Namespace) -> int:
|
||||
report, records = run_hygiene_policy(
|
||||
project_root=Path(args.project_root),
|
||||
use_generated=not bool(args.no_generated),
|
||||
)
|
||||
payload = {
|
||||
"report": policy_payload(report, limit_cases=int(args.limit)),
|
||||
"generatedFiles": [record.path for record in records],
|
||||
}
|
||||
print(json.dumps(payload, ensure_ascii=False, indent=2))
|
||||
return 0
|
||||
|
||||
|
||||
def command_targeted_sync_audit(args: argparse.Namespace) -> int:
|
||||
central_platform_folder = Path(args.central_platform_folder) if args.central_platform_folder else None
|
||||
report, records = run_targeted_sync_audit(
|
||||
@@ -666,6 +684,8 @@ def main(argv: list[str] | None = None) -> int:
|
||||
return command_mcp_access_policy(args)
|
||||
if args.command == "workspace-hygiene":
|
||||
return command_workspace_hygiene(args)
|
||||
if args.command == "workspace-hygiene-policy":
|
||||
return command_workspace_hygiene_policy(args)
|
||||
if args.command == "targeted-sync-audit":
|
||||
return command_targeted_sync_audit(args)
|
||||
if args.command == "mcp-admin-route-acceptance":
|
||||
|
||||
Reference in New Issue
Block a user