← Files CARBON LiteARCHIVED FILE
scripts/validate-listing.mjs
437 Bytes · Nov 6, 2026 · 07:00 UTC
export function validateCapabilities(manifest) {
const values = manifest.interface?.capabilities;
if (!Array.isArray(values) || values.length > 20 ||
values.some(value => typeof value !== "string" || !value.trim() ||
value.length > 120 || /[\r\n]/.test(value))) {
throw new Error("interface.capabilities must be a list of up to 20 nonempty, single-line strings (120 characters each); use [] for no labels.");
}
}
SHA-256: 3eeccca0cbcb64dbd963d90eff13c742b2be3f29f688483396790168ab348203