Method Diagnose
Diagnose(Func<string, bool>, Func<string, bool>)
The same faults as Validate(Func<string, bool>, Func<string, bool>), each located: the step and the field it is about, and whether the workflow is written wrong (Invalid), not finished (Incomplete) or names an agent or a tool the host lacks, or reads a step that cannot have run before the read (Unreachable). An editor shows each fault on its step; a host can keep an unfinished workflow as a draft while refusing to run it.
public IReadOnlyList<WorkflowFault> Diagnose(Func<string, bool> agentExists = null, Func<string, bool> toolExists = null)
Parameters
agentExistsFunc<string, bool>The host's answer to "is there an agent with this name?"; null skips the check.
toolExistsFunc<string, bool>The host's answer to "is there a tool with this name?"; null skips the check.
Returns
- IReadOnlyList<WorkflowFault>
The faults, in document order; empty when the workflow runs as written.
Diagnose(Func<string, bool>, Func<string, bool>, Func<string, bool>)
The faults of Diagnose(Func<string, bool>, Func<string, bool>), plus every tool step inside a parallel branch whose tool the host holds for a person's approval (ApprovalInParallel): a parallel branch cannot stop, so such a workflow is refused before it runs rather than failing at the call.
public IReadOnlyList<WorkflowFault> Diagnose(Func<string, bool> agentExists, Func<string, bool> toolExists, Func<string, bool> toolNeedsApproval)
Parameters
agentExistsFunc<string, bool>The host's answer to "is there an agent with this name?"; null skips the check.
toolExistsFunc<string, bool>The host's answer to "is there a tool with this name?"; null skips the check.
toolNeedsApprovalFunc<string, bool>The host's answer to "does a call to this tool wait for a person's approval?"; null skips the check.
Returns
- IReadOnlyList<WorkflowFault>
The faults, in document order; empty when the workflow runs as written.
Diagnose(Func<string, bool>, Func<string, bool>, Func<string, bool>, Func<string, string>)
The faults of Diagnose(Func<string, bool>, Func<string, bool>, Func<string, bool>), plus every tool step whose arguments do not meet the tool's own input schema (ArgumentMismatch): a required argument missing, an argument the tool does not take, a fixed value of the wrong type. Templated values are checked when they run.
public IReadOnlyList<WorkflowFault> Diagnose(Func<string, bool> agentExists, Func<string, bool> toolExists, Func<string, bool> toolNeedsApproval, Func<string, string> toolInputSchema)
Parameters
agentExistsFunc<string, bool>The host's answer to "is there an agent with this name?"; null skips the check.
toolExistsFunc<string, bool>The host's answer to "is there a tool with this name?"; null skips the check.
toolNeedsApprovalFunc<string, bool>The host's answer to "does a call to this tool wait for a person's approval?"; null skips the check.
toolInputSchemaFunc<string, string>The host's answer to "what JSON Schema does this tool take?"; null skips the check.
Returns
- IReadOnlyList<WorkflowFault>
The faults, in document order; empty when the workflow runs as written.
Diagnose(Func<string, bool>, Func<string, bool>, Func<string, bool>, Func<string, string>, Func<string, int?, WorkflowDefinition>)
The faults of Diagnose(Func<string, bool>, Func<string, bool>, Func<string, bool>, Func<string, string>),
plus every workflow step whose workflow the host does not provide
(MissingWorkflow), that makes workflows run each other in a
circle or nest too deep (WorkflowCycle), or whose workflow can
stop for a person where nothing can stop (inside a parallel branch or items running at once).
public IReadOnlyList<WorkflowFault> Diagnose(Func<string, bool> agentExists, Func<string, bool> toolExists, Func<string, bool> toolNeedsApproval, Func<string, string> toolInputSchema, Func<string, int?, WorkflowDefinition> resolveWorkflow)
Parameters
agentExistsFunc<string, bool>The host's answer to "is there an agent with this name?"; null skips the check.
toolExistsFunc<string, bool>The host's answer to "is there a tool with this name?"; null skips the check.
toolNeedsApprovalFunc<string, bool>The host's answer to "does a call to this tool wait for a person's approval?"; null skips the check.
toolInputSchemaFunc<string, string>The host's answer to "what JSON Schema does this tool take?"; null skips the check.
resolveWorkflowFunc<string, int?, WorkflowDefinition>The host's published workflows: a name and a revision (null for the current one) to the definition; null skips the checks.
Returns
- IReadOnlyList<WorkflowFault>
The faults, in document order; empty when the workflow runs as written.