Repository navigation
SDK: remove unused Transport V1 code - #1650
Merged
Merged
Conversation
Contributor
|
Maple development preview: https://b64967b4.maple-ca8.pages.dev Commit: Uses development API, billing, flags and PCR configuration. Cloudflare Access applies. |
Both SDKs have used only Transport V2 since 4.0.0, but each still carried the V1 handshake and session code beside it. The backend is dropping Transport V1, so none of it can work again. TypeScript: removes keyExchange, the getAttestation handshake module, the per-message encryption module, the V1 recovery classifier, an unused barrel, and their tests. Nothing reachable from the package entry point changes: the built package has the same 70 runtime exports and the same exported declarations. @stablelib/random had no other importer and leaves the manifest; the lockfile loses exactly that entry. verifyAttestation and fetchAttestationDocument stay. Nothing in this repository calls them, but they verify the public attestation document, which the backend still serves, and deployment checks import them by path. Rust: removes the V1 request, response and session types, the key-exchange and session-key helpers in crypto, the session slot on SessionManager, and Error::KeyExchange, with the three match arms in the Agent and the Research shell that named it. These were public, so the next maple-sdk publication has to be a major version. No version is bumped here. Co-Authored-By: Claude <noreply@anthropic.com>
AnthonyRonning
force-pushed
the
remove-sdk-v1-leftovers
branch
from
November 19, 2026 17:17
67b8281 to
067b57c
Compare
This branch was successfully deployed
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.
Removes the Transport V1 code both SDKs still carried. Follows #1647, which removes Transport V1 from the backend, and #1649, which removes Research's V1 sign-in bundle.
Both SDKs have used only Transport V2 since 4.0.0. The V1 handshake and session code stayed beside it, called by nothing but its own tests.
TypeScript
Removed:
keyExchange(POST /key_exchange) and thegetAttestationhandshake module, with its session-key and session-id handling.recovery.ts, which lost its only caller when the SDK moved to V2), and an unusedtransportV2/index.tsbarrel./key_exchangecall, and its entry inbuild-sdk-publish.sh.@stablelib/random, which had no other importer.sdk/bun.lockloses exactly that entry.The published API does not change. The built package has the same 70 runtime exports and the same exported declarations as before. The
Attestationtype that the providers return moved toattestation.tswith the same shape.Kept on purpose:
verifyAttestationandfetchAttestationDocument. Nothing in this repository calls them, but they fetch and verify the public attestation document atGET /attestation/{nonce}, which the backend still serves, and deployment checks import them by source path. Each now has a comment saying so.getAttestationDocumentand the cleanup of old V1 tokens fromlocalStorageare untouched.Rust
Removed, all previously public:
Error::KeyExchangeKeyExchangeRequest,KeyExchangeResponse,EncryptedRequest,EncryptedResponse<T>,SessionStatecrypto::{perform_key_exchange, perform_static_key_exchange, generate_ephemeral_keypair, generate_static_keypair, decrypt_session_key, encrypt_data, decrypt_data, encrypt_message, decrypt_message}SessionManager::{set_session, get_session, clear_session}The Agent and the Research native shell each matched on
Error::KeyExchangewhen labelling errors; those three arms go with it.This is a breaking change for the
maple-sdkcrate, so its next publication has to be a major version. No version is bumped here, in line with preparing SDK versions in their own PR, and nothing in the SDK lanes checks API compatibility, so that has to be remembered by whoever prepares the release. In-tree consumers build from source and are already updated.Kept:
AttestationRequest/AttestationResponse(they describe the public attestation document) and thecryptohelpers the Agent's V2 fixtures and the push tests use.Checked locally
sdk-ts: install, audit, format, build, 302 tests and pack pass. Its last step, the package-consumer check, cannot run inside the SDK shell on this Mac; run from a shell with a working Python it passes (ESM, CommonJS, UMD, Bundler and NodeNext consumers, 70 runtime exports).sdk-rust: format, Clippy, 132 tests and docs pass, and the crate packages and validates.proxy: passes, 41 tests.research-web: lint, typecheck, 1,202 tests and build pass.cargo test --all-targetspass (93 tests).just ci-lintandjust ci-testpass (931 and 1,511 tests in the two main suites), andagent-macosClippy passes.os-sdk-e2esteps on free local ports, against this branch's backend: the TypeScript SDK's 87 integration tests and the Rust SDK's integration tests, including the native-handoff round trip, pass.Not run locally: the Linux and Windows Agent lanes. CI covers those.
One thing unrelated to this change:
github.com/microsoft/onnxruntimereturned 404 while I was testing, for the repository itself as well as the pinned 1.23.2 archive that the Research provider scripts download. A fresh checkout cannot run the Research Rust tests while that lasts. I used an already-downloaded copy, which the provider verified against its pinned hash. Ifresearch-rustfails here in CI at that download, that is why.Merge note
This touches
scripts/ci/build-sdk-publish.sh, so keep it out of the window between a Research version bump and its release.🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.