feat: listInvocations() for the detached-runs monitor
Some checks failed
Security / Security check (push) Failing after 1s

Returns every tracked detached invocation (newest-first) with id,
phase, current step, timestamps, error, flow name and project.
Regenerated stubs from the platform hub.proto.

Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
This commit is contained in:
flemming-it 2026-07-12 14:34:24 +02:00
parent f67e430b09
commit 3fe96c9487
5 changed files with 233 additions and 0 deletions

View file

@ -92,6 +92,7 @@ typedef SubmitResponse = pb.SubmitResponse;
// generated package directly.
typedef SubmitStreamEvent = pb.SubmitStreamEvent;
typedef InvocationStatus = pb.InvocationStatus;
typedef InvocationEntry = pb.InvocationEntry;
/// Typed client for the FI Hub gRPC surface. Construct once,
/// reuse for the process lifetime, call [close] on shutdown.
@ -871,6 +872,14 @@ class HubClient {
return r.cancelled;
}
/// Every tracked detached invocation (newest-first) for a monitor
/// surface Studio's detached-runs list. Empty when detached
/// invocations are disabled or none have run this process.
Future<List<InvocationEntry>> listInvocations() async {
final r = await _hub.listInvocations(Empty());
return r.invocations;
}
pb.SubmitRequest _buildSubmitRequest({
required String flowYaml,
required Map<String, String> textInputs,