Skip to content

feat(deep-link): add buzz://install-agent prefill arm - #2911

Open
adamazad wants to merge 1 commit into
block:mainfrom
adamazad:feat/deep-link-install-agent
Open

feat(deep-link): add buzz://install-agent prefill arm#2911
adamazad wants to merge 1 commit into
block:mainfrom
adamazad:feat/deep-link-install-agent

Conversation

@adamazad

Copy link
Copy Markdown

What

Adds a new buzz://install-agent deep-link arm so an external service can offer a one-click "install this agent into your community" flow. Today community-add is deep-linkable (buzz://connect / add-community / join) but agent provisioning is not — the only path is buzz agents draft-create → owner review in Desktop, which a web page can't initiate.

Grammar

buzz://install-agent?relay=<ws(s)://…>[&npub=<agent pubkey>&name=<display name>&system_prompt=<text>&channel=<uuid>]
  • relayrequired, validated as ws/wss with a non-empty host, exactly like the connect / join / add-community arms.
  • npub, name, system_prompt, channel — optional; they mirror the fields of buzz agents draft-create (CreateAgentDraft: channel / display-name / system-prompt).

Opening the link brings Buzz Desktop to the foreground with the create-agent form prefilled from those params.

Security

The link only prefills the owner's create-agent form. It never auto-admits an agent, never bypasses owner review — the owner still reviews and saves the form in Desktop, identical to draft-create. Stated in the code comments and AGENTS.md.

Implementation

Mirrors the existing community-add prefill machinery exactly:

  • Rust (desktop/src-tauri/src/deep_link.rs): parse_install_agent_deep_link + a dedicated PendingAgentInstallDeepLinks queue + take_/acknowledge_pending_agent_install_deep_link Tauri commands, wired into handle_deep_link_url and the invoke handler / managed state.
  • Frontend: agentInstallPrefill store + AgentInstallDeepLinkPayload type, a coalescing drain that routes the queued intent into the existing create-agent form (RequestedAgentCreateDialogs) seeded with display name / system prompt / target channel.
  • Docs: AGENTS.md.

Tests

  • 6 new Rust unit tests (happy path, relay-only, empty optionals, every relay-rejection case, queue FIFO + dedupe).
  • Full deep_link suite: 44 passed, 0 failed (cargo test -p buzz-desktop deep_link).
  • Frontend typecheck + biome clean; desktop clippy clean.

Why (context)

Enables external tools (e.g. a Figura design agent) to publish an install link that drops a user straight into Buzz's owner-review create-agent form for a given community — closing the one gap between community onboarding (already deep-linkable) and agent onboarding (previously CLI-only).

🤖 Generated with Claude Code

@adamazad
adamazad requested a review from a team as a code owner July 26, 2026 00:05
Add a new `buzz://install-agent?relay=<ws(s)://…>` deep-link arm that opens
Desktop with the create-agent form PREFILLED, so an external service (e.g.
Figura) can offer a one-click "install this agent into your community" flow.
Today community-add is deep-linkable but agent-install is not.

Mirrors the existing community-add prefill machinery exactly:
- Rust `parse_install_agent_deep_link` + dedicated `PendingAgentInstallDeepLinks`
  queue + `take_/acknowledge_pending_agent_install_deep_link` commands, wired
  into `handle_deep_link_url` and the Tauri invoke handler / managed state.
  `relay` is required and validated as ws(s) like connect/join/add-community;
  `npub`/`name`/`system_prompt`/`channel` are optional and mirror
  `buzz agents draft-create` (channel / display-name / system-prompt).
- Frontend `agentInstallPrefill` store + `AgentInstallDeepLinkPayload` type +
  coalescing drain (`listenForAgentInstallDeepLinks`) that routes the queued
  intent into the existing create-agent form (`RequestedAgentCreateDialogs`)
  seeded with display name / system prompt / target channel.

Security: the link ONLY prefills the owner's create-agent form. It never
auto-admits an agent or bypasses owner review — the owner still reviews and
saves the form in Desktop. Stated in code comments and docs (AGENTS.md).

Tests: 6 new Rust unit tests (happy path, relay-only, empty-optionals,
every relay rejection case, queue FIFO + dedupe). Full deep_link suite
44 passed. Frontend typecheck + biome clean; desktop clippy clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KpZ2N5oAADahc69R9656pe
Signed-off-by: adam <adam@adamazad.com>
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