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

Class SubmoduleRef

verifier/AgentVerifier/WorkflowToLean.py:30–53  ·  view source on GitHub ↗

A submodule invoked via call / parallel / gather. Records only enough about the submodule to produce human-readable diagnostics; the verifier does not inspect its body.

Source from the content-addressed store, hash-verified

28
29@dataclass
30class SubmoduleRef:
31 """A submodule invoked via call / parallel / gather.
32
33 Records only enough about the submodule to produce human-readable
34 diagnostics; the verifier does not inspect its body.
35 """
36 name: str
37 kind: str # "parallel" | "call" | "gather"
38 output_var: Optional[str] = None
39 input_var: Optional[str] = None
40
41 def to_dict(self) -> dict:
42 d: dict = {"name": self.name, "kind": self.kind}
43 if self.output_var is not None: d["output_var"] = self.output_var
44 if self.input_var is not None: d["input_var"] = self.input_var
45 return d
46
47 @staticmethod
48 def from_dict(d: dict) -> "SubmoduleRef":
49 return SubmoduleRef(
50 name=d["name"], kind=d.get("kind", "call"),
51 output_var=d.get("output_var"),
52 input_var=d.get("input_var"),
53 )
54
55
56# ---------- TypedVar ----------

Callers 3

from_dictMethod · 0.85
parse_body_stepsFunction · 0.85
parse_task_jsonFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected