Create a new workflow template in the current workspace.
The caller supplies a full WorkflowDefinition (graph + execution).
Save-time validation (validate_definition_save) mirrors the
/api/v1/workflows contract — duplicate node/edge IDs, port mismatches,
and other structural errors fail at write time rather than surfacing
when a caller later clones the template into a workflow.
Response shape. workspace_id is intentionally omitted so the gallery
endpoint (which returns rows from any workspace) does not leak tenant
ownership IDs across tenants. created_by is retained as author
provenance for public/starter rows.
definition is the serialized WorkflowDefinition JSONB (same shape as
Workflow.definition) — a template is a reusable workflow snapshot.