PRM-88 use full service registry for KPI signals

This commit is contained in:
Sai-karthik
2026-07-05 19:12:25 +00:00
parent 9062ce9f22
commit 7142c8f7e8
+6 -1
View File
@@ -851,6 +851,11 @@ export function listServices() {
return serviceRegistry.filter((service) => allowedServiceIds.has(service.id));
}
function getServiceRecord(serviceId?: string | null) {
const normalized = normalizeServiceId(serviceId);
return normalized ? serviceRegistry.find((service) => service.id === normalized) : undefined;
}
export function getService(serviceId?: string | null) {
const normalized = normalizeServiceId(serviceId);
return normalized ? listServices().find((service) => service.id === normalized) : undefined;
@@ -1021,7 +1026,7 @@ export function getServiceToolName(serviceId?: string) {
}
export function getCompletionEvents(serviceId?: string) {
return getService(serviceId)?.curator.completionEvents ?? ["curator.task.completed"];
return getServiceRecord(serviceId)?.curator.completionEvents ?? ["curator.task.completed"];
}
export const getServiceCompletionEvents = getCompletionEvents;