mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-11 08:47:33 +00:00
Addresses review feedback on the initial Buzz commit: - Drop the central `BuzzKinds` registry (un-idiomatic). Each event now declares its own `const val KIND` on its companion and is wired into `EventFactory`, matching the nip88Polls-style per-NIP layout used across Quartz (Event + tags/ + TagArrayBuilderExt write-DSL + TagArrayExt readers). - Implement Agent Turn Metric (NIP-AM, kind:44200): an encrypted per-turn token-usage/cost record published by an agent to its owner. content is a NIP-44 v2 ciphertext of AgentTurnMetricPayload (camelCase), between the agent (author + `agent` tag) and owner (`p` tag); either party decrypts. - Verify against a vector generated by Buzz's OWN code rather than a transcribed schema: a small generator on the real buzz-core emits a signed 44200 event with deterministic keys; AgentTurnMetricVectorTest dispatches it through EventFactory, NIP-44-decrypts it, and asserts the payload — proving end-to-end interop. Fixture + generator committed under jvmTest resources. Schemas confirmed against buzz-core/src/agent_turn_metric.rs. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J8KBSw6smQRyXLiWHeDsZ8