Skip to content

Expose allowlist respond-to mode in buzz agents draft-update - #4725

Open
mrmoe28 wants to merge 1 commit into
block:mainfrom
mrmoe28:feature/cli-respond-to-allowlist
Open

Expose allowlist respond-to mode in buzz agents draft-update#4725
mrmoe28 wants to merge 1 commit into
block:mainfrom
mrmoe28:feature/cli-respond-to-allowlist

Conversation

@mrmoe28

@mrmoe28 mrmoe28 commented Aug 4, 2026

Copy link
Copy Markdown

Summary

  • The backend already supports a per-pubkey Allowlist respond-to mode (distinct from owner-only/anyone), persisted as an owner-signed NIP-33 event (kind 30177), but buzz agents draft-update's RespondToArg only exposed owner-only/anyone — there was no CLI path to it.
  • Adds RespondToArg::Allowlist and a repeatable --respond-to-allowlist <pubkey> flag to draft-update, with the same hex64/dedupe normalization and mode+list pairing validation (allowlist mode requires ≥1 pubkey; the flag requires allowlist mode) that the desktop backend already enforces at mint time.
  • The desktop chat-originated agent-management request parser (agentManagement.ts) previously rejected respondTo: "allowlist" outright and hardcoded respondToAllowlist: [] when applying an update — both fixed so the allowlist actually reaches the prefilled draft.
  • Still fully owner-reviewed end to end: the CLI only opens a prefilled edit-agent draft in Buzz Desktop; nothing is applied to the live agent until the owner reviews and saves it.

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 — clean
  • pnpm run typecheck (desktop) — clean
  • pnpm run test (desktop) — 4140 passed (incl. 3 new tests for the allowlist parse path)
  • Pre-push hook ran full rust-tests/desktop-test/desktop-tauri-checks — all green

🤖 Generated with Claude Code

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>
@mrmoe28
mrmoe28 requested a review from a team as a code owner August 4, 2026 14:34

@mrmoe28 mrmoe28 left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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>,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Comment on lines +52 to +55
respondToAllowlist:
changes.respondTo === "allowlist"
? (changes.respondToAllowlist ?? [])
: [],

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant