MCPcopy Index your code
hub / github.com/tiann/hapi / createOpencodeBackend

Function createOpencodeBackend

cli/src/opencode/utils/opencodeBackend.ts:15–26  ·  view source on GitHub ↗
(opts: {
    cwd?: string;
})

Source from the content-addressed store, hash-verified

13}
14
15export function createOpencodeBackend(opts: {
16 cwd?: string;
17}): AcpSdkBackend {
18 const env = buildOpencodeEnv();
19 const args = ['acp', '--cwd', opts.cwd ?? getInvokedCwd()];
20
21 return new AcpSdkBackend({
22 command: 'opencode',
23 args,
24 env: filterEnv(env)
25 });
26}

Callers 1

runMainLoopMethod · 0.90

Calls 3

buildOpencodeEnvFunction · 0.90
getInvokedCwdFunction · 0.90
filterEnvFunction · 0.70

Tested by

no test coverage detected