MCPcopy
hub / github.com/openai/codex-plugin-cc / withDirectAppServer

Function withDirectAppServer

plugins/codex/scripts/lib/codex.mjs:644–651  ·  view source on GitHub ↗
(cwd, fn)

Source from the content-addressed store, hash-verified

642}
643
644async function withDirectAppServer(cwd, fn) {
645 const client = await CodexAppServerClient.connect(cwd, { disableBroker: true });
646 try {
647 return await fn(client);
648 } finally {
649 await client.close();
650 }
651}
652
653function resolveCodexHome() {
654 return path.resolve(process.env.CODEX_HOME || path.join(os.homedir(), ".codex"));

Callers 1

Calls 2

connectMethod · 0.80
closeMethod · 0.45

Tested by

no test coverage detected