/** Lifecycle reason used until a workspace reservation has a bootstrapped owner. */ export const TENANT_PENDING_OWNER_REASON = "pending_owner" as const; /** Stable global catalog identity used by every SHK v2 tenant bootstrap. */ export const SHK_FIRST_STEPS_CHECKLIST_ID = "shk-first-steps-v1" as const; export const SHK_FIRST_STEPS_CHECKLIST_CODE = "shk-first-steps" as const; /** * Stable step identities keep bootstrap retries and existing session references * independent from generated database ids. */ export const SHK_FIRST_STEPS = [ { id: "shk-first-steps-profile-v1", order: 10, block: "profile" }, { id: "shk-first-steps-contacts-v1", order: 20, block: "contacts" }, { id: "shk-first-steps-projects-v1", order: 30, block: "projects" }, { id: "shk-first-steps-billing-v1", order: 40, block: "billing" }, ] as const; type ChecklistStepIdentity = { id: string; order: number; block: string; }; export function hasExactShkFirstSteps(steps: ReadonlyArray): boolean { return ( steps.length === SHK_FIRST_STEPS.length && SHK_FIRST_STEPS.every((expected) => steps.some((actual) => actual.id === expected.id && actual.order === expected.order && actual.block === expected.block)) ); }