PRM-88 use full service registry for KPI signals
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user