mirror of
https://github.com/morluto/rea.git
synced 2026-10-29 10:55:57 +00:00
fix(setup): register OpenCode V2 configurations in mcp.servers
OpenCode V2 reads native server entries from mcp.servers, and a native entry takes precedence over a V1 mcp.<name> entry. After OpenCode migrated a configuration, setup wrote an ignored V1 entry, status reported REA as missing, and uninstall left the native entry in place. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
4a6c17ce83
commit
69d8afefc1
8 files changed
+386
-93
No files matched your search
@@ -22,7 +22,13 @@ describe.each([
|
||||
|
||||
expect(
|
||||
parseClientConfiguration(`${bom}${JSON.stringify(document)}`, format),
|
||||
).toEqual({ document, servers: document[serversKey], serversKey });
|
||||
).toEqual({
|
||||
document,
|
||||
servers: document[serversKey],
|
||||
serversPath: [serversKey],
|
||||
dialect: format,
|
||||
legacyServers: {},
|
||||
});
|
||||
});
|
||||
|
||||
it.each(["", "\uFEFF"])(
|
||||
@@ -70,12 +76,16 @@ describe.each([
|
||||
else servers.rea = registration;
|
||||
const document = { ...parsed.document, [serversKey]: servers };
|
||||
|
||||
text = serializeClientConfiguration(document, format, text, "rea");
|
||||
text = serializeClientConfiguration(document, format, text, [
|
||||
[serversKey, "rea"],
|
||||
]);
|
||||
|
||||
expect(parseClientConfiguration(text, format)).toEqual({
|
||||
document,
|
||||
servers,
|
||||
serversKey,
|
||||
serversPath: [serversKey],
|
||||
dialect: format,
|
||||
legacyServers: {},
|
||||
});
|
||||
expect(Buffer.from(text.slice(0, prefix.length))).toEqual(
|
||||
Buffer.from(prefix),
|
||||
|
||||
Reference in new issue
Block a user