diff --git a/Dockerfile b/Dockerfile index 13f366c..8a5fcba 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,7 +22,6 @@ WORKDIR /app ENV NODE_ENV=production ENV HOST=0.0.0.0 ENV PORT=8787 -ENV PATH=/app/node_modules/.bin:/app/.opencode/node_modules/.bin:$PATH COPY --from=deps /app/node_modules ./node_modules COPY --from=deps /app/.opencode/node_modules ./.opencode/node_modules diff --git a/package.json b/package.json index abdb2b6..fdc5fc1 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,6 @@ "cors": "^2.8.5", "dotenv": "^17.2.3", "express": "^4.21.2", - "opencode-ai": "^1.14.30", "pino": "^9.7.0", "pino-pretty": "^13.1.2", "zod": "^3.25.76" diff --git a/src/runtime/opencode.ts b/src/runtime/opencode.ts index 694fb59..f83bdd6 100644 --- a/src/runtime/opencode.ts +++ b/src/runtime/opencode.ts @@ -99,8 +99,6 @@ export class OpencodeRuntimeAdapter { } private async bootstrapClient(): Promise { - ensureLocalBinPath(); - if (config.OPENCODE_BASE_URL) { logger.info( { baseUrl: config.OPENCODE_BASE_URL }, @@ -147,23 +145,6 @@ export class OpencodeRuntimeAdapter { export const opencodeRuntime = new OpencodeRuntimeAdapter(); -function ensureLocalBinPath(): void { - const cwd = process.cwd(); - const delimiter = process.platform === "win32" ? ";" : ":"; - const candidates = [ - `${cwd}/node_modules/.bin`, - `${cwd}/.opencode/node_modules/.bin`, - ]; - const currentPath = process.env.PATH ?? ""; - const segments = currentPath.split(delimiter).filter(Boolean); - const next = [ - ...candidates.filter((candidate) => !segments.includes(candidate)), - ...segments, - ]; - - process.env.PATH = next.join(delimiter); -} - function requireData(data: T | undefined, operation: string): T { if (data === undefined) { throw new Error(`${operation} returned no data`);