Skip to content

feat(dvm): add NIP-89 handler recommendation and information kinds - #737

Merged
cameri merged 4 commits into
cameri:mainfrom
Priyanshubhartistm:feat/dvm-nip89-discovery
Aug 25, 2026
Merged

feat(dvm): add NIP-89 handler recommendation and information kinds#737
cameri merged 4 commits into
cameri:mainfrom
Priyanshubhartistm:feat/dvm-nip89-discovery

Conversation

@Priyanshubhartistm

@Priyanshubhartistm Priyanshubhartistm commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

Description

Adds NIP-89 discovery for DVM job requests: named EventKinds constants HANDLER_RECOMMENDATION = 31989 and HANDLER_INFORMATION = 31990, plus tests confirming both are already passively accepted, served, and replaced correctly.

  • Both kinds sit inside the existing parameterized-replaceable range (30000-39999), so
    ParameterizedReplaceableEventStrategy already handles create/replace/serve for them no new handler code, only named constants for clarity.
  • The relay does not author its own kind-31990 on behalf of locally-registered workers, and there is no heartbeat/withdraw-on-crash publishing subsystem — confirmed out of scope for passive-only discovery.
  • 2 unit tests in event-strategy-factory.spec.ts confirm both kinds route to
    ParameterizedReplaceableEventStrategy.
  • 6 integration scenarios (test/integration/features/nip-89/) cover, for each kind: create + serve, replace-on-d-tag-collision, and kind-only REQ filter discovery.

Related Issue

Part of #639. Closes #736.

Motivation and Context

Job requests (#729), persistence (#727), and dispatch (#731) exist, but there was no way for clients to discover which DVMs a relay's workers can talk to. Passive accept-and-serve (over relay-authored handler-info with a heartbeat) was the scope confirmed with the maintainer.

Signed-off-by: Priyanshubhartistm <bhartipriyanshustm@gmail.com>
Signed-off-by: Priyanshubhartistm <bhartipriyanshustm@gmail.com>
@changeset-bot

changeset-bot Bot commented Aug 20, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: eb7945d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
nostream Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coveralls

coveralls commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

Coverage Status

Coverage is 71.334%Priyanshubhartistm:feat/dvm-nip89-discovery into cameri:main. No base build found for cameri:main.

@cameri
cameri requested a balanced review from Copilot August 25, 2026 01:03

Copilot AI 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.

🟢 Approval recommended

The constants are correct and the tests comprehensively verify the intended passive behavior.

Pull request overview

Adds passive NIP-89 discovery support by naming existing parameterized-replaceable event kinds and verifying relay behavior.

Changes:

  • Adds constants for kinds 31989 and 31990.
  • Adds strategy-routing unit tests.
  • Adds integration coverage for storage, replacement, and kind-filtered discovery.
File summaries
File Description
src/constants/base.ts Defines NIP-89 event kinds.
test/unit/factories/event-strategy-factory.spec.ts Verifies strategy routing.
test/integration/features/nip-89/nip-89.feature Defines discovery scenarios.
test/integration/features/nip-89/nip-89.feature.ts Implements NIP-89 test steps.
.changeset/dvm-nip89-discovery.md Records the feature release.
Review details
  • Files reviewed: 5/5 changed files
  • Comments generated: 0
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@cameri
cameri merged commit 9f36191 into cameri:main Aug 25, 2026
17 checks passed
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.

Support NIP-89 discovery for DVM job requests (kind-31989 / kind-31990)

4 participants