Contracts 1.1.0: optional requires on Hub releases

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-04 15:45:40 +02:00
co-authored by Claude Opus 5.5
parent 66b0c9789b
commit 11e28502ea
6 changed files with 77 additions and 2 deletions
+10
View File
@@ -71,11 +71,21 @@ export function activeMemberBand(count: number): (typeof ACTIVE_MEMBER_BANDS)[nu
const count = z.int().nonnegative();
/** A minimum version of a sibling product that a release needs (`— requires accounts 1.2.0`). */
export const releaseRequirementSchema = z.object({ product: productSchema, version: semverSchema });
export type ReleaseRequirement = z.infer<typeof releaseRequirementSchema>;
export const releaseSchema = z.object({
version: semverSchema,
releasedAt: dateTimeSchema,
urgent: z.boolean(),
notes: z.string(),
/**
* contracts 1.1.0 (Hub 2.0): the sibling versions this release needs. The Hub refuses an update
* request (`409 REQUIREMENT_NOT_MET`) until the church's install of each product runs at least
* that version. Optional: absent from Hubs before 2.0 and from protocol v1 replies.
*/
requires: z.array(releaseRequirementSchema).optional(),
});
export const noticeSchema = z.object({