@cryptotaxi247 / CoPilot / commits / 669c92a3

feat: enhance artifact determination for various Linux distributions and add logging for action invocation

taylorwalton committed Dec 9, 2025 at 08:51 UTC 669c92a37bf5ad302127ecdcaee98975bae3f2e1
1 file changed +3
backend/app/integrations/copilot_action/routes/copilot_action.py
+3
@@ -85,6 +85,8 @@ def determine_artifact_name(agent_os: str) -> str:
85 return "Windows.Execute.RemotePowerShellScript"
86 elif "Linux" in agent_os:
87 return "Linux.Execute.RemoteBashScript"
88 + elif "Ubuntu" in agent_os or "Debian" in agent_os or "CentOS" in agent_os or "Red Hat" in agent_os:
89 + return "Linux.Execute.RemoteBashScript"
90 else:
91 raise HTTPException(
92 status_code=400,
@@ -385,6 +387,7 @@ async def invoke_action_on_agent(
387 Returns:
388 CollectArtifactResponse: Response from the artifact collection
389 """
390 + logger.info(f"Invoking action '{copilot_action_name}' on agent {agent.hostname} with OS {agent.os}")
391 try:
392 # Determine the appropriate artifact based on OS
393 artifact_name = determine_artifact_name(agent.os)