mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
Agents currently fall back to `git config user.email` for commit trailers, which resolves to the repo owner's identity — not the human who triggered the turn. NIP-01 kind:0 already has a standard `email` field; this change stores it and surfaces it in every prompt so agents can use the correct identity. - Add nullable `git_email` column to `users` table (migration 0004) - Parse the NIP-01 `email` field from kind:0 events in `handle_kind0_profile` and store it via `update_user_profile` - Add `git_email` to `PromptProfile`; parse it in `parse_kind0_profile_lookup` - Emit `Requester-Git-Email: Name <email>` in `[Context]` when the triggering event's author has a git_email set; omit the line entirely when absent - Update `nest_agents.md`: prefer `Requester-Git-Email:` from `[Context]` over `git config user.email`; fall back to git config when absent Co-authored-by: Will Pfleger <pfleger.will@gmail.com> Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
12 lines
547 B
SQL
12 lines
547 B
SQL
-- Add git_email column to users table for agent commit trailer injection.
|
|
--
|
|
-- Populated from the standard NIP-01 kind:0 `email` field when a user
|
|
-- publishes a profile event. Agents read this from `[Context]` as
|
|
-- `Requester-Git-Email:` and use it for Co-authored-by / Signed-off-by
|
|
-- trailers instead of falling back to `git config user.email`.
|
|
--
|
|
-- Nullable: users who have not set an email in their profile leave this
|
|
-- NULL, and the harness omits the `Requester-Git-Email:` line entirely.
|
|
|
|
ALTER TABLE users ADD COLUMN git_email TEXT;
|