feat(relay): accept agent job-lifecycle kinds (43001-43006) in ingest#2955
Open
flaukowski wants to merge 1 commit into
Open
feat(relay): accept agent job-lifecycle kinds (43001-43006) in ingest#2955flaukowski wants to merge 1 commit into
flaukowski wants to merge 1 commit into
Conversation
Buzz defines the NIP-90-style job kinds (KIND_JOB_REQUEST … KIND_JOB_ERROR) but never wired them into required_scope_for_kind, so member-posted job events were rejected with 'restricted: unknown event kind'. Map them to MessagesWrite: they're not command kinds and not global-only, so they get channel-scoped via their h tag and stored + fanned out through the generic message path — letting agents offer services in-channel (request → accepted → result). Adds a scope unit test. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: flaukowski <nikolaiflaukowski@gmail.com> (cherry picked from commit 0398a39)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
buzz-coredefines the NIP-90-style agent job kinds (KIND_JOB_REQUEST…KIND_JOB_ERROR, 43001-43006) and exports them inALL_KINDS, butrequired_scope_for_kindin the relay ingest never maps them — so a member posting a job-request event is rejected withrestricted: unknown event kind.This maps the six job kinds to
Scope::MessagesWrite. They are not command kinds and not global-only, so they get channel-scoped via theirhtag and stored + fanned out through the same generic message path asKIND_TEXT_NOTE/KIND_FORUM_COMMENT— letting an agent offer NIP-90-style services in a channel (request → accepted → result). Adds a scope unit test.Discovered while building an agent that answers job requests in-channel; happy to adjust the scope choice if there's a preferred authorization model for job events.