# rye:signed:2026-04-23T08:15:57Z:f8bbbda86453dee6aa7473f1643f8c782b4a000f12f1c457d482ba5b9ef30b69:HlUPA7lFPBa-M_Fmey9KS0B1lM2rxINEeP9vK1A_3hfLTZqmjPTblu7OoTwed5bMTE9iD76H5zNXJCz2DRzUBQ:6ea18199041a1ea8
# rye:unsigned
version: "1.0.0"
tool_type: runtime
executor_id: rye/core/primitives/execute
category: rye/core/runtimes/state-graph
description: "State graph runtime — walks graph YAML tools, dispatching RYE for each node"
execution_owner: callee
native_async: true
native_resume: true

env_config:
  interpreter:
    type: local_binary
    binary: python
    candidates: [python3]
    search_paths: [".venv/bin", ".venv/Scripts"]
    var: RYE_PYTHON
    fallback: python3
  env:
    PYTHONUNBUFFERED: "1"
    PROJECT_VENV_PYTHON: "${RYE_PYTHON}"

anchor:
  enabled: true
  mode: always
  root: tool_dir
  lib: .
  env_paths:
    PYTHONPATH:
      prepend: ["{anchor_path}", "{runtime_lib}", "{runtime_lib}/../python/lib"]

verify_deps:
  enabled: true
  scope: anchor
  recursive: true
  extensions: [".py", ".yaml", ".yml", ".json"]
  exclude_dirs: ["__pycache__", ".venv", "node_modules", ".git", "config"]

config_resolve:
  path: "execution/execution.yaml"
  mode: "deep_merge"

execution_params:
  - max_steps
  - max_concurrency

config:
  command: "${RYE_PYTHON}"
  args:
    - "-c"
    - |
      import sys,json,os.path
      from walker import _load_graph_yaml, run_sync
      graph=_load_graph_yaml(sys.argv[1])
      graph["_file_path"]=sys.argv[1]
      graph["_item_id"]=graph.get("category","")+"/"+os.path.splitext(os.path.basename(sys.argv[1]))[0]
      r=run_sync(graph,json.loads(sys.argv[2]),sys.argv[3])
      print(json.dumps(r,default=str))
    - "{tool_path}"
    - "{params_json}"
    - "{project_path}"
  timeout: 600
