Skip to content

Commit cb31449

Browse files
add public descriptions to agent personas (#7126)
**Category:** new-feature **User Impact:** People can add a short public description to an agent and see what it does directly on agent cards and profiles. **Problem:** Agent cards previously showed only a model label, so people had to open an agent and inspect its instructions to understand its purpose. Public metadata also needed one trustworthy lifecycle across local edits, relay catalogs, profiles, and portable snapshots. **Solution:** Add an optional owner-authored description with a 280-character visible-text policy, publish it as profile `about`, and prefer it on agent cards while retaining the model fallback. Description metadata is excluded from the spawn-content hash, remains definition-owned, and is validated independently at every untrusted or persistence boundary. <details> <summary>File changes</summary> **desktop/src-tauri/src/commands/agent_config_tests.rs** Updates managed-agent/persona fixtures for the optional description field while preserving the behavior under test. **desktop/src-tauri/src/commands/agent_discovery/relay_directory.rs** Updates relay-directory profile test publication for the expanded profile contract. **desktop/src-tauri/src/commands/agent_models_tests.rs** Updates managed-agent/persona fixtures for the optional description field while preserving the behavior under test. **desktop/src-tauri/src/commands/agent_models_update.rs** Preserves the effective `about` value when instance edits republish a complete profile event. **desktop/src-tauri/src/commands/agents.rs** Carries the effective authored description into initial managed-agent profile publication. **desktop/src-tauri/src/commands/agents_profile.rs** Adds `about` to profile reconciliation and keeps description, name, and avatar synchronized against relay state. **desktop/src-tauri/src/commands/agents_tests.rs** Updates managed-agent/persona fixtures for the optional description field while preserving the behavior under test. **desktop/src-tauri/src/commands/personas/card.rs** Materializes the definition-owned description before minting a portable agent card snapshot. **desktop/src-tauri/src/commands/personas/create.rs** Normalizes and validates raw authored descriptions before persona persistence. **desktop/src-tauri/src/commands/personas/delete_cascade_tests.rs** Updates managed-agent/persona fixtures for the optional description field while preserving the behavior under test. **desktop/src-tauri/src/commands/personas/inbound.rs** Validates descriptions at inbound relay ingress and applies accepted values to local definitions. **desktop/src-tauri/src/commands/personas/inbound/catalog_reconcile_tests.rs** Updates managed-agent/persona fixtures for the optional description field while preserving the behavior under test. **desktop/src-tauri/src/commands/personas/inbound/inbound_tests.rs** Updates managed-agent/persona fixtures for the optional description field while preserving the behavior under test. **desktop/src-tauri/src/commands/personas/mod.rs** Centralizes raw-byte validation followed by trim/empty normalization for description writes. **desktop/src-tauri/src/commands/personas/pending.rs** Revalidates descriptions before preparing public persona publications. **desktop/src-tauri/src/commands/personas/sharing.rs** Carries the optional public description through this managed-agent compatibility path. **desktop/src-tauri/src/commands/personas/snapshot.rs** Materializes definition-owned descriptions into portable instance snapshots without creating a second persisted authority. **desktop/src-tauri/src/commands/personas/snapshot/fidelity_tests.rs** Updates managed-agent/persona fixtures for the optional description field while preserving the behavior under test. **desktop/src-tauri/src/commands/personas/snapshot/import.rs** Restores snapshot descriptions onto imported definitions while keeping linked instance copies absent. **desktop/src-tauri/src/commands/personas/snapshot/tests.rs** Updates managed-agent/persona fixtures for the optional description field while preserving the behavior under test. **desktop/src-tauri/src/commands/personas/update.rs** Persists persona description edits, republishes linked profiles, and preserves legacy avatars during complete kind:0 replacements. **desktop/src-tauri/src/commands/personas/update/name_propagation_tests.rs** Proves description-only profile sync does not write instance state or clear a legacy avatar. **desktop/src-tauri/src/commands/team_snapshot.rs** Round-trips member descriptions through team snapshots and imported definitions. **desktop/src-tauri/src/commands/team_snapshot/tests.rs** Covers team member description export and import fidelity. **desktop/src-tauri/src/commands/teams/adopt/apply.rs** Starts adopted team catalog members without synthesizing an unauthored description. **desktop/src-tauri/src/commands/teams/adopt/tests.rs** Updates managed-agent/persona fixtures for the optional description field while preserving the behavior under test. **desktop/src-tauri/src/commands/teams/pending/tests.rs** Updates managed-agent/persona fixtures for the optional description field while preserving the behavior under test. **desktop/src-tauri/src/commands/teams/sharing/tests.rs** Updates managed-agent/persona fixtures for the optional description field while preserving the behavior under test. **desktop/src-tauri/src/egress_guard_tests.rs** Updates managed-agent/persona fixtures for the optional description field while preserving the behavior under test. **desktop/src-tauri/src/event_sync_team_catalog_tests.rs** Updates managed-agent/persona fixtures for the optional description field while preserving the behavior under test. **desktop/src-tauri/src/managed_agents/agent_description.rs** Defines the canonical Rust description resolution used by profile publication and reconciliation. **desktop/src-tauri/src/managed_agents/agent_events.rs** Updates managed-agent record construction for the optional public description field. **desktop/src-tauri/src/managed_agents/agent_snapshot.rs** Includes descriptions as snapshot profile `about` metadata and validates them at decode ingress. **desktop/src-tauri/src/managed_agents/agent_snapshot_envelope.rs** Updates managed-agent record construction for the optional public description field. **desktop/src-tauri/src/managed_agents/agent_snapshot_tests.rs** Covers snapshot description export and rejection of unsafe or overlong imported metadata. **desktop/src-tauri/src/managed_agents/config_bridge/reader_tests.rs** Updates managed-agent/persona fixtures for the optional description field while preserving the behavior under test. **desktop/src-tauri/src/managed_agents/definition_validation.rs** Adds the shared 280-character visible-text policy for public descriptions. **desktop/src-tauri/src/managed_agents/discovery/tests.rs** Updates managed-agent/persona fixtures for the optional description field while preserving the behavior under test. **desktop/src-tauri/src/managed_agents/effective_config/tests.rs** Updates managed-agent/persona fixtures for the optional description field while preserving the behavior under test. **desktop/src-tauri/src/managed_agents/global_config/tests.rs** Updates managed-agent/persona fixtures for the optional description field while preserving the behavior under test. **desktop/src-tauri/src/managed_agents/mod.rs** Exports the description resolution and validation helpers to managed-agent consumers. **desktop/src-tauri/src/managed_agents/nest/render_tests.rs** Updates managed-agent/persona fixtures for the optional description field while preserving the behavior under test. **desktop/src-tauri/src/managed_agents/parallelism.rs** Updates managed-agent fixtures for the optional description field without changing runtime configuration behavior. **desktop/src-tauri/src/managed_agents/persona_events.rs** Adds description to persona event content while deliberately excluding it from the spawn-relevant content hash. **desktop/src-tauri/src/managed_agents/persona_events/tests.rs** Pins description event round-tripping and proves description-only edits do not change the restart hash. **desktop/src-tauri/src/managed_agents/personas.rs** Initializes built-in persona records without authored descriptions for backward-compatible defaults. **desktop/src-tauri/src/managed_agents/personas/tests.rs** Updates managed-agent/persona fixtures for the optional description field while preserving the behavior under test. **desktop/src-tauri/src/managed_agents/readiness.rs** Updates managed-agent fixtures for the optional description field without changing runtime configuration behavior. **desktop/src-tauri/src/managed_agents/restore.rs** Includes the effective description in launch-time profile reconciliation. **desktop/src-tauri/src/managed_agents/runtime/test_fixtures.rs** Updates managed-agent/persona fixtures for the optional description field while preserving the behavior under test. **desktop/src-tauri/src/managed_agents/runtime/tests.rs** Updates managed-agent/persona fixtures for the optional description field while preserving the behavior under test. **desktop/src-tauri/src/managed_agents/spawn_snapshot/tests.rs** Updates managed-agent/persona fixtures for the optional description field while preserving the behavior under test. **desktop/src-tauri/src/managed_agents/team_catalog/tests.rs** Updates managed-agent/persona fixtures for the optional description field while preserving the behavior under test. **desktop/src-tauri/src/managed_agents/team_snapshot.rs** Updates managed-agent record construction for the optional public description field. **desktop/src-tauri/src/managed_agents/teams_tests.rs** Updates managed-agent/persona fixtures for the optional description field while preserving the behavior under test. **desktop/src-tauri/src/managed_agents/types.rs** Adds optional description metadata to persona and managed-agent records and their compatibility projections. **desktop/src-tauri/src/managed_agents/types/requests.rs** Accepts optional descriptions on persona create and update IPC requests. **desktop/src-tauri/src/managed_agents/types/tests.rs** Updates managed-agent/persona fixtures for the optional description field while preserving the behavior under test. **desktop/src-tauri/src/migration_avatar_tests.rs** Updates managed-agent/persona fixtures for the optional description field while preserving the behavior under test. **desktop/src-tauri/src/persona_catalog.rs** Parses and validates descriptions at the untrusted community-catalog boundary. **desktop/src-tauri/src/persona_catalog_tests.rs** Covers valid catalog descriptions plus rejection of malformed, invisible, and overlong values. **desktop/src-tauri/src/relay.rs** Publishes and queries kind:0 `about` so relay profiles preserve authored descriptions. **desktop/src-tauri/src/relay/tests.rs** Updates managed-agent/persona fixtures for the optional description field while preserving the behavior under test. **desktop/src/features/agents/AGENTS.md** Documents description ownership, validation, snapshot, hashing, and display invariants for future changes. **desktop/src/features/agents/lib/agentDescription.test.mjs** Pins Unicode counting, paste clamping, trimming, and empty authored-description behavior. **desktop/src/features/agents/lib/agentDescription.ts** Provides shared display resolution, Unicode-scalar counting, and paste clamping for descriptions. **desktop/src/features/agents/lib/personaCatalogRelay.ts** Maps validated catalog descriptions into catalog persona projections. **desktop/src/features/agents/ui/AgentDefinitionDialog.tsx** Adds the description draft to create and edit submission while extracting identity fields from the large dialog. **desktop/src/features/agents/ui/AgentDescriptionField.tsx** Renders the public description input, helper copy, and Unicode-aware near-limit counter. **desktop/src/features/agents/ui/AgentIdentityCard.tsx** Generalizes the card second line to show a two-line description or the existing model fallback. **desktop/src/features/agents/ui/UnifiedAgentsSection.tsx** Prefers authored descriptions on persona cards and retains model labels when no description exists. **desktop/src/features/agents/ui/personaDialogState.test.mjs** Verifies edit and duplicate drafts preserve authored descriptions. **desktop/src/features/agents/ui/personaDialogState.ts** Seeds authored descriptions into edit and duplicate dialog drafts. **desktop/src/features/agents/ui/usePersonaActions.ts** Preserves descriptions when copying catalog personas into local definitions. **desktop/src/shared/api/personaTypes.ts** Defines description-bearing persona wire types in a focused module split from the size-constrained API type file. **desktop/src/shared/api/tauriPersonas.test.mjs** Verifies raw persona descriptions map into the frontend model and absent values become null. **desktop/src/shared/api/tauriPersonas.ts** Maps description fields across Tauri and preserves raw authored bytes for authoritative Rust validation. **desktop/src/shared/api/types.ts** Re-exports the extracted persona types without changing consumer import paths. **desktop/src/testing/e2eBridge.ts** Extends mock persona create, update, publication, and catalog parsing with production-shaped description behavior. **desktop/tests/e2e/agents.spec.ts** Verifies an edited description persists and appears on the agent card. </details> ### Reproduction Steps 1. Open **Agents**, edit a custom or built-in agent, and enter a sentence in **Description**. 2. Save the agent and confirm the sentence appears as the second line on its card. 3. Reopen the agent and confirm the authored description is restored; clear it and confirm the card returns to the model label. 4. Paste more than 280 Unicode characters and confirm the field keeps the first 280 characters and shows the near-limit counter. 5. Share or export/import the agent and confirm the description survives in the catalog/profile or snapshot without showing a restart-required badge for a description-only edit. ### Screenshots / Demo The focused Playwright flow `built-in persona edits persist` exercises the edited dialog, persisted value, and resulting card subtitle. Screenshots can be added after review if the field placement or two-line card treatment needs visual iteration. ### Verification - `cargo test --manifest-path desktop/src-tauri/Cargo.toml --lib` — 3,029 passed - `cd desktop && pnpm test` — 5,805 passed - `cd desktop && pnpm exec tsc --noEmit` - Focused Playwright: `built-in persona edits persist` — passed - Pre-push desktop, Tauri, typecheck, test, file-size, and branch-skew gates — passed --------- Signed-off-by: tulsi <[email protected]>
1 parent 5673c33 commit cb31449

81 files changed

Lines changed: 1404 additions & 262 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎desktop/src-tauri/src/commands/agent_config_tests.rs‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ fn goose_runtime() -> &'static KnownAcpRuntime {
6666

6767
fn agent_record() -> ManagedAgentRecord {
6868
ManagedAgentRecord {
69+
description: None,
6970
pubkey: "agent".to_string(),
7071
name: "Agent".to_string(),
7172
persona_id: Some("persona-1".to_string()),
@@ -127,6 +128,7 @@ fn agent_record() -> ManagedAgentRecord {
127128

128129
fn persona_with_model(model: &str) -> AgentDefinition {
129130
AgentDefinition {
131+
description: None,
130132
id: "persona-1".to_string(),
131133
display_name: "Persona".to_string(),
132134
avatar_url: None,

‎desktop/src-tauri/src/commands/agent_discovery/relay_directory.rs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,7 @@ mod real_relay_tests {
506506
&agent,
507507
"Agent Probe",
508508
None,
509+
None,
509510
Some(&auth_tag),
510511
)
511512
.await

‎desktop/src-tauri/src/commands/agent_models_tests.rs‎

Lines changed: 14 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -428,29 +428,20 @@ fn model_discovery_ignores_stale_record_for_linked_agent() {
428428
)
429429
.expect("sample managed agent record");
430430

431-
let persona = crate::managed_agents::AgentDefinition {
432-
id: "persona-1".to_string(),
433-
display_name: "Persona".to_string(),
434-
avatar_url: None,
435-
system_prompt: "You are a persona.".to_string(),
436-
runtime: Some("goose".to_string()),
437-
model: Some("persona-model".to_string()),
438-
provider: Some("anthropic".to_string()),
439-
name_pool: Vec::new(),
440-
is_builtin: false,
441-
is_active: true,
442-
shared: false,
443-
source_team: None,
444-
source_team_persona_slug: None,
445-
catalog_source: None,
446-
team_catalog_source: None,
447-
env_vars: BTreeMap::new(),
448-
respond_to: None,
449-
respond_to_allowlist: Vec::new(),
450-
parallelism: None,
451-
created_at: "".to_string(),
452-
updated_at: "".to_string(),
453-
};
431+
let persona: crate::managed_agents::AgentDefinition = serde_json::from_str(
432+
r#"{
433+
"id": "persona-1",
434+
"display_name": "Persona",
435+
"system_prompt": "You are a persona.",
436+
"runtime": "goose",
437+
"model": "persona-model",
438+
"provider": "anthropic",
439+
"is_active": true,
440+
"created_at": "",
441+
"updated_at": ""
442+
}"#,
443+
)
444+
.expect("sample persona");
454445

455446
// agent_model_discovery_config is the single helper get_agent_models
456447
// consumes — the stale record bytes must lose to the persona's current

‎desktop/src-tauri/src/commands/agent_models_update.rs‎

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,16 @@ pub async fn update_managed_agent(
244244
.avatar_url
245245
.clone()
246246
.or_else(|| managed_agent_avatar_url(&effective_command));
247+
let about = crate::managed_agents::record_effective_description(record, &personas);
247248
let auth_tag = record.auth_tag.clone();
248-
Some((agent_keys, relay_url, display_name, avatar_url, auth_tag))
249+
Some((
250+
agent_keys,
251+
relay_url,
252+
display_name,
253+
avatar_url,
254+
about,
255+
auth_tag,
256+
))
249257
} else {
250258
None
251259
};
@@ -291,13 +299,14 @@ pub async fn update_managed_agent(
291299
// A rename is committed only when profile sync succeeds; otherwise restore
292300
// the complete pre-edit record so Desktop and the relay keep one
293301
// authoritative name.
294-
if let Some((agent_keys, relay_url, display_name, avatar_url, auth_tag)) = sync_params {
302+
if let Some((agent_keys, relay_url, display_name, avatar_url, about, auth_tag)) = sync_params {
295303
if let Err(sync_error) = sync_managed_agent_profile(
296304
&state,
297305
&relay_url,
298306
&agent_keys,
299307
&display_name,
300308
avatar_url.as_deref(),
309+
about.as_deref(),
301310
auth_tag.as_deref(),
302311
)
303312
.await

‎desktop/src-tauri/src/commands/agents.rs‎

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use crate::{
1515
CreateManagedAgentResponse, ManagedAgentRecord, ManagedAgentSummary, RelayMeshConfig,
1616
DEFAULT_ACP_COMMAND, DEFAULT_AGENT_PARALLELISM, DEFAULT_AGENT_TURN_TIMEOUT_SECONDS,
1717
},
18-
relay::{relay_ws_url_with_override, sync_managed_agent_profile},
18+
relay::relay_ws_url_with_override,
1919
util::now_iso,
2020
};
2121

@@ -486,7 +486,7 @@ pub async fn create_managed_agent(
486486
};
487487

488488
// ── Phase 3: save record (sync lock) ───────────────────────────────────────
489-
let (agent, resolved_avatar_url) = {
489+
let (agent, resolved_avatar_url, profile_about) = {
490490
let _store_guard = state
491491
.managed_agents_store_lock
492492
.lock()
@@ -637,10 +637,10 @@ pub async fn create_managed_agent(
637637
input.parallelism,
638638
linked_persona.as_ref(),
639639
)?;
640-
641640
let record = ManagedAgentRecord {
642641
pubkey: pubkey.clone(),
643642
name: name.clone(),
643+
description: None,
644644
persona_id: requested_persona_id.clone(),
645645
team_id,
646646
private_key_nsec: private_key_nsec.clone(),
@@ -739,9 +739,12 @@ pub async fn create_managed_agent(
739739
// before any .await — owner-authored, every agent (Will's ruling: no
740740
// is_builtin/persona-membership gate).
741741
retain_managed_agent_pending(&app, &state, record);
742+
// Effective owner-authored description for the kind:0 `about`.
743+
let profile_about = crate::managed_agents::record_effective_description(record, &personas);
742744
(
743745
summarize_from_disk(&app, record, &runtimes)?,
744746
resolved_avatar_url,
747+
profile_about,
745748
)
746749
};
747750

@@ -781,20 +784,16 @@ pub async fn create_managed_agent(
781784
// ── Phase 4: sync agent profile on relay (async, outside lock) ───────────
782785
// Use the avatar persisted on the record so the published profile and any
783786
// later reconciliation agree on the same value.
784-
let profile_relay_url = crate::relay::effective_agent_relay_url(
785-
&resolved_relay_url,
786-
&relay_ws_url_with_override(&state),
787-
);
788-
let mut profile_sync_error = (sync_managed_agent_profile(
787+
let mut profile_sync_error = profile::publish_agent_profile_with_about(
789788
&state,
790-
&profile_relay_url,
789+
&resolved_relay_url,
791790
&agent_keys,
792791
&name,
793792
resolved_avatar_url.as_deref(),
793+
profile_about.as_deref(),
794794
auth_tag.as_deref(),
795795
)
796-
.await)
797-
.err();
796+
.await;
798797
profile_sync_error =
799798
super::agent_models::flush_managed_agent_policy(&app, &state, profile_sync_error).await;
800799

‎desktop/src-tauri/src/commands/agents_profile.rs‎

Lines changed: 77 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ pub(crate) struct ProfileReconcileData {
4040
/// backfill to recover the correct avatar from the persona record when the
4141
/// relay profile has been corrupted.
4242
pub(crate) persona_id: Option<String>,
43+
/// Expected kind:0 `about` — the agent's effective public description
44+
/// (owner-authored when present; see
45+
/// `managed_agents::record_effective_description`). `None` publishes an
46+
/// about-less profile.
47+
pub(crate) about: Option<String>,
4348
}
4449

4550
/// Resolve the avatar to backfill for a legacy agent record (pre-PR-921, no
@@ -96,6 +101,7 @@ pub(crate) fn profile_reconcile_data(
96101
pubkey: record.pubkey.clone(),
97102
agent_command: crate::managed_agents::record_agent_command(record, personas),
98103
persona_id: record.persona_id.clone(),
104+
about: crate::managed_agents::record_effective_description(record, personas),
99105
}
100106
}
101107

@@ -254,7 +260,12 @@ pub(crate) async fn reconcile_agent_profile(
254260
Some(expected_avatar)
255261
};
256262

257-
if !profile_needs_sync(existing.as_ref(), &data.name, expected_avatar.as_deref()) {
263+
if !profile_needs_sync(
264+
existing.as_ref(),
265+
&data.name,
266+
expected_avatar.as_deref(),
267+
data.about.as_deref(),
268+
) {
258269
return Ok(ProfileReconcileOutcome::Reconciled);
259270
}
260271

@@ -274,30 +285,92 @@ pub(crate) async fn reconcile_agent_profile(
274285
&agent_keys,
275286
&data.name,
276287
expected_avatar.as_deref(),
288+
data.about.as_deref(),
277289
data.auth_tag.as_deref(),
278290
)
279291
.await?;
280292
Ok(ProfileReconcileOutcome::Reconciled)
281293
}
282294

283295
/// Decide whether a published profile is missing or stale relative to the
284-
/// expected name and avatar. A missing profile always needs sync; a present
285-
/// one is stale when either the display name or picture diverges.
296+
/// expected name, avatar, and about. A missing profile always needs sync; a
297+
/// present one is stale when the display name, picture, or about diverges.
298+
/// For about, `None` and the empty string are treated as equal so an
299+
/// about-less profile never triggers a pointless republish loop.
286300
pub(super) fn profile_needs_sync(
287301
existing: Option<&crate::relay::AgentProfileInfo>,
288302
expected_name: &str,
289303
expected_avatar: Option<&str>,
304+
expected_about: Option<&str>,
290305
) -> bool {
291306
match existing {
292307
None => true,
293308
Some(info) => {
294309
let name_matches = info.display_name.as_deref() == Some(expected_name);
295310
let picture_matches = info.picture.as_deref() == expected_avatar;
296-
!name_matches || !picture_matches
311+
let about_matches = info.about.as_deref().unwrap_or("") == expected_about.unwrap_or("");
312+
!name_matches || !picture_matches || !about_matches
297313
}
298314
}
299315
}
300316

317+
/// Publish a managed agent's kind:0 profile with the authored public
318+
/// description as `about`, resolving the effective
319+
/// relay URL from the record's stored value. Returns the sync error (if any)
320+
/// rather than failing the caller — profile publish is best-effort in the
321+
/// create and snapshot-import flows that share this helper.
322+
#[allow(clippy::too_many_arguments)]
323+
pub(crate) async fn publish_agent_profile_with_about(
324+
state: &AppState,
325+
record_relay_url: &str,
326+
agent_keys: &nostr::Keys,
327+
display_name: &str,
328+
avatar_url: Option<&str>,
329+
about: Option<&str>,
330+
auth_tag: Option<&str>,
331+
) -> Option<String> {
332+
let relay_url = crate::relay::effective_agent_relay_url(
333+
record_relay_url,
334+
&relay_ws_url_with_override(state),
335+
);
336+
crate::relay::sync_managed_agent_profile(
337+
state,
338+
&relay_url,
339+
agent_keys,
340+
display_name,
341+
avatar_url,
342+
about,
343+
auth_tag,
344+
)
345+
.await
346+
.err()
347+
}
348+
349+
/// Publish a fresh persona-backed agent's kind:0 profile, computing the
350+
/// effective public `about` from the persona itself.
351+
/// Shared by flows in files at the size ratchet (snapshot import).
352+
pub(crate) async fn publish_persona_profile(
353+
state: &AppState,
354+
record_relay_url: &str,
355+
agent_keys: &nostr::Keys,
356+
display_name: &str,
357+
avatar_url: Option<&str>,
358+
persona: &crate::managed_agents::AgentDefinition,
359+
auth_tag: Option<&str>,
360+
) -> Option<String> {
361+
let about = crate::managed_agents::effective_agent_description(persona.description.as_deref());
362+
publish_agent_profile_with_about(
363+
state,
364+
record_relay_url,
365+
agent_keys,
366+
display_name,
367+
avatar_url,
368+
about.as_deref(),
369+
auth_tag,
370+
)
371+
.await
372+
}
373+
301374
// Async so the blocking body (disk reads/writes + process termination) runs off
302375
// the main UI thread via spawn_blocking. State is re-derived from the owned
303376
// AppHandle inside the closure (`State<'_, _>` is borrowed, MutexGuard is !Send).

0 commit comments

Comments
 (0)