MCPcopy Create free account
hub / github.com/github/gh-aw / requiresNodeForEngineHarness

Function requiresNodeForEngineHarness

pkg/workflow/runtime_detection.go:101–119  ·  view source on GitHub ↗

requiresNodeForEngineHarness returns true when workflow runtime setup must ensure Node.js for engine.harness execution based on current engine wrapper support.

(workflowData *WorkflowData)

Source from the content-addressed store, hash-verified

99// requiresNodeForEngineHarness returns true when workflow runtime setup must ensure Node.js
100// for engine.harness execution based on current engine wrapper support.
101func 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
122func detectFromCustomSteps(customSteps string, requirements map[string]*RuntimeRequirement) {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected