GetMCPCLIPathSetup returns a shell command that adds the MCP CLI bin directory to PATH inside the AWF container. This ensures CLI-mounted MCP servers are accessible as shell commands even though sudo's secure_path may strip the core.addPath() additions from $GITHUB_PATH. Returns an empty string if
(data *WorkflowData)
| 291 | // Returns an empty string if no MCP CLIs are configured, so callers can safely |
| 292 | // chain it with && without introducing empty commands. |
| 293 | func GetMCPCLIPathSetup(data *WorkflowData) string { |
| 294 | if getMCPCLIServerNames(data) == nil { |
| 295 | return "" |
| 296 | } |
| 297 | return `export PATH="${RUNNER_TEMP}/gh-aw/mcp-cli/bin:$PATH"` |
| 298 | } |
| 299 | |
| 300 | // buildMCPCLIPromptSection returns a PromptSection describing the CLI tools available |
| 301 | // to the agent, or nil if there are no servers to mount. |
no test coverage detected