MCPcopy Create free account
hub / github.com/Dizzy-K/AutoPT / build_workflow_definition

Function build_workflow_definition

workflow/builder.py:63–84  ·  view source on GitHub ↗

Construct a WorkflowDefinition with explicit edge declarations.

(
    *,
    context: WorkflowContext,
    prompts: PromptBundle,
    tool_specs: list[ToolSpec],
    metadata: dict[str, Any] | None = None,
)

Source from the content-addressed store, hash-verified

61
62
63def build_workflow_definition(
64 *,
65 context: WorkflowContext,
66 prompts: PromptBundle,
67 tool_specs: list[ToolSpec],
68 metadata: dict[str, Any] | None = None,
69) -> WorkflowDefinition:
70 """Construct a WorkflowDefinition with explicit edge declarations."""
71 return WorkflowDefinition(
72 context=context,
73 prompts=prompts,
74 tool_specs=tool_specs,
75 edges={
76 "START": ["Scan"],
77 "Scan": ["Vuln_select"],
78 "Vuln_select": ["Inquire"],
79 "Inquire": ["Exploit"],
80 "Exploit": ["Check"],
81 "Check": ["Exploit", "Vuln_select", "__end__"],
82 },
83 metadata=metadata or {},
84 )

Callers 1

build_task_requestFunction · 0.90

Calls 1

WorkflowDefinitionClass · 0.85

Tested by

no test coverage detected