mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-10 00:16:59 +00:00
A thin server-side policy so `amy serve --buzz` hosts a private, agent-authorized Buzz workspace on one JVM process — no Block Rust relay + Postgres/Redis/MinIO. - quartz: BuzzMembershipPolicy : FullAuthPolicy (buzz/relay/). Runs the NIP-42 handshake, then layers Buzz's two authorization rules: (1) only members (the team) may read/write; (2) NIP-OA virtual membership — an un-enrolled agent key is granted membership for its connection when its AUTH event carries an owner-signed `auth` tag whose owner is a member and whose signature authorizes that agent. An unauthenticated read is told `auth-required` (not `restricted`) so the client runs NIP-42 and retries. Deliberately does NOT emit relay-signed 39000-39003 metadata or run workflows (a policy can't emit events; the job channel doesn't need them). 8 unit tests. - cli: `amy serve --buzz [--members npubs]` composes the policy into geode's RelayEngine. Members = admins + --members. Verified end-to-end against a live `amy serve --buzz`: a member writes (published:true), an outsider is rejected (restricted: not a workspace member); plus the 8-case unit suite (member/non-member/unauth/reads/allowed-kinds/NIP-OA-agent/non-member-owner/tampered). Plan doc + cli README updated with the two relay options (amy serve --buzz vs the Rust stack) and when you'd need each. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011mApqAbr8vkLC7gUDjavu6