repositories / pi-ext
pi-ext
bugabingas pi extensions
owned by admin
extensions/mockup/contract.ts
Rawimport { Type } from "typebox";
export const MOCKUP_DESCRIPTION =
"Show HTML-fragment mockups as previews in Pi or open an interactive browser review. Browser reviews return accept or iterate, selected option IDs, notes, and annotations.";
export const mockupParameters = Type.Object({
title: Type.String({
description: "Short browser page title for this visual decision.",
}),
question: Type.String({
description: "The exact visual question the human should answer.",
}),
options: Type.Array(
Type.Object({
id: Type.String({
description:
"Stable option id. Letters, numbers, dot, underscore, dash only.",
}),
label: Type.String({ description: "Human-visible option label." }),
description: Type.Optional(
Type.String({
description: "One short sentence explaining the option.",
}),
),
html: Type.String({
description: "HTML fragment; scripts are allowed.",
}),
}),
{
minItems: 1,
maxItems: 4,
},
),
multi: Type.Optional(
Type.Boolean({
default: false,
description: "Allow selecting multiple options.",
}),
),
});