Skip to content

Add Buzz transport stack (member release, ships relay-unconfigured) - #67

Merged
noogalabs merged 3 commits into
mainfrom
buzz/member-transport-release
Aug 28, 2026
Merged

noogalabs merged 3 commits into
mainfrom
buzz/member-transport-release

Conversation

@noogalabs

Copy link
Copy Markdown
Owner

Summary

Adds the Buzz transport (NIP-29 group chat over Nostr) to the member framework — the transport deferred from earlier releases. Additive over the current base; the Slack transport and all prior behavior are unchanged.

Census: 22 files, +2,743 / −1.

⚠️ Ships relay-unconfigured — this is the finished state

Choosing Buzz means picking and configuring your own relay and keys. The framework consumes a relay URL, an authentication identity, and channel/sender configuration that you provide (BUZZ_RELAY_URL / BUZZ_PRIVATE_KEY / buzz.json); it never deploys a relay, mints keys, or changes membership. With those values absent the adapter simply stays inactive — no default relay exists, and you should not invent one. See docs/runbook/buzz-adapter-setup.md.

Included

  • Relay client (NIP-42 AUTH, wss://-only), dispatcher, and durable per-(event, agent) inbox delivery (dedup + independent acks; a failed target never rolls back siblings).
  • Org-scoped authentication identity: one shared daemon WebSocket per org; conflicting relay URLs or identities fail closed.
  • CLI: cortextos buzz send | test-send | discover-channels, and bus/send-buzz.sh.
  • agent-manager integration (registration, shared connection, eviction/teardown) and the consumer-census verifier that proves no untyped Buzz text reaches a PTY sink.
  • Dependencies: @noble/hashes, @noble/secp256k1 (pure JS; no build hooks).

Discipline

  • Additive: the Slack transport and the cron side-run fallback are untouched (only the Buzz-specific carrier hunks were applied).
  • Org-scrubbed: no organization names, rosters, or people; the setup runbook is member self-serve (no approval-gate/custodian framing). No hardcoded relay URL and no real keys — test fixtures use the standard secp256k1/BIP340 vectors.
  • Leak-scan allowlist adds only those known test-vector lines (exact-line hashes, documented in .github/scripts/leak-guard.sh), so a real key elsewhere is still caught.

Local gates

  • tsc --noEmit: 0 errors
  • Test suite: 4728 passed / 0 failed / 13 skipped
  • Leak scan (delta + full-tree): clean

🤖 Generated with Claude Code

Ports the deferred Buzz transport (NIP-29 group chat over Nostr): the relay
client, dispatcher, durable per-(event,agent) inbox delivery, org-scoped
authentication identity, the buzz CLI (send / test-send / discover-channels),
send-buzz.sh, and the agent-manager integration (shared per-org WebSocket,
eviction/teardown). Adds @noble/hashes + @noble/secp256k1.

Ships RELAY-UNCONFIGURED as its finished state: the framework consumes a relay
URL, keys, and channel/sender config that the operator provides (BUZZ_RELAY_URL
/ BUZZ_PRIVATE_KEY / buzz.json) and never deploys a relay, mints keys, or
changes membership — with those absent the adapter stays inactive. No default
relay exists. The setup runbook says plainly: choosing Buzz means picking and
configuring your own relay and keys.

Additive over member main; the merged Slack transport and side-run fallback are
untouched (the buzz-only carrier hunks were applied; the org-path, channels-prose
and side-run-revert hunks were not).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WHgtUKEyT27odfUsRhjgoT

@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: 387d4a3112

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

Comment thread src/buzz/relay-client.ts
Comment thread src/buzz/relay-client.ts
Comment thread docs/runbook/buzz-adapter-setup.md Outdated
noogalabs and others added 2 commits August 28, 2026 14:31
…t runtime gate, runbook scaffold)

- relay-client: on a socket close BEFORE the AUTH challenge, rejectAllPending()
  cleared the auth-wait timer without settling waitForAuthChallenge()'s promise,
  so connectAndRun() hung forever and the reconnect loop died. Give the pending
  auth-wait a reject callback and invoke it on closure. Casualty test proves a
  close-before-challenge reconnects instead of suspending.
- relay-client + cli/buzz: native WebSocket is unavailable on older Node (engines
  allows >=20). Gate loudly with a clear 'requires Node 20.10+' message before
  the reconnect loop and at the CLI connect point, matching the Slack transport's
  convention — fail-loud, never retry-forever-silent. Test covers the gated path.
- runbook: step 4 documented a 'cortextos add-agent --buzz-channel' flag that
  does not exist; rewrite to the real create-agent + author-buzz.json steps.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WHgtUKEyT27odfUsRhjgoT
…ode 22+

The gate messages said 'Node 20.10+', but native WebSocket is only default-on
from Node 22 — a member on Node 21 would read the requirement, believe they
satisfy it, and still hit the gate. Fix both the relay-client warning and the
cli/buzz error to Node 22+. Feature-detect logic (typeof WebSocket) unchanged;
prose only.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WHgtUKEyT27odfUsRhjgoT
@noogalabs
noogalabs merged commit a9ed273 into main Aug 28, 2026
5 checks passed
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