F2-01
May 9, 2026 · View on GitHub
Objective
Define the operational parity contract between the TypeScript SDK in sdk/ and the Python SDK in sdk-python/.
This document is the source of truth for answering:
- What parity means in this repository.
- Which capabilities are already equivalent.
- Which checks are required before calling the SDKs "at parity".
- Which gaps remain open after functional parity is reached.
Scope of Parity
Parity in this project is defined across four dimensions:
-
API surface parity The two SDKs expose equivalent capability families, even if language idioms differ (
camelCasevssnake_case). -
Behavioral parity Equivalent inputs must produce equivalent RFC-001 behavior.
-
Interoperability parity Shared fixtures, canonical timestamps, and canonical
documentRefgeneration must agree across both SDKs. -
Quality-gate parity Each SDK must be protected by stack-appropriate CI, tests, conformance, and smoke validation.
Canonical Local Commands
TypeScript SDK
cd sdk
npm test
npm run build
Python SDK
cd sdk-python
python -m pip install -e ".[dev]"
python -m ruff check src/ tests/ scripts/
python -m mypy --strict src/
python -m pytest tests/ -q
python scripts/conformance_rfc001.py
Monorepo Convenience Wrappers
These wrappers exist for convenience only and do not replace the canonical Python workflow:
npm run python:install-dev
npm run python:test
npm run python:conformance
Shared Interoperability Artifacts
The following files define the cross-language contract:
fixtures/interop-vectors.jsonfixtures/canonical-document-reference.json
They are consumed by:
sdk/tests/InteropVectors.test.tssdk/tests/crypto.test.tssdk-python/tests/test_interop_vectors.pysdk-python/tests/test_crypto.py
Parity Matrix
| Capability Family | TypeScript Reference | Python Reference | Status | Notes |
|---|---|---|---|---|
| Package entrypoint | sdk/src/index.ts | sdk-python/src/agent_did_sdk/__init__.py | ✅ | Public surface intentionally mirrors capability families, not language syntax. |
| Identity creation | AgentIdentity.create | AgentIdentity.create | ✅ | Same RFC-001 lifecycle role. |
| Message signing | signMessage | sign_message | ✅ | Ed25519 in both SDKs. |
| Message verification | verifySignature | verify_signature | ✅ | Revocation-aware in both SDKs. |
| HTTP signing | signHttpRequest | sign_http_request | ✅ | Shared Bot Auth model. |
| HTTP verification | verifyHttpRequestSignature | verify_http_request_signature | ✅ | Shared header semantics and interop vectors. |
| DID resolution | resolve | resolve | ✅ | Resolver abstraction aligned. |
| DID revocation | revokeDid | revoke_did | ✅ | Registry-backed and history-aware. |
| DID update | updateDidDocument | update_did_document | ✅ | Preserves DID and updates metadata. |
| Verification key rotation | rotateVerificationMethod | rotate_verification_method | ✅ | Active authentication key switches to the latest key. |
| Document history | getDocumentHistory | get_document_history | ✅ | Same lifecycle events tracked. |
| In-memory resolver | InMemoryDIDResolver | InMemoryDIDResolver | ✅ | Testing/local reference implementation. |
| Universal resolver | UniversalResolverClient | UniversalResolverClient | ✅ | Cache, registry lookup, document source, fallback. |
| HTTP DID document source | HttpDIDDocumentSource | HttpDIDDocumentSource | ✅ | SSRF-sensitive paths covered in tests. |
| JSON-RPC DID document source | JsonRpcDIDDocumentSource | JsonRpcDIDDocumentSource | ✅ | Failover and validation present in both SDKs. |
| In-memory registry | InMemoryAgentRegistry | InMemoryAgentRegistry | ✅ | Same lifecycle semantics. |
| EVM registry adapter | EvmAgentRegistry + ethers client | EvmAgentRegistry + web3 client | ✅ | Client library differs, capability family is equivalent. |
| Time normalization | normalizeTimestampToIso | normalize_timestamp_to_iso | ✅ | Canonical UTC millisecond format now aligned. |
| Canonical document hashing | generateCanonicalDocumentHash (internal helper path) | generate_canonical_document_hash (internal helper path) | ✅ | Deterministic documentRef agreement now enforced by shared fixtures. |
| Shared conformance suite | scripts/conformance-rfc001.js | sdk-python/scripts/conformance_rfc001.py | ✅ | Both report 11/11 MUST and 5/5 SHOULD. |
| Shared interoperability fixtures | Root fixtures/ | Root fixtures/ | ✅ | Single source of truth for cross-language parity. |
| CI protection | .github/workflows/ci.yml | .github/workflows/ci-python.yml | ✅ | Separate pipelines; equivalent intent. |
Quality Gates Required for Parity
TypeScript
npm --prefix sdk testnpm --prefix sdk run build- RFC-001 conformance through the repo root workflow
Python
python -m ruff check src/ tests/ scripts/python -m mypy --strict src/python -m pytest tests/ -qpython scripts/conformance_rfc001.py- Python smoke suite in
.github/workflows/ci-python.yml
Cross-SDK
- Shared fixture verification must pass in both SDKs.
- Equivalent DID documents must yield the same canonical
documentRef. - Timestamp normalization must converge to the same serialized UTC output.
Explicit Sprint 1 Interop Evidence
For the 1.0.0 release train, the cross-SDK evidence path is now explicit instead of implicit:
npm run interop:tsruns the TypeScript shared-fixture verification path for message signatures, HTTP signatures, and canonicaldocumentRefagreement.npm run interop:pythonruns the Python shared-fixture verification path for message signatures, HTTP signatures, and canonicaldocumentRefagreement..github/workflows/ci-cross-sdk-interop.ymlexposes that evidence as a dedicated release-critical workflow rather than relying on broad SDK test suites alone.
Current Status
Achieved
- Functional parity is implemented.
- Canonical
documentRefgeneration is aligned. - Timestamp normalization is aligned.
- Shared interoperability fixtures are active.
- TypeScript and Python both pass their relevant validation suites.
- Python CI remains separate, but no longer weaker in intent than TypeScript CI.
Remaining Non-Blocking Gaps
-
Public export symmetry is not fully literal. Some canonicalization helpers are used as internal contract helpers rather than promoted API surface in both languages.
-
Documentation parity outside the core SDK tracks is still evolving. Integration docs that were written when Python was still roadmap-first may still need language updates.
-
Release-process parity should be formalized further. The repository now has quality parity, but a single release checklist spanning npm and Python packaging would still improve consistency.
Definition of Done
TS ↔ Python parity is considered maintained when all of the following remain true:
- The parity matrix above remains accurate.
- Shared fixtures continue to pass in both SDKs.
- Both CI workflows remain green on relevant changes.
- New RFC-001 capabilities are added to both SDKs or explicitly documented as exceptions.
- Documentation does not describe the Python SDK as future work when the capability already exists.
Recommended Follow-Up
- Add this matrix to release review for SDK changes via
docs/SDK-Release-Checklist.md. - Extend the same parity discipline to future Python integrations.
- Keep the release checklist aligned with CI and packaging changes.