23 lines
698 B
Python
23 lines
698 B
Python
#!/usr/bin/env python
|
|
"""Skill-local launcher for the repository OpenRouter Seedance tool."""
|
|
|
|
from __future__ import annotations
|
|
|
|
import runpy
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
|
|
def find_repo_root(start: Path) -> Path:
|
|
for path in [start, *start.parents]:
|
|
if (path / "AGENTS.md").is_file() and (path / "tools" / "openrouter_seedance.py").is_file():
|
|
return path
|
|
raise SystemExit("Could not find repository root with tools/openrouter_seedance.py.")
|
|
|
|
|
|
if __name__ == "__main__":
|
|
root = find_repo_root(Path(__file__).resolve())
|
|
script = root / "tools" / "openrouter_seedance.py"
|
|
sys.argv[0] = str(script)
|
|
runpy.run_path(str(script), run_name="__main__")
|