11import * as React from "react" ;
2- import { ChevronDown , Search , X } from "lucide-react" ;
2+ import { AlertTriangle , ChevronDown , Search , X } from "lucide-react" ;
33import {
44 mergeAllowlist ,
55 parsePubkeyInput ,
@@ -20,10 +20,10 @@ import type { PersonaDropdownOption } from "./agentConfigOptions";
2020 * Inbound author gate UI for create/edit agent dialogs.
2121 *
2222 * Dropdown:
23- * - Owner only (default; matches `buzz-acp --respond-to=owner-only`)
24- * - Anyone (`--respond-to=anyone` — fully open bot )
25- * - Allowlist (`--respond-to=allowlist`, plus the chip list as
26- * `--respond-to-allowlist`)
23+ * - Only me (default; maps to `buzz-acp --respond-to=owner-only`)
24+ * - Anyone (`--respond-to=anyone` — fully open agent )
25+ * - Selected people (`--respond-to=allowlist`, plus the selected pubkeys as
26+ * `--respond-to-allowlist`)
2727 *
2828 * `nobody` is intentionally not surfaced — it pairs with a heartbeat-only
2929 * setup that has no meaningful GUI use case.
@@ -53,7 +53,7 @@ function formatSearchUserSecondary(user: UserSearchResult) {
5353const RESPOND_TO_OPTIONS : PersonaDropdownOption [ ] = [
5454 { label : "Only me (default)" , value : "owner-only" } ,
5555 { label : "Anyone" , value : "anyone" } ,
56- { label : "Allowlist " , value : "allowlist" } ,
56+ { label : "Selected people " , value : "allowlist" } ,
5757] ;
5858
5959export function CreateAgentRespondToField ( {
@@ -142,7 +142,7 @@ export function CreateAgentRespondToField({
142142 }
143143 htmlFor = "agent-respond-to"
144144 >
145- Who can talk to this agent
145+ Who can send instructions
146146 </ label >
147147 { isPersonaVariant ? (
148148 < PersonaDropdownField
@@ -162,18 +162,35 @@ export function CreateAgentRespondToField({
162162 onChange = { ( e ) => onModeChange ( e . target . value as RespondToMode ) }
163163 value = { mode }
164164 >
165- < option value = "owner-only" > Owner only (default)</ option >
166- < option value = "anyone" > Anyone</ option >
167- < option value = "allowlist" > Allowlist</ option >
165+ { RESPOND_TO_OPTIONS . map ( ( option ) => (
166+ < option key = { option . value } value = { option . value } >
167+ { option . label }
168+ </ option >
169+ ) ) }
168170 </ select >
169171 ) }
170- { ! isPersonaVariant ? (
172+ { mode === "anyone" ? (
173+ < div
174+ className = "flex items-start gap-2 rounded-xl border border-warning/30 bg-warning-bg px-3 py-2.5"
175+ data-testid = "agent-access-warning"
176+ >
177+ < AlertTriangle
178+ aria-hidden = "true"
179+ className = "mt-0.5 h-4 w-4 shrink-0 text-warning"
180+ />
181+ < p aria-live = "polite" className = "text-xs leading-5 text-warning" >
182+ Anyone can send instructions to this agent and use it to access the
183+ computer or server where it runs. This includes files, accounts, and
184+ tools available to the agent.
185+ </ p >
186+ </ div >
187+ ) : (
171188 < p className = "text-xs text-muted-foreground" >
172- Controls which Nostr authors the agent listens to (@mentions, DMs,
173- thread replies). The agent's owner can always shut it down with
174- < span className = "font-mono" > !shutdown </ span > .
189+ { mode === "allowlist"
190+ ? "Only you and the people you choose can send instructions."
191+ : "Only you can send instructions." }
175192 </ p >
176- ) : null }
193+ ) }
177194 { mode === "allowlist" ? (
178195 < AllowlistPicker
179196 allowlist = { allowlist }
@@ -269,21 +286,21 @@ function AllowlistPicker({
269286 >
270287 { ! isPersona ? (
271288 < div className = "flex items-center justify-between gap-2" >
272- < span className = "text-sm font-medium" > Allowed pubkeys </ span >
289+ < span className = "text-sm font-medium" > Selected people </ span >
273290 < span className = "rounded-full bg-background px-2 py-1 text-2xs font-medium leading-none text-muted-foreground" >
274291 { allowlist . length } selected
275292 </ span >
276293 </ div >
277294 ) : null }
278295 { ! isPersona && ownerPubkey ? (
279296 < p className = "text-xs text-muted-foreground" >
280- Owner (
281- < PubKey pubkey = { ownerPubkey } /> ) is always implicitly allowed by the
282- harness — no need to add it here .
297+ You (
298+ < PubKey pubkey = { ownerPubkey } /> ) can always use this agent. You
299+ don't need to add yourself .
283300 </ p >
284301 ) : ! isPersona ? (
285302 < p className = "text-xs text-muted-foreground" >
286- The agent's owner is always implicitly allowed .
303+ You can always use this agent .
287304 </ p >
288305 ) : null }
289306 < div className = "rounded-lg border border-border/80 bg-background" >
@@ -452,7 +469,7 @@ function AllowlistPicker({
452469 onClick = { onAddFromPaste }
453470 type = "button"
454471 >
455- Add to allowlist
472+ Add people
456473 </ button >
457474 </ div >
458475 </ div >
0 commit comments