Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

English | 简体中文 | 繁體中文 | 日本語 | Español | Français | Deutsch

MissionWeaveProtocol Java SDK

The official Java 21 SDK for validating, canonicalizing, signing, and testing MissionWeaveProtocol 0.1 data.

Conformance claim: schema-and-vector conformance only. The SDK does not claim complete runtime protocol conformance.

Requirements and dependency

  • Java 21
  • Maven 3.9 or the included Maven Wrapper
<dependency>
  <groupId>org.missionweaveprotocol</groupId>
  <artifactId>missionweaveprotocol-sdk</artifactId>
  <version>0.1.0-SNAPSHOT</version>
</dependency>

Protocol compatibility

Item Pinned value
SDK coordinates org.missionweaveprotocol:missionweaveprotocol-sdk:0.1.0-SNAPSHOT
Protocol version 0.1
Wire namespace missionweaveprotocol
Protocol commit 27c9f5c80cdcc1bd2179aae6247426f59e833525
JSON Schemas 21
Conformance vectors 56: 26 valid and 30 invalid
Cryptography evaluations 62

The JAR contains the complete offline bundle. PROTOCOL_PIN.json records its source, file counts, and SHA-256 tree digests.

Capabilities

  • StrictJson rejects duplicate object members, invalid UTF-8, and trailing data at the trust boundary.
  • SchemaCatalog compiles the 21 Draft 2020-12 schemas into a fully offline registry with format assertions enabled.
  • FrameCodec strictly decodes, validates, and canonically encodes generic MissionWeaveProtocol WebSocket frames; it does not create a connection.
  • CanonicalJson provides RFC 8785 JCS and SHA-256 identifiers.
  • Ed25519, Base64Url, and DocumentSignatures provide JDK Ed25519 signing, unpadded base64url, and top-level signature omission.
  • SignedDocumentCodec applies the complete six-stage Signed Document profile. A KeyResolver receives a KeyResolutionRequest and returns a KeyRegistrySnapshot created with KeyRegistrySnapshot.organizationWide(registryBytes) and containing complete Registry bytes, not a selected ResolvedKey.
  • ORGANIZATION_WIDE is a trusted adapter assertion, not a completeness proof. It states that those bytes cover one coherent, authoritative Registry revision applicable to the verification decision for one Organization-controlled Agent Registry, including all Organization-wide bindings and its complete retained validity history. request.keyId() is routing context only and must never filter the Registry or return a partial projection.
  • The codec treats the bytes as untrusted and validates every binding, global no-reuse and no-alias invariants, and complete validity history before selecting the key. PARTIAL, UNSPECIFIED, null, empty, unavailable, or malformed evidence fails closed at key resolution; codec-produced evidence retains organizationId.
  • ConformanceRunner and ConformanceCli run all 56 packaged vectors.

Quick start

import java.nio.charset.StandardCharsets;
import org.missionweaveprotocol.sdk.FrameCodec;

public final class QuickStart {
  public static void main(String[] args) throws Exception {
    byte[] incoming = """
        {
          "protocolVersion": "0.1",
          "frameId": "urn:uuid:00000000-0000-4000-8000-000000000010",
          "frameType": "PING",
          "nonce": "cGluZw",
          "sentAt": "2026-07-17T08:00:00Z"
        }
        """.getBytes(StandardCharsets.UTF_8);

    FrameCodec codec = new FrameCodec();
    var frame = codec.decode(incoming);
    byte[] canonical = codec.encode(frame);

    System.out.println(frame.get("frameType").textValue());
    System.out.println(new String(canonical, StandardCharsets.UTF_8));
  }
}

For durable signed objects, call SignedDocumentCodec.sign(kind, unsigned, signingKey) and verify(kind, receivedBytes, keyResolver). The codec never infers the kind and returns immutable verification evidence including the received bytes, the signing bytes and their hash, and the complete canonical bytes and their hash.

Runnable examples

The build compiles and tests all three repository examples:

./mvnw -q -Dexec.classpathScope=test \
  -Dexec.mainClass=org.missionweaveprotocol.examples.ValidateAndSignExample \
  exec:java

./mvnw -q -Dexec.classpathScope=test \
  -Dexec.mainClass=org.missionweaveprotocol.examples.FrameRoundTripExample \
  exec:java

./mvnw -q -Dexec.classpathScope=test \
  -Dexec.mainClass=org.missionweaveprotocol.examples.RunConformanceExample \
  exec:java

Conformance runner

Run the packaged vectors or a separate protocol bundle:

./mvnw -q \
  -Dexec.mainClass=org.missionweaveprotocol.sdk.cli.ConformanceCli \
  exec:java

./mvnw -q \
  -Dexec.mainClass=org.missionweaveprotocol.sdk.cli.ConformanceCli \
  -Dexec.args="--root ../missionweaveprotocol" \
  exec:java

The packaged result is 56/56 conformance vectors passed.

Documentation

Security and behavioral boundaries

  • Schema validation checks document shape and formats. It does not grant authority, authenticate an Agent, or prove that an action is allowed.
  • Signature helpers do not provide key trust, storage, discovery, revocation, timestamp policy, replay prevention, or session and membership fencing.
  • FrameCodec is a serializer, not a transport, coordinator, worker scheduler, durable store, retry engine, or state-machine implementation.
  • A 56/56 result demonstrates schema-and-vector conformance only; it does not establish interoperability, complete behavior, security, or production readiness.

Development

python3 scripts/check_repository_policy.py
python3 scripts/check_documentation.py
./mvnw -B -ntp verify
scripts/smoke_install.sh

Without a local JDK or Maven installation:

docker run --rm \
  -v missionweaveprotocol-java-m2:/root/.m2 \
  -v "$PWD":/workspace \
  -w /workspace \
  maven:3.9.11-eclipse-temurin-21 \
  ./mvnw -B -ntp verify

License

Apache-2.0. See LICENSE.