mirror of
https://github.com/morluto/rea.git
synced 2026-12-01 02:49:12 +00:00
fix(setup): read Devin project MCP configuration (#15101)
* fix(setup): read Devin project MCP configuration Devin loads .devin/mcp_config.json and .devin/mcp_config.local.json from the working directory up to the nearest .git or .jj, above the user file. A local file outranks every shared file, and a nested directory outranks its ancestors. REA only read the user file, so doctor judged it while Devin ran a project entry, and project uninstall skipped Devin. Return Devin's project candidates in that order, evaluate them with whole-definition replacement, and include Devin in project uninstall. Setup still writes only the user file. Fixes #15041 * fix(setup): apply Devin precedence by directory --------- Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
This commit is contained in:
1 parent
3474d40489
commit
7e71400a7c
5 files changed
+316
-4
No files matched your search
@@ -640,7 +640,8 @@ const supportsProjectConfigurationWalk = (
|
||||
client.format === "pi" ||
|
||||
client.format === "mastracode" ||
|
||||
client.name === "antigravity" ||
|
||||
client.format === "amp";
|
||||
client.format === "amp" ||
|
||||
client.name === "devin";
|
||||
|
||||
/** Read actual user layers, with a project view only when a directory is expressly supplied. */
|
||||
export const readEffectiveClientRegistrationConfiguration = async (
|
||||
@@ -696,10 +697,11 @@ export const readEffectiveClientRegistrationConfiguration = async (
|
||||
>();
|
||||
const userOverrides = new Set(client.openCodeUserOverridePaths);
|
||||
const layers = paths.value.filter(
|
||||
// Mastra Code also reuses a user file at its project precedence when
|
||||
// the current directory is home or a project path resolves to that file.
|
||||
// Mastra Code and Devin also load a user file at project precedence
|
||||
// when a project path resolves to the same file.
|
||||
({ userPath }) =>
|
||||
userPath === undefined ||
|
||||
client.name === "devin" ||
|
||||
client.format === "mastracode" ||
|
||||
userOverrides.has(userPath),
|
||||
);
|
||||
@@ -793,7 +795,12 @@ export const readEffectiveClientRegistrationConfiguration = async (
|
||||
// Preserve this occurrence in native order while retaining the user
|
||||
// file's parsed snapshot and ownership.
|
||||
const source = userByPath.get(userPath);
|
||||
if (source !== undefined) sources.push(source);
|
||||
if (source?.sourcePath !== undefined)
|
||||
sources.push(
|
||||
client.name === "devin"
|
||||
? { ...source, sourcePath: path, scope: "project" }
|
||||
: source,
|
||||
);
|
||||
continue;
|
||||
}
|
||||
let source = projectSources.get(path);
|
||||
|
||||
Reference in new issue
Block a user