Skip to content

feat(relay): accept agent job-lifecycle kinds (43001-43006) in ingest - #2955

Open
flaukowski wants to merge 1 commit into
block:mainfrom
flaukowski:upstream-job-ingest
Open

feat(relay): accept agent job-lifecycle kinds (43001-43006) in ingest#2955
flaukowski wants to merge 1 commit into
block:mainfrom
flaukowski:upstream-job-ingest

Conversation

@flaukowski

@flaukowski flaukowski commented Jul 26, 2026

Copy link
Copy Markdown

buzz-core defines the NIP-90-style agent job kinds (KIND_JOB_REQUESTKIND_JOB_ERROR, 43001-43006) and exports them in ALL_KINDS, but required_scope_for_kind in the relay ingest never maps them — so a member posting a job-request event is rejected with restricted: 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 their h tag and stored + fanned out through the same generic message path as KIND_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.

Related work

Searched open PRs and issues for the 43001-43006 kinds and for required_scope_for_kind — none found covering this.

Rebased onto current main; cargo test -p buzz-relay --lib and cargo clippy -p buzz-relay are clean.

@flaukowski
flaukowski requested a review from a team as a code owner July 26, 2026 06:56
@flaukowski
flaukowski force-pushed the upstream-job-ingest branch from 6bc3100 to 62d2a30 Compare July 28, 2026 19:24
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 <[email protected]>
Signed-off-by: flaukowski <[email protected]>
(cherry picked from commit 0398a39)
@flaukowski
flaukowski force-pushed the upstream-job-ingest branch from 62d2a30 to 3f142cc Compare July 28, 2026 23:43
@flaukowski

Copy link
Copy Markdown
Author

@tlongwell-block — you've been the most active on handlers/ingest.rs, so flagging this your way; apologies if that's the wrong person to ask.

Rebased onto current main today. cargo test -p buzz-relay --lib and cargo clippy -p buzz-relay are clean locally.

The CI and Docker image runs are sitting at action_required — as an outside contributor they need a maintainer to approve the workflow run before they'll execute, so there's no green check to look at yet.

Happy to adjust if Scope::MessagesWrite isn't the authorization model you'd want for job events — that was the part I was least sure about.

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