mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
Extract the pure cores of list_agent_templates (assemble_agent_templates) and save_agent_as_template (upsert_template_persona) — behavior unchanged — and pin them with unit tests: listing filters inactive and builtin-shadow records and sorts saved templates case-insensitively after built-ins; saving with an existing name updates the record in place (identity, created_at, and stored env_vars preserved) instead of duplicating; a fresh insert never carries credentials; and inactive or team-sourced records with the same name are never hijacked. Also pin that an inbound persona echo cannot resurrect a locally deactivated record — is_active is not a projected field, so a stale relay echo leaves the local flag untouched. Co-authored-by: Taylor Ho <taylorkmho@gmail.com> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>