Merge pull request #864 from morluto/fix/opencode-v2-servers

fix(setup): register OpenCode V2 configurations in mcp.servers
This commit is contained in:
Kaoru0822
2026-10-06 22:07:29 -07:00
committed by GitHub
8 changed files with 386 additions and 93 deletions
@@ -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),