buzz icon indicating copy to clipboard operation
buzz copied to clipboard

feat(cli): owner-authorized management of synced sidebar categories

Open dschwartzAI opened this issue 4 months ago • 2 comments

Problem

Buzz Desktop supports encrypted, identity-scoped custom sidebar sections/categories, but the buzz CLI exposes no way to read or manage them. This prevents an agent from helping an owner organize a busy workspace even when the owner explicitly requests it.

Today the owner must manually create every category and move each channel in Desktop. PR #2947 makes the Desktop category UI substantially better, but remains UI-only. PR #3165 and issue #3363 improve mobile sync/rendering, not automation.

Proposed capability

Add programmatic sidebar-category management without exposing or copying the owner's private key.

Direct current-identity CLI

A command family along these lines:

buzz sidebar sections list
buzz sidebar sections create --name "Run the Business" --icon "🎯"
buzz sidebar sections assign --section "Run the Business" --channel main --channel system
buzz sidebar sections rename ...
buzz sidebar sections reorder ...
buzz sidebar sections delete ...

These commands should operate only on the CLI's current identity and reuse the existing encrypted channel-sections / category persistence and conflict-handling logic rather than introduce a competing document format.

Managed-agent owner-review flow

For a managed agent acting on behalf of its owner, provide a reviewable mutation draft:

  1. The agent proposes the complete category layout using channel IDs plus human-readable names.
  2. Buzz Desktop shows the exact create/move/rename/delete effects for owner review.
  3. The owner approves once.
  4. Desktop applies and signs/encrypts the mutation using the owner's local identity.

An agent's own key must never impersonate the owner or publish owner-encrypted preferences. Owner attestation should authorize opening the review surface, not leak general signing authority.

Requirements

  • Preserve identity- and relay-scoped encrypted sync.
  • Resolve names to IDs before preview; persist stable channel IDs.
  • Support idempotent full-layout application as well as individual operations.
  • Fail closed on ambiguous channel names, missing channels, stale category revisions, or authorization failure.
  • Show a clear diff before an owner-reviewed write.
  • Never print private keys, decrypted preference payloads, or owner authorization material.
  • Remain compatible with the category model in #2947 if that lands.
  • Add CLI tests plus Desktop end-to-end coverage for review, approval, cancellation, conflicts, and replay/idempotency.

Example use case

An owner asks an agent to organize channels into:

  • 🎯 Run the Business — main, system, Big Rocks, roadmap
  • 🛠️ Build & Ship — build/review/QA/release channels
  • 💰 Revenue — billing, Stripe reconciliation, and funnel channels

The agent should be able to propose that layout in one operation and the owner should approve it once, rather than manually moving every channel.

Duplicate search

Searched open issues and PRs for channel sections, sidebar sections, CLI, automation, and owner-authorized preference management. The closest items are #2947, #3165, and #3363; none expose CLI or managed-agent category mutation.

dschwartzAI avatar Jul 29 '26 17:07 dschwartzAI

The direct current-identity CLI implementation is now proposed in PR #5436. It adds encrypted list/full-layout apply plus individual section mutations with stable-ID resolution and revision conflict checks. Managed-agent owner review remains intentionally separate in #5353 and its linked broker scope #5352; no agent key is allowed to impersonate the owner.

marcusquinn avatar Aug 09 '26 23:08 marcusquinn

+1 from a self-hosted deployment, with a concrete case and one gap I think is missing from the current scope.

Case. We run a 4-agent team on a private relay. The lead agent creates one channel per branch/task with buzz channels create (7 work channels in the last week). Every one of them lands unsorted, and the human owner has to hand-move each into the sidebar section they belong to. The owner asked the lead agent to do it and the agent had to answer "I can't" — which is exactly the situation described here.

What I verified today (Desktop 0.5.20 + the bundled buzz CLI):

  • No section surface in the CLI: buzz --help has no sidebar/sections group, and buzz channels --help (create, update, add-member, topic, purpose, …) has no section flag.
  • Persistence matches what this issue describes — identity- and relay-scoped, renderer-side:
    buzz-channel-sections.v1:<pubkey>:<relay>          {"version":1,"sections":[],"assignments":{}}
    buzz-sync-watermark.v1:channel-sections:<pubkey>:<relay>
    

Gap I'd add to the scope: creation time. buzz channels create --template <name> already resolves type, visibility, description, canvas and agent roster from a desktop-local template — a channel created that way arrives fully configured except for where it sits in the sidebar. Two small additions would close the loop for agent-created channels:

  • a section field in channel-templates.json, and
  • buzz channels create --section "<name>".

Otherwise every agent-created channel needs a follow-up sections assign (and, for a managed agent, a separate owner review) for something that was known at creation.

Read path is valuable on its own. Even with writes gated behind owner review, a plain sections list would let the agent report "the channel I just created is unsorted" instead of the owner having to notice it. That part needs no new authority — it's the agent's own identity-scoped data.

Status question: #5436 (direct current-identity CLI) has been open since Aug 19 — is anything blocking it, or is it waiting on the owner-review track in #5353/#5352? For our use the current-identity CLI alone would already solve most of the pain.

zeanserssi avatar Sep 01 '26 07:09 zeanserssi