Skip to content

fix(desktop): show externally managed owned agents - #3556

Open
amadad wants to merge 1 commit into
block:mainfrom
amadad:fix/3054-external-agents
Open

fix(desktop): show externally managed owned agents#3556
amadad wants to merge 1 commit into
block:mainfrom
amadad:fix/3054-external-agents

Conversation

@amadad

@amadad amadad commented Jul 29, 2026

Copy link
Copy Markdown

Summary

  • discover the current user's externally supervised agents from verified NIP-OA kind:0 profiles, alongside the existing kind:10100 directory
  • show those identities in a separate Externally managed agents group in the Desktop Agents tab
  • show relay presence and open the normal profile surface, without creating a local managed-agent record or exposing local lifecycle controls

Fixes #3054.

Ownership boundary

The relay/profile layer remains the owner of identity discovery. The local managed-agent store remains the sole owner of process lifecycle, keys, configuration, logs, and sessions.

An externally managed card therefore does not import an nsec, create a local record, or expose Start/Edit/Delete controls. Provider-backed agents already present in the managed store retain their existing controls. This also keeps the change complementary to #3449 rather than introducing a second remote deployment path.

Verification

  • cd desktop && pnpm check
  • cd desktop && pnpm test — 3,771 passed
  • cd desktop && pnpm build:e2e
  • cd desktop && pnpm exec playwright test agents.spec.ts --project=integration --grep "owner-attested external agents" — 1 passed
  • cargo test --manifest-path desktop/src-tauri/Cargo.toml — 1,850 passed; 14 ignored; diagnostic tests 3 passed
  • cargo clippy --manifest-path desktop/src-tauri/Cargo.toml --all-targets -- -D warnings
  • cargo fmt --manifest-path desktop/src-tauri/Cargo.toml -- --check

Signed-off-by: Ali Madad <ali@scty.org>
@amadad
amadad requested a review from a team as a code owner July 29, 2026 15:00

@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: 144276cbad

ℹ️ 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".

&state,
&[
serde_json::json!({ "kinds": [10100] }),
serde_json::json!({ "kinds": [0], "#auth": [&owner_pubkey] }),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Paginate the owner-tagged profile scan

In communities with more than 1,000 current kind-0 profiles, this can silently omit valid externally managed agents. I checked the query_relay /query catchall path: only kinds is pushed into EventQuery, while #auth is applied by filters_match after buzz-db has capped the candidate query at the newest 1,000 rows. Therefore, an owner's agent profile outside that window is never returned unless it also has a kind-10100 event. Push the auth-tag constraint into the database query or paginate the kind-0 candidates until the scan is exhausted.

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.

[Bug] Agents created outside the current app-managed store do not appear in the Agents tab

1 participant