watch method

Watches every run, newest first.

Implementation

Stream<List<AgentRunRecord>> watch() => _records
    .watch(
      AgentRunRecords.collection,
      query: const RecordQuery(
        orderBy: AgentRunRecords.startedAtField,
        descending: true,
      ),
    )
    .map(
      (records) => [
        for (final record in records)
          AgentRunRecord.fromJson(record.id, record.value),
      ],
    );