Refine agent catalog sharing#2439
Conversation
wesbillman
left a comment
There was a problem hiding this comment.
Blocking finding
[P0] “Share to catalog” never publishes anything to the community.
The new catalog state is entirely device-local: setPersonaCatalogShareLevel only writes persona IDs, memory levels, and a timestamp to window.localStorage, while catalogPersonas is still derived from listPersonas() (the local personas.json projection). The existing persona sync is explicitly filtered to the active user's own pubkey (authors: [pubkey] in usePersonaSync.ts), and this PR adds no relay event, query, or subscription for community catalog entries. Likewise, publishPersonaCatalogUpdates only replaces a local timestamp; it does not publish the definition or selected memory snapshot.
Consequently, after Alice chooses “Agent only”, “Agent + core memory”, or “Agent + all memories”, Bob sees nothing. Even Alice loses the catalog selection on another browser/profile/device because these three keys are localStorage-only. This contradicts the UI promise, “Let anyone in this community find and use a copy of this agent,” and makes the primary feature nonfunctional outside its mocked single-page E2E setup.
Please persist catalog publication as community-scoped relay data and populate discovery from those relay entries (including an explicit privacy/security contract for the selected memory level), rather than treating localStorage as publication state.
wesbillman
left a comment
There was a problem hiding this comment.
Independent pass found one additional community-boundary issue beyond the existing publication blocker: the new visibility, memory-level, and published-version state is stored under process-global localStorage keys rather than being scoped to the active community (or identity). Sharing an agent while connected to community A therefore also marks that local agent as shared when the user switches to community B, and unsharing/publishing in either community mutates the other community's state. The eventual relay-backed catalog state needs community/relay + owner scoping end-to-end, including local pending/publication metadata.
I also traced deletion/unsharing, save-and-publish sequencing, catalog derivation, and the snapshot schema/import changes. I found no other independent blocker at this head. All applicable CI is green; per review policy I did not duplicate it locally.
|
🤖 Addressed this P0 in e17d283.
Checks: 3,448 desktop unit tests; 27 agents E2E tests; relay validation tests; desktop Tauri, Rust, and mobile pre-push suites. |
…log-sharing # Conflicts: # desktop/src/features/agents/ui/AgentDefinitionDialog.tsx # desktop/src/features/agents/ui/UnifiedAgentsSection.tsx
…log-sharing # Conflicts: # desktop/tests/helpers/bridge.ts
|
hey @klopez4212 — consolidated review feedback from two independent passes at 1. (important, flagged independently by both reviewers) Catalog-shared agents in allowlist mode are published in a state every community member's import will reject. 2. (important, flagged independently by both reviewers) The new integration test 3. (minor) The client-side NIP-33 fallback tie-break reverses the relay's. 4. (minor) Items 1 and 2 are the merge-blockers from our side. CI triage at head for the rest of the red checks: Rust Lint, Desktop Build (macOS), Desktop E2E Relay, Desktop Smoke E2E (2), and the aarch64 cross-compile all died in the |
|
🤖 @wpfleger96 Addressed in dd22a7c.
Local checks are green: pnpm check, 3,486 desktop unit tests, 1,628 native desktop tests, focused native import coverage, and 8 focused catalog integration tests. The fresh CI run is in progress. |
Summary
Screenshots
Agent actions
Team avatar stack
Catalog sharing
Publish while editing
Publish from Share
Catalog details
Test plan
just ci