fix(setup): align activation schemas and approval disclosure
This commit is contained in:
@@ -26,9 +26,17 @@ const codexRegistrationSchema = registrationSchema.extend({
|
|||||||
disabled_tools: z.array(z.string()).optional(),
|
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. */
|
/** Client-specific parsing is shared by retention and registration diagnostics. */
|
||||||
export const registrationSchemaFor = (dialect: ClientRegistrationDialect) =>
|
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. */
|
/** Whether a retained field satisfies the selected client's known contract. */
|
||||||
export const registrationFieldAccepted = (
|
export const registrationFieldAccepted = (
|
||||||
|
|||||||
@@ -413,7 +413,7 @@ export const describeDshRegistrationRetention = (
|
|||||||
.filter((key) => Object.hasOwn(entry, key))
|
.filter((key) => Object.hasOwn(entry, key))
|
||||||
.sort((left, right) => left.localeCompare(right))
|
.sort((left, right) => left.localeCompare(right))
|
||||||
.map((key) => `${key} with ${JSON.stringify(entry[key])}`);
|
.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 = (
|
export const dshClientRegistrationEntry = (
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ it("previews and creates a current recovery backup while preserving the first ba
|
|||||||
expect(await inspectClientConfiguration(client, {}, ["rea", "mcp"])).toEqual({
|
expect(await inspectClientConfiguration(client, {}, ["rea", "mcp"])).toEqual({
|
||||||
status: "update",
|
status: "update",
|
||||||
backupPath: recoveryPath,
|
backupPath: recoveryPath,
|
||||||
|
dialect: "json",
|
||||||
});
|
});
|
||||||
|
|
||||||
expect(
|
expect(
|
||||||
|
|||||||
Reference in New Issue
Block a user