Expose allowlist respond-to mode in buzz agents draft-update - #4725
Expose allowlist respond-to mode in buzz agents draft-update#4725mrmoe28 wants to merge 1 commit into
Conversation
The backend already supports a per-pubkey Allowlist respond-to mode (distinct from owner-only/anyone), stored as an owner-signed NIP-33 event — but the CLI's RespondToArg only exposed owner-only/anyone, and the desktop's agent-management request parser rejected "allowlist" and dropped any allowlist pubkeys. - buzz-cli: add RespondToArg::Allowlist and a repeatable --respond-to-allowlist <pubkey> flag on draft-update, with the same hex64/dedupe normalization and mode+list pairing validation the desktop backend already enforces. - desktop: accept respondTo: "allowlist" and respondToAllowlist in the chat-originated agent-management request parser, and thread the list through to the prefilled edit-agent draft instead of discarding it. Still fully owner-reviewed: the CLI only opens a prefilled draft in Buzz Desktop, nothing is applied until the owner saves it. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Signed-off-by: mrmoe28 <ekosolarize@gmail.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 39927cb4a4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| #[value(name = "owner-only")] | ||
| OwnerOnly, | ||
| #[value(name = "allowlist")] | ||
| Allowlist, |
There was a problem hiding this comment.
Add the required Signed-off-by trailer
The reviewed commit message contains no Signed-off-by trailer, so the repository's required DCO check will reject this commit regardless of the code and test results; recreate or rebase the commit with signoff.
AGENTS.md reference: AGENTS.md:L111-L111
Useful? React with 👍 / 👎.
| #[serde(skip_serializing_if = "Option::is_none")] | ||
| pub respond_to: Option<String>, | ||
| #[serde(skip_serializing_if = "Vec::is_empty")] | ||
| pub respond_to_allowlist: Vec<String>, |
There was a problem hiding this comment.
Document the new public allowlist API
The new public UpdateAgentDraft::respond_to_allowlist field has no Rust doc comment; the same is true of the newly public RespondToArg::Allowlist variant at crates/buzz-cli/src/lib.rs:249. Add API documentation for these newly exposed items as required by the repository contributor contract.
AGENTS.md reference: AGENTS.md:L113-L116
Useful? React with 👍 / 👎.
| respondToAllowlist: | ||
| changes.respondTo === "allowlist" | ||
| ? (changes.respondToAllowlist ?? []) | ||
| : [], |
There was a problem hiding this comment.
Record the config-behavior change in AGENTS.md
This changes how allowlist configuration is applied to the owner-reviewed edit draft, but the commit neither updates the scoped AGENTS.md nor explicitly states that no contributor rules changed. The scoped guide requires one of those whenever agent configuration modeling, application, persistence, or clearing changes, so record the new behavior or add the explicit no-rules-changed note.
AGENTS.md reference: desktop/src/features/agents/AGENTS.md:L184-L191
Useful? React with 👍 / 👎.
Summary
Allowlistrespond-to mode (distinct fromowner-only/anyone), persisted as an owner-signed NIP-33 event (kind 30177), butbuzz agents draft-update'sRespondToArgonly exposedowner-only/anyone— there was no CLI path to it.RespondToArg::Allowlistand a repeatable--respond-to-allowlist <pubkey>flag todraft-update, with the same hex64/dedupe normalization and mode+list pairing validation (allowlistmode requires ≥1 pubkey; the flag requiresallowlistmode) that the desktop backend already enforces at mint time.agentManagement.ts) previously rejectedrespondTo: "allowlist"outright and hardcodedrespondToAllowlist: []when applying an update — both fixed so the allowlist actually reaches the prefilled draft.Test plan
cargo test -p buzz-cli— 321 passed (incl. 5 new tests covering allowlist mode/pubkey validation and payload shape)cargo build -p buzz-cli— cleanpnpm run typecheck(desktop) — cleanpnpm run test(desktop) — 4140 passed (incl. 3 new tests for the allowlist parse path)🤖 Generated with Claude Code