mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
Write a mem/persona engram (kind:30174) when creating an agent from a persona. The engram is NIP-44 encrypted under the agent-owner conversation key with an HMAC-blinded d-tag, conforming to the existing engram envelope contract. Content includes the persona snapshot plus provenance (owner pubkey, kind:30175, slug, content SHA-256 digest). Fleet update reconciles agent engrams against current persona content on app launch and on persona save. Comparison is digest-based (not timestamp) to handle clock skew and export/import round-trips. No agent restart -- the live resolve path still reads the persona catalog at spawn; the engram is provenance and future-proofing for when it becomes the runtime source. Gate the directory-backed team sync machinery (import_team_from_directory, sync_team_from_dir, sync_team_personas) behind a legacy_team_sync feature flag (default-enabled). Fleet update replaces sync_team_personas in the launch sequence. The old code remains compilable for one release cycle as a rollback path. Co-authored-by: Will Pfleger <pfleger.will@gmail.com> Signed-off-by: Will Pfleger <pfleger.will@gmail.com>