requiresNodeForEngineHarness returns true when workflow runtime setup must ensure Node.js for engine.harness execution based on current engine wrapper support.
(workflowData *WorkflowData)
| 99 | // requiresNodeForEngineHarness returns true when workflow runtime setup must ensure Node.js |
| 100 | // for engine.harness execution based on current engine wrapper support. |
| 101 | func requiresNodeForEngineHarness(workflowData *WorkflowData) bool { |
| 102 | if workflowData == nil || workflowData.EngineConfig == nil || workflowData.EngineConfig.HarnessScript == "" { |
| 103 | return false |
| 104 | } |
| 105 | |
| 106 | engineID := workflowData.EngineConfig.ID |
| 107 | if engineID == "" { |
| 108 | engineID = workflowData.AI |
| 109 | } |
| 110 | if engineID == "" { |
| 111 | engineID = string(constants.DefaultEngine) |
| 112 | } |
| 113 | |
| 114 | // Both Copilot and Claude consume engine.harness in execution command generation. |
| 115 | // Claude is excluded here because Node.js is already provisioned as part of its |
| 116 | // installation steps (GenerateNpmInstallSteps with includeNodeSetup=true), so no |
| 117 | // additional Node runtime requirement is needed for custom harness execution. |
| 118 | return strings.EqualFold(engineID, string(constants.CopilotEngine)) |
| 119 | } |
| 120 | |
| 121 | // detectFromCustomSteps scans custom steps YAML for runtime commands |
| 122 | func detectFromCustomSteps(customSteps string, requirements map[string]*RuntimeRequirement) { |
no outgoing calls
no test coverage detected