From 2ae8e70a2859a62af2a3060beb57f9464ee5cd47 Mon Sep 17 00:00:00 2001 From: Juan Antonio Osorio Date: Mon, 17 Nov 2025 09:29:17 -0600 Subject: [PATCH] Remove unimplemented StepTypeConditional Removes the StepTypeConditional constant and all related code that was added as a placeholder but never designed or implemented. This constant caused confusion as it suggested a feature that doesn't exist. The `condition` field on workflow steps (which enables conditional execution via template evaluation) remains unchanged and fully functional. This change only removes the unused step type constant. Changes: - Remove StepTypeConditional constant from composer package - Remove conditional case from workflow execution switch - Remove conditional validation case - Remove conditional parsing from workflow converter - Update step type documentation comment All tests pass. The Kubernetes CRD already has the correct enum (tool;elicitation) without the conditional type. --- pkg/vmcp/composer/composer.go | 5 +---- pkg/vmcp/composer/workflow_engine.go | 10 ---------- pkg/vmcp/server/workflow_converter.go | 2 -- 3 files changed, 1 insertion(+), 16 deletions(-) diff --git a/pkg/vmcp/composer/composer.go b/pkg/vmcp/composer/composer.go index 031159b55..b7bacee1c 100644 --- a/pkg/vmcp/composer/composer.go +++ b/pkg/vmcp/composer/composer.go @@ -68,7 +68,7 @@ type WorkflowStep struct { // ID uniquely identifies this step within the workflow. ID string - // Type is the step type: "tool", "elicitation", "conditional" + // Type is the step type: "tool", "elicitation" Type StepType // Tool is the tool to call (for tool steps). @@ -114,9 +114,6 @@ const ( // StepTypeElicitation requests user input via MCP elicitation protocol. StepTypeElicitation StepType = "elicitation" - - // StepTypeConditional executes based on a condition (future). - StepTypeConditional StepType = "conditional" ) // ErrorHandler defines how to handle step failures. diff --git a/pkg/vmcp/composer/workflow_engine.go b/pkg/vmcp/composer/workflow_engine.go index 714c91e76..d101e2bfe 100644 --- a/pkg/vmcp/composer/workflow_engine.go +++ b/pkg/vmcp/composer/workflow_engine.go @@ -269,11 +269,6 @@ func (e *workflowEngine) executeStep( return e.executeToolStep(stepCtx, step, workflowCtx) case StepTypeElicitation: return e.executeElicitationStep(stepCtx, step, workflowCtx) - case StepTypeConditional: - // Conditional steps are not implemented in Phase 2 - err := fmt.Errorf("conditional steps are not yet supported") - workflowCtx.RecordStepFailure(step.ID, err) - return err default: err := fmt.Errorf("unsupported step type: %s", step.Type) workflowCtx.RecordStepFailure(step.ID, err) @@ -776,11 +771,6 @@ func (*workflowEngine) validateStep(step *WorkflowStep, validStepIDs map[string] fmt.Sprintf("elicitation message is required for step %s", step.ID), nil) } - case StepTypeConditional: - // Future: validate conditional step - return NewValidationError("step.type", - fmt.Sprintf("conditional steps are not yet supported (step %s)", step.ID), - nil) default: return NewValidationError("step.type", fmt.Sprintf("invalid step type %q for step %s", step.Type, step.ID), diff --git a/pkg/vmcp/server/workflow_converter.go b/pkg/vmcp/server/workflow_converter.go index f8d0fb5d9..9628c4b8b 100644 --- a/pkg/vmcp/server/workflow_converter.go +++ b/pkg/vmcp/server/workflow_converter.go @@ -170,8 +170,6 @@ func parseStepType(cs *config.WorkflowStepConfig) (composer.StepType, error) { } case "elicitation": stepType = composer.StepTypeElicitation - case "conditional": - stepType = composer.StepTypeConditional default: return "", fmt.Errorf("step %s: invalid step type %s", cs.ID, cs.Type) }