diff --git a/packages/opencode/src/config/config.ts b/packages/opencode/src/config/config.ts index ad6164246b..329d2d1298 100644 --- a/packages/opencode/src/config/config.ts +++ b/packages/opencode/src/config/config.ts @@ -81,27 +81,6 @@ export namespace Config { log.info("config dir is not writable, skipping dependency install", { dir }) return } - const pkg = path.join(dir, "package.json") - const targetVersion = Installation.isLocal() ? "*" : Installation.VERSION - - const json = await Filesystem.readJson<{ dependencies?: Record }>(pkg).catch(() => ({ - dependencies: {}, - })) - json.dependencies = { - ...json.dependencies, - "@opencode-ai/plugin": targetVersion, - } - await Filesystem.writeJson(pkg, json) - - const gitignore = path.join(dir, ".gitignore") - if (!(await Filesystem.exists(gitignore))) - await Filesystem.write( - gitignore, - ["node_modules", "plans", "package.json", "bun.lock", ".gitignore", "package-lock.json"].join("\n"), - ) - - // Install any additional dependencies defined in the package.json - // This allows local plugins and custom tools to use external packages await Npm.install(dir) } @@ -1259,12 +1238,7 @@ export namespace Config { } } - deps.push( - iife(async () => { - const shouldInstall = await needsInstall(dir) - if (shouldInstall) await installDependencies(dir) - }), - ) + deps.push(installDependencies(dir)) result.command = mergeDeep(result.command ?? {}, yield* Effect.promise(() => loadCommand(dir))) result.agent = mergeDeep(result.agent, yield* Effect.promise(() => loadAgent(dir))) diff --git a/packages/opencode/src/mcp/index.ts b/packages/opencode/src/mcp/index.ts index 4ed5876d59..184e84a2a0 100644 --- a/packages/opencode/src/mcp/index.ts +++ b/packages/opencode/src/mcp/index.ts @@ -205,7 +205,6 @@ export namespace MCP { status: Status defs?: MCPToolDef[] } - } // --- Effect Service ---