A sensible decision.
Looking at your example script i have one question though (although i suspect you've already thought of it).
What happens if the modder accidentally leave entries in the "producedItems" slot?
Are they discarded (possibly with a warning in the log), do they show up besides the random items, or is it undefined behavior?