Files
ewoooc/scripts/ops/report_pixelrag_application_portfolio.py
ogt 140889e5a8
Some checks failed
CD Pipeline / deploy (push) Has been cancelled
feat(ai): 建立 PixelRAG application portfolio
2026-07-09 23:15:07 +08:00

51 lines
1.3 KiB
Python
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/usr/bin/env python3
"""Report the PixelRAG application portfolio as machine-readable JSON."""
from __future__ import annotations
import argparse
import json
import sys
from pathlib import Path
ROOT = Path(__file__).resolve().parents[2]
if str(ROOT) not in sys.path:
sys.path.insert(0, str(ROOT))
from services.pixelrag_application_portfolio_service import ( # noqa: E402
build_pixelrag_application_portfolio,
)
def main() -> int:
parser = argparse.ArgumentParser(
description="輸出 PixelRAG 還可整合/運用場景的機器可讀 portfolio。"
)
parser.add_argument(
"--area",
help="限制 area例如 commerce / rag / ux / ops / marketing / governance。",
)
parser.add_argument(
"--priority",
help="限制 priority例如 P0 / P1 / P2 / P3。",
)
parser.add_argument(
"--include-forbidden",
action="store_true",
help="包含 forbidden guardrail lane。",
)
args = parser.parse_args()
payload = build_pixelrag_application_portfolio(
area=args.area,
priority=args.priority,
include_forbidden=args.include_forbidden,
)
print(json.dumps(payload, ensure_ascii=False, indent=2, sort_keys=True))
return 0 if payload.get("success") else 1
if __name__ == "__main__":
raise SystemExit(main())