generated from coulomb/repo-seed
feat: collect accountability root evidence
This commit is contained in:
@@ -14,6 +14,7 @@ from pathlib import Path
|
||||
from typing import Any
|
||||
from urllib.parse import quote
|
||||
|
||||
from .accountability_roots import DEFAULT_ROOT_MANIFEST_PATH, collect_accountability_root_evidence
|
||||
from .connectors import ConnectorConfig
|
||||
from .financial_baseline import financial_export_from_legacy
|
||||
from .loader import declaration_files, load_yaml
|
||||
@@ -108,6 +109,14 @@ def build_parser() -> argparse.ArgumentParser:
|
||||
help="Manifest path for the local-fabric-registry connector.",
|
||||
)
|
||||
|
||||
discover_roots = sub.add_parser(
|
||||
"discover-roots",
|
||||
help="Collect raw evidence from accountability root manifest entries.",
|
||||
)
|
||||
discover_roots.add_argument("--manifest", type=Path, default=DEFAULT_ROOT_MANIFEST_PATH)
|
||||
discover_roots.add_argument("--include-remote", action="store_true", help="Allow HTTP reads from configured remote roots.")
|
||||
discover_roots.add_argument("--max-items-per-root", type=int, default=200)
|
||||
|
||||
registry = sub.add_parser("registry", help="Feed a running Railiance Fabric registry service.")
|
||||
registry_sub = registry.add_subparsers(dest="registry_command", required=True)
|
||||
|
||||
@@ -320,6 +329,15 @@ def main(argv: list[str] | None = None) -> int:
|
||||
if args.command == "scan":
|
||||
return _scan_repo(args)
|
||||
|
||||
if args.command == "discover-roots":
|
||||
payload = collect_accountability_root_evidence(
|
||||
args.manifest,
|
||||
include_remote=args.include_remote,
|
||||
max_items_per_root=args.max_items_per_root,
|
||||
)
|
||||
print(json.dumps(payload, indent=2, sort_keys=True))
|
||||
return 0
|
||||
|
||||
if args.command == "registry":
|
||||
if args.registry_command == "sync":
|
||||
return _registry_sync(args)
|
||||
|
||||
Reference in New Issue
Block a user