Repository navigation
Conversation
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.
Motivation
A ContextVM encrypted client with the SDK's omitted/default gift-wrap policy can send its first
initializerequest in a persistent kind1059wrapper. An ephemeral-only server subscribing to kind21059never receives it, so the client times out before any capability negotiation can occur. A signed public server announcement can disclose ephemeral support before this initial request, provided the client validates the announcement rather than trusting arbitrary relay content.Changes (separate commits)
/tmpdirectory and a global-skills test's dependence on the developer profile. No product behavior changes.--gift-wrap-mode optional|persistent|ephemeralwith typed validation and CLI > named-server > shared-config precedence. Omission retains SDK behavior.--auto-gift-wrap/autoGiftWrapfor callers usingencryption-mode required. Before constructing the transport, query bounded signed kind11316announcements for the exact selected server pubkey and verify canonical event ID/signature, age/expiration, presence-only capability tags, and conflicting-current-record rules. Prefer ephemeral wrapping when the server authenticates support; otherwise use the authenticated compatible persistent path. Explicit gift-wrap mode always wins, and the omitted default remains unchanged.The third commit also fixes printable discovery of canonical presence-only encryption tags and handles null/oversized signed metadata defensively.
Safety and compatibility
Reproduction and qualification
0c0e231116e2504f61e6cf731c0ba34c108904f5, locked@contextvm/sdk0.13.10.Upstream CI remains authoritative for Ubuntu/Windows Node 20 and Node 22 and maintainer review. No claim that a GitHub merge itself publishes an npm release or that existing clients already support these options.
Please feel free to review the three commits independently or request a smaller split; they deliberately separate the fixture, explicit-flag, and verified-auto concerns.