Skip to content

[1/4] buzz-sdk: own the NIP-AP persona and team event shapes - #5842

Open
Maxwellimus wants to merge 1 commit into
mainfrom
maxwell/nip-ap-sdk-event-shapes
Open

[1/4] buzz-sdk: own the NIP-AP persona and team event shapes#5842
Maxwellimus wants to merge 1 commit into
mainfrom
maxwell/nip-ap-sdk-event-shapes

Conversation

@Maxwellimus

@Maxwellimus Maxwellimus commented Aug 14, 2026

Copy link
Copy Markdown

Buzz Desktop was the only implementation of the kind:30175 / kind:30176 wire
format. Anything else that wanted to publish an agent definition had to
re-derive it, and a re-derivation that gets serde field order wrong produces
different content bytes, a different event id, and a persona Desktop treats as
unrelated to the one it already has.

Moves the builders, content structs, and coordinate helpers into
buzz_sdk::agent_definitions; Desktop calls them instead of holding its own
copy. double_option moves with them, because the persona/team tri-state
(absent = "unknown, preserve local" vs. null/[] = "explicitly cleared") is
part of the wire contract rather than a Desktop detail.

Field order is pinned by a byte-exact serialization test — a reorder would
silently invalidate every stored persona_content_hash.

No behavior change; this is the extraction the rest of the stack builds on.

Test plan

  • just ci
  • cargo test --manifest-path desktop/src-tauri/Cargo.toml — existing persona
    and team event tests pass unchanged against the moved code.

@Maxwellimus Maxwellimus changed the title maxwell/nip ap sdk event shapes [1/4] buzz-sdk: own the NIP-AP persona and team event shapes Aug 14, 2026
@Maxwellimus
Maxwellimus marked this pull request as ready for review August 14, 2026 06:22
@Maxwellimus
Maxwellimus requested a review from a team as a code owner August 14, 2026 06:22

@wolfyy970 wolfyy970 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.

Reviewed at exact head 1341b815ac4d. Moving the event shapes, tri-state team fields, coordinate helpers, and byte-stable persona serialization into buzz-sdk is the right first increment. Desktop still projects only explicit shared fields, and the extraction does not move launch, credentials, or machine configuration into the definition.

I reran the SDK contract tests plus Desktop persona/team event suites: 58 passed. Both Rust format checks and git diff --check are clean. The red smoke check is an unrelated Huddle voice-menu failure.

@Maxwellimus
Maxwellimus force-pushed the maxwell/nip-ap-sdk-event-shapes branch 3 times, most recently from b13601c to 53a104d Compare August 14, 2026 19:59
Buzz Desktop was the only implementation of the kind:30175 / kind:30176
wire format. Anything else that wanted to publish an agent definition had
to re-derive it, and a re-derivation that gets serde field order wrong
produces different content bytes, a different event id, and a persona
Desktop treats as unrelated to the one it already has.

Move the builders, content structs, and coordinate helpers into
`buzz_sdk::agent_definitions`; Desktop now calls them instead of holding
its own copy. `double_option` moves with them, because the persona/team
tri-state (absent = "unknown, preserve local" vs. null/[] = "explicitly
cleared") is part of the wire contract rather than a Desktop detail.

Field order is pinned by a byte-exact serialization test — a reorder
would silently invalidate every stored `persona_content_hash`.

Signed-off-by: Max Lampert <maxwell@squareup.com>
@Maxwellimus
Maxwellimus force-pushed the maxwell/nip-ap-sdk-event-shapes branch from 53a104d to ad5984a Compare August 15, 2026 00:29
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.

2 participants