MCPcopy Create free account
hub / github.com/MaxBittker/runebench / install

Method install

agents/opencode_adapter.py:111–127  ·  view source on GitHub ↗
(self, environment: BaseEnvironment)

Source from the content-addressed store, hash-verified

109
110 @property
111 def _install_agent_template_path(self) -> Path:
112 return Path(__file__).parent / "install-opencode.sh.j2"
113
114 @staticmethod
115 def name() -> str:
116 return "opencode-adapter"
117
118 async def install(self, environment: BaseEnvironment) -> None:
119 # OpenCode is pre-installed in the Docker image via NVM.
120 # Verify it's accessible; if not, install it.
121 result = await environment.exec(
122 command='export NVM_DIR="$HOME/.nvm"; [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"; command -v opencode',
123 )
124 if result.return_code != 0:
125 await self.exec_as_agent(
126 environment,
127 command=(
128 "curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.2/install.sh | bash && "
129 'export NVM_DIR="$HOME/.nvm" && '
130 '. "$NVM_DIR/nvm.sh" && '

Callers

nothing calls this directly

Calls 1

exec_as_agentMethod · 0.80

Tested by

no test coverage detected