INNER CODE UNIT · Python
load_input
uvwt/agentdock · core-skills/skill-authoring/run.py:118
def load_input() -> dict[str, object]:
raw = sys.stdin.read().strip()
if not raw:
return {}
try:
value = json.loads(raw)
except json.JSONDecodeError as exc:
fail("INVALID_INPUT", "Input is not valid JSON", {"reason": str(exc)})
if not isinstance(value, dict):
fail("INVALID_INPUT", "Input must be a JSON object")
return value
def text_files(source: Path) -> list[Path]:
files: list[Path] = []
for path in sorted(source.rglob("*")):
if path.is_symlink() or not path.is_file():
continue