Skip to content

SDK: remove unused Transport V1 code - #1650

Merged
AnthonyRonning merged 1 commit into
masterfrom
remove-sdk-v1-leftovers
Nov 19, 2026
Merged

AnthonyRonning merged 1 commit into
masterfrom
remove-sdk-v1-leftovers

Conversation

@AnthonyRonning

@AnthonyRonning AnthonyRonning commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

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 the getAttestation handshake module, with its session-key and session-id handling.
  • The per-message encryption module, the V1 recovery classifier (recovery.ts, which lost its only caller when the SDK moved to V2), and an unused transportV2/index.ts barrel.
  • Their tests, including the opt-in live test that asserted a /key_exchange call, and its entry in build-sdk-publish.sh.
  • @stablelib/random, which had no other importer. sdk/bun.lock loses 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 Attestation type that the providers return moved to attestation.ts with the same shape.

Kept on purpose: verifyAttestation and fetchAttestationDocument. Nothing in this repository calls them, but they fetch and verify the public attestation document at GET /attestation/{nonce}, which the backend still serves, and deployment checks import them by source path. Each now has a comment saying so. getAttestationDocument and the cleanup of old V1 tokens from localStorage are untouched.

Rust

Removed, all previously public:

  • Error::KeyExchange
  • KeyExchangeRequest, KeyExchangeResponse, EncryptedRequest, EncryptedResponse<T>, SessionState
  • crypto::{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::KeyExchange when labelling errors; those three arms go with it.

This is a breaking change for the maple-sdk crate, 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 the crypto helpers 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.
  • Research native shell: format, locked metadata and cargo test --all-targets pass (93 tests).
  • Agent: just ci-lint and just ci-test pass (931 and 1,511 tests in the two main suites), and agent-macos Clippy passes.
  • The os-sdk-e2e steps 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/onnxruntime returned 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. If research-rust fails 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


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Maple development preview: https://b64967b4.maple-ca8.pages.dev

Commit: 067b57cd7de02cab2b6468fa16362820a8b90a7f

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
AnthonyRonning force-pushed the remove-sdk-v1-leftovers branch from 67b8281 to 067b57c Compare November 19, 2026 17:17
@AnthonyRonning
AnthonyRonning merged commit 987100c into master Nov 19, 2026
29 checks passed
@AnthonyRonning
AnthonyRonning deleted the remove-sdk-v1-leftovers branch November 19, 2026 19:54

This branch was successfully deployed

1 active deployment
pages-pr-1650 — 067b57cd Deployed Nov 19, 2026 by github-actions[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant