Table of Contents

Class WorkflowConflictDetector

Namespace
JD.AI.Workflows.Consensus
Assembly
JD.AI.Workflows.dll

Detects and describes conflicts when multiple users edit the same workflow concurrently. Compares step-level changes between a common ancestor and two divergent versions, producing a ConflictReport with auto-resolved and manual-resolution items.

public static class WorkflowConflictDetector
Inheritance
WorkflowConflictDetector
Inherited Members

Methods

ComputeHash(AgentWorkflowDefinition)

Computes a content hash for a workflow definition, useful for quick equality checks and change detection.

public static string ComputeHash(AgentWorkflowDefinition definition)

Parameters

definition AgentWorkflowDefinition

Returns

string

Detect(AgentWorkflowDefinition, AgentWorkflowDefinition, AgentWorkflowDefinition)

Detects conflicts between two versions of a workflow that share a common ancestor. Non-overlapping changes are auto-merged; overlapping changes require manual resolution.

public static ConflictReport Detect(AgentWorkflowDefinition ancestor, AgentWorkflowDefinition ours, AgentWorkflowDefinition theirs)

Parameters

ancestor AgentWorkflowDefinition
ours AgentWorkflowDefinition
theirs AgentWorkflowDefinition

Returns

ConflictReport

TryMerge(AgentWorkflowDefinition, AgentWorkflowDefinition, AgentWorkflowDefinition)

Attempts a three-way merge of non-conflicting changes. Returns null if there are unresolvable conflicts.

public static AgentWorkflowDefinition? TryMerge(AgentWorkflowDefinition ancestor, AgentWorkflowDefinition ours, AgentWorkflowDefinition theirs)

Parameters

ancestor AgentWorkflowDefinition
ours AgentWorkflowDefinition
theirs AgentWorkflowDefinition

Returns

AgentWorkflowDefinition