Skip to content

feat(cli): external-agent realtime path (#2663) - #2942

Open
Bartok9 wants to merge 3 commits into
block:mainfrom
Bartok9:bartok9/feat-external-agent-2663
Open

feat(cli): external-agent realtime path (#2663)#2942
Bartok9 wants to merge 3 commits into
block:mainfrom
Bartok9:bartok9/feat-external-agent-2663

Conversation

@Bartok9

@Bartok9 Bartok9 commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Closes direction toward #2663 (full external/OpenClaw CLI path). Keep #2933 open as the small users me slice.

Ships

Residual

Tests

cargo test -p buzz-cli --lib (264 ok) · cargo test -p buzz-ws-client --lib (3 ok)

@Bartok9
Bartok9 requested a review from a team as a code owner July 26, 2026 04:27

dspury commented Jul 27, 2026

Copy link
Copy Markdown

I’ve been validating the resident/external-agent path against Buzz’s current relay subscription rules before opening any overlapping PR. I’m sharing the resulting branches here first so we can coordinate rather than compete with #2942/#2933.

The tested changes are split into three harness-neutral slices:

  1. Identity/compact prerequisitesLunar-Park:buzz-pr-identity (561add554, 341b37114)

    • buzz users me
    • compact pubkey/tags
    • subprocess proof that identity resolution performs no relay I/O and never prints the private key
  2. Listen v1 contractLunar-Park:buzz-pr-listen (dbf564f2f, 7ce55d055)

    • one single-#h subscription per resolved channel, preserving the relay’s host/community security classification and live channel fan-out
    • mention-only channel discovery, aggregated EOSE, CLOSE on SIGINT/SIGTERM
    • retryable WebSocket transport failures are machine-classified as exit code 2; auth/config/protocol failures remain fatal
    • process tests for scoped multi-channel delivery, mention-only discovery, network refusal, and both shutdown signals
  3. Executable conformance fixturesLunar-Park:buzz-pr-fixtures (dbfef894f, c723de94b)

    • exact normalization checks for schema, channel/thread validation, mentions, author policy, self-suppression, lifecycle ordering, malformed JSON, and replay deduplication

Validation on the full stack passes cargo fmt --all -- --check, cargo clippy -p buzz-cli --all-targets -- -D warnings, and cargo test -p buzz-cli (267 unit tests plus the identity, listen, and fixture process/contract tests).

Would you prefer these as suggested commits on #2942/#2933, a split of #2942 into the smaller identity/listen units, or another coordination path? I’ll hold off on opening a competing upstream PR until we agree on the cleanest route.

@Bartok9
Bartok9 force-pushed the bartok9/feat-external-agent-2663 branch 2 times, most recently from a8a27d2 to 59ccda8 Compare July 28, 2026 18:40
@cameronhotchkies cameronhotchkies added the triage-ready Appropriate for agentic review label Jul 29, 2026
@Bartok9
Bartok9 force-pushed the bartok9/feat-external-agent-2663 branch 8 times, most recently from 0834a0b to 56c1f15 Compare August 1, 2026 17:59
@Bartok9
Bartok9 force-pushed the bartok9/feat-external-agent-2663 branch 3 times, most recently from 674a381 to 77c2969 Compare August 7, 2026 13:34
Bartok9 added 3 commits August 10, 2026 09:18
OpenClaw/external bridges hold BUZZ_PRIVATE_KEY but had no first-class
self-identity command short of embedding secp256k1. Print hex pubkey +
npub locally with no relay I/O (alias: whoami).

Signed-off-by: Bartok9 <danielrpike9@gmail.com>
Add buzz listen (WS NDJSON + optional webhook), keep pubkey/tags in
messages get --format compact, headless agents publish for kind:30177
with client-side schema validation, and docs/cli-external-agents.md.
Includes users me for a self-contained E2E path (sibling block#2933).

Signed-off-by: Bartok <danielrpike9@gmail.com>
Signed-off-by: Bartok9 <danielrpike9@gmail.com>
Address CI Rust Lint (fmt) and Windows clippy cloned_ref_to_slice_refs
on buzz listen tests.

Signed-off-by: Bartok9 <danielrpike9@gmail.com>
@dspury

dspury commented Aug 13, 2026

Copy link
Copy Markdown

I rewrote #3964 as a single upstream-focused commit: 0ba5a8662.

Since this PR already owns the baseline identity/listening surface, the potentially reusable pieces from #3964 are now isolated to:

  • canonical event-id and signature verification before output
  • explicit h / p filter validation
  • bounded catch-up with an explicit overflow error
  • reconnect/shutdown and stable transport-error behavior
  • safe local key generation
  • implementation-independent wire fixtures

#3964 is draft and does not add directory publication, routing policy, process management, or deployment behavior. I’m happy for those hardening pieces to be folded here or kept separate, whichever is easier to review.

@Bartok9

Bartok9 commented Aug 13, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the rewrite note on #3964 — appreciated, and good call keeping it draft/upstream-focused.

Preference: keep the hardening slices in #3964 (or a thin follow-up) rather than folding them into this PR.

  • feat(cli): external-agent realtime path (#2663) #2942 should stay the baseline identity + listen surface so review stays scoped to the realtime path and the existing test/process contracts.
  • The pieces you listed (canonical event-id/sig verify before output, explicit h/p filter validation, bounded catch-up + overflow, reconnect/shutdown + stable transport errors, safe local keygen, wire fixtures) are the right hardening layer on top of that baseline. Landing them separately avoids bloating this diff and makes bisect/review cleaner.
  • If anything in feat(cli): add verified long-running client primitives #3964 is blocked on a missing hook from feat(cli): external-agent realtime path (#2663) #2942, call it out and I can expose a small extension point here; otherwise I’d rather not cherry-pick across until this lands or gets a clear maintainer direction.

Happy to review #3964 against this branch once the baseline is settled. No objection to you holding the draft as the staging ground for those checks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

triage-ready Appropriate for agentic review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants