MCPcopy Create free account
hub / github.com/ScaleML/AgentSPEX / get_step_depth

Function get_step_depth

src/harness/utils/step_utils.py:86–104  ·  view source on GitHub ↗
(step_id: Union[int, str])

Source from the content-addressed store, hash-verified

84
85
86def get_step_depth(step_id: Union[int, str]) -> int:
87 if not step_id:
88 return 0
89
90 parts = str(step_id).split(".")
91 depth = 0
92 skip_next = False
93
94 for part in parts:
95 if skip_next:
96 skip_next = False
97 continue
98
99 if part == "tool":
100 skip_next = True
101
102 depth += 1
103
104 return max(0, depth - 1)

Callers 3

log_submodule_startFunction · 0.85
execute_workflow_stepMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected