fix(update): share parsed client activation with maintenance
This commit is contained in:
@@ -126,6 +126,41 @@ describe("OMP integration maintenance", () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe("maintenance activation and layered configuration", () => {
|
||||
it("leaves a natively disabled ZCode registration outside maintenance", async () => {
|
||||
const configPath = await writeClient(
|
||||
"zcode",
|
||||
JSON.stringify({
|
||||
mcp: {
|
||||
servers: {
|
||||
rea: { command: entryPoint, args: ["mcp"], enable: false },
|
||||
},
|
||||
},
|
||||
}),
|
||||
);
|
||||
const original = await readFile(configPath, "utf8");
|
||||
await expect(
|
||||
existingMaintenanceScope(home, entryPoint, process.env),
|
||||
).resolves.toMatchObject({ clients: [] });
|
||||
expect(await readFile(configPath, "utf8")).toBe(original);
|
||||
});
|
||||
|
||||
it("selects an enabled registration inherited through layered OpenCode files", async () => {
|
||||
const directory = join(home, ".config", "opencode");
|
||||
await mkdir(directory, { recursive: true });
|
||||
await writeFile(
|
||||
join(directory, "opencode.json"),
|
||||
JSON.stringify({
|
||||
mcp: { rea: { type: "local", command: [entryPoint, "mcp"] } },
|
||||
}),
|
||||
);
|
||||
await writeClient("opencode", JSON.stringify({ theme: "user-selected" }));
|
||||
await expect(
|
||||
existingMaintenanceScope(home, entryPoint, process.env),
|
||||
).resolves.toMatchObject({ clients: ["opencode"] });
|
||||
});
|
||||
});
|
||||
|
||||
describe("existing REA integration maintenance", () => {
|
||||
it("selects owned registrations while preserving unconfigured, foreign, and disabled choices", async () => {
|
||||
await writeClient("codex", staleCodex);
|
||||
|
||||
Reference in New Issue
Block a user