Files
2026-09-04 14:58:42 +08:00

16 lines
580 B
Python

"""Restore the OpenCode launcher used by this project's verified runs."""
try:
from benchflow.agents.registry import AGENT_INSTALLERS
command = AGENT_INSTALLERS.get("opencode")
if command and "js-agents/bin/opencode \"$@\"' > /opt/benchflow/bin/opencode" in command:
AGENT_INSTALLERS["opencode"] = (
command
+ " && printf '%s\\n' '#!/bin/sh' "
"'exec /opt/benchflow/js-agents/bin/opencode \"$@\"' "
"> /opt/benchflow/bin/opencode && chmod +x /opt/benchflow/bin/opencode"
)
except ImportError:
pass