const registry = new Map();
export function registerExtensionReferenceType(spec) {
    if (!/^[a-z][a-z0-9_]*$/.test(spec.tag)) {
        throw new Error(`Invalid extension reference tag: ${spec.tag}`);
    }
    registry.set(spec.tag, spec);
}
export function getExtensionReferenceType(tag) {
    return registry.get(tag);
}
export function listExtensionReferenceTypes() {
    return Array.from(registry.values());
}
export function clearExtensionReferenceTypes() {
    registry.clear();
}
//# sourceMappingURL=reference-extensions.js.map