fix(setup): align activation schemas and approval disclosure

This commit is contained in:
REA Maintainers 2026-10-13 21:32:35 +08:00
parent 3370bab50b
commit 1f1bb95d53
3 changed files with 11 additions and 2 deletions

View File

@ -26,9 +26,17 @@ const codexRegistrationSchema = registrationSchema.extend({
disabled_tools: z.array(z.string()).optional(),
});
const zcodeRegistrationSchema = registrationSchema.extend({
enable: z.boolean().optional(),
});
/** Client-specific parsing is shared by retention and registration diagnostics. */
export const registrationSchemaFor = (dialect: ClientRegistrationDialect) =>
dialect === "toml" ? codexRegistrationSchema : registrationSchema;
dialect === "toml"
? codexRegistrationSchema
: dialect === "zcode"
? zcodeRegistrationSchema
: registrationSchema;
/** Whether a retained field satisfies the selected client's known contract. */
export const registrationFieldAccepted = (

View File

@ -413,7 +413,7 @@ export const describeDshRegistrationRetention = (
.filter((key) => Object.hasOwn(entry, key))
.sort((left, right) => left.localeCompare(right))
.map((key) => `${key} with ${JSON.stringify(entry[key])}`);
return `Other fields on the existing Cordis server are kept. Setup replaces ${replaced.join(", ")}. Environment overrides are merged.`;
return `Other fields on the existing Cordis server are kept, except the row-level disabled flag is removed to activate the registration. Setup replaces ${replaced.join(", ")}. Environment overrides are merged.`;
};
export const dshClientRegistrationEntry = (

View File

@ -46,6 +46,7 @@ it("previews and creates a current recovery backup while preserving the first ba
expect(await inspectClientConfiguration(client, {}, ["rea", "mcp"])).toEqual({
status: "update",
backupPath: recoveryPath,
dialect: "json",
});
expect(