A writable workout library
Browsing was all the server could do here: icu_get_workout_library and icu_get_workouts_in_folder listed templates the athlete had built by hand in the web UI. icu_create_workout, icu_update_workout and icu_delete_workout now make those templates yours to build and maintain — the reusable workouts icu_apply_training_plan schedules onto a calendar. They take icu_create_event's field names (workout_type, duration_seconds, distance_meters, training_load), so events and library speak one vocabulary rather than two.
icu_delete_workout registers in safe mode as well as full: deleting a template leaves every calendar event and recorded activity untouched, and it can be rebuilt from its workout text.
Building a plan in one pass
A twelve-week plan used to mean a folder created by hand, then one call per session. icu_create_workout_folder creates the FOLDER or PLAN and hands back the id to fill; icu_bulk_create_workouts fills it from a single JSON array of items shaped like icu_create_workout calls. A bad item is reported by index — Workout 3: name is required — so a model fixes the one entry instead of re-sending the array blind.
Notes
icu_get_upcoming_workoutsreturns dated calendar events, not library templates, and now says so: its ids belong toicu_get_event/icu_update_event/icu_delete_event, never to the library tools.- Created and updated workouts no longer report
distance_meters: 0.0andtraining_load: 0on a workout that has neither. - Five new tools, 62 → 67, with
safe(the default) going 59 → 64.
Contributed by @russellmays (#132, #133).
Full Changelog: v5.0.1...v5.1.0