Merged
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.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
@resciencelab/dap@0.5.0
Minor Changes
eb4863f: Implement domain-separated signatures to prevent cross-context replay attacks
This is a BREAKING CHANGE that implements AgentWire-style domain separation across all signing contexts.
Security Improvements
"AgentWorld-{Context}-{VERSION}\0"(includes null byte terminator to prevent JSON confusion)Breaking Changes
Signature Format
All signatures now include a domain-specific prefix before the payload:
Affected APIs
signHttpRequest()- Now usesDOMAIN_SEPARATORS.HTTP_REQUESTverifyHttpRequestHeaders()- Verifies with domain separationsignHttpResponse()- Now usesDOMAIN_SEPARATORS.HTTP_RESPONSEverifyHttpResponseHeaders()- Verifies with domain separationbuildSignedAgentCard()- Agent Card JWS now prependsDOMAIN_SEPARATORS.AGENT_CARDNew Exports
DOMAIN_SEPARATORS- Constant object with all 7 domain separatorssignWithDomainSeparator(separator, payload, secretKey)- Low-level signing functionverifyWithDomainSeparator(separator, publicKey, payload, signature)- Low-level verification functionVersion Management
Protocol version is extracted from package.json as major.minor only:
Examples:
0.4.3→ Domain separator contains0.40.5.0-beta.1→ Domain separator contains0.51.0.0→ Domain separator contains1.0This prevents network partitioning on bug-fix releases while maintaining protocol versioning on minor/major updates.
Migration Guide
For Signature Verification
Existing signatures created before this change will NOT verify. All agents must upgrade simultaneously or use a coordinated rollout strategy.
For Custom Signing
If you were using
signPayload()orverifySignature()directly, migrate to domain-separated versions:Before:
After:
Agent Card Capability
Agent Cards now advertise
"domain-separated-signatures"capability in the conformance block.Verification
All existing tests pass + 19 new domain separation security tests covering cross-context replay attack prevention.
eb4863f: feat: domain-separated signing, header-only auth, world ledger
eb4863f: feat: add world type system — programmatic and hosted world modes
Extends WorldManifest with structured rules, actions schema, host info, and lifecycle config.
Extends WorldConfig with worldType and host agent fields.
createWorldServer auto-injects host info on join for hosted worlds.