listWatchers method
Lists outstanding watchers for topic (primarily for operator tooling).
The metadata helps CLIs and dashboards explain why a run is waiting.
Implementation
@override
Future<List<WorkflowWatcher>> listWatchers(
String topic, {
int limit = 256,
}) async {
final topicMap = _watchersByTopic[topic];
if (topicMap == null || topicMap.isEmpty) return const [];
final results = <WorkflowWatcher>[];
for (final record in topicMap.values.take(limit)) {
results.add(record.toWatcher());
}
return results;
}