Skip to content

Rename Sandbox Token Source to Development Token Source - #994

Open
MaxHeimbrock wants to merge 4 commits into
mainfrom
development-token-source
Open

Rename Sandbox Token Source to Development Token Source#994
MaxHeimbrock wants to merge 4 commits into
mainfrom
development-token-source

Conversation

@MaxHeimbrock

@MaxHeimbrock MaxHeimbrock commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Aligns with the cross-SDK rename of the sandbox token source to development token source (client-sdk-js#2032, client-sdk-swift#1077, client-sdk-unity#366).

SandboxTokenServerOptions is kept as a deprecated typealias of DevelopmentTokenServerOptions and fromSandboxTokenServer delegates to the new factory, so existing code keeps compiling. The wire protocol (endpoint URL and X-Sandbox-ID header) is unchanged. Also adds a Token sources section to the README.

Picked up in #995

…fromSandboxTokenServer

Aligns with the cross-SDK rename of the sandbox token source to
development token source (client-sdk-js#2032, client-sdk-swift#1077,
client-sdk-unity#366). SandboxTokenServerOptions is kept as a deprecated
typealias of DevelopmentTokenServerOptions and fromSandboxTokenServer
delegates to the new factory, so existing code keeps compiling. The wire
protocol (endpoint URL and X-Sandbox-ID header) is unchanged. Also adds
a Token sources section to the README.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Aug 4, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 4973d87

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
client-sdk-android Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@MaxHeimbrock
MaxHeimbrock marked this pull request as ready for review August 4, 2026 15:30
devin-ai-integration[bot]

This comment was marked as resolved.

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Diffuse output:

OLD: diffuse-source-file
NEW: livekit-android-sdk-release.aar

 AAR      │ old      │ new      │ diff     
──────────┼──────────┼──────────┼──────────
      jar │  2.7 MiB │  2.7 MiB │ +1.8 KiB 
 manifest │  1.5 KiB │  1.5 KiB │      0 B 
 lint-jar │ 12.7 KiB │ 12.7 KiB │      0 B 
    other │  1.9 KiB │  1.9 KiB │      0 B 
──────────┼──────────┼──────────┼──────────
    total │  2.7 MiB │  2.7 MiB │ +1.8 KiB 

 JAR     │ old   │ new   │ diff         
─────────┼───────┼───────┼──────────────
 classes │  1510 │  1511 │  +1 (+2 -1)  
 methods │ 20253 │ 20265 │ +12 (+17 -5) 
  fields │  5202 │  5203 │  +1 (+3 -2)
AAR
 size    │ diff     │ path          
─────────┼──────────┼───────────────
 2.7 MiB │ +1.8 KiB │ ∆ classes.jar 
─────────┼──────────┼───────────────
 2.7 MiB │ +1.8 KiB │ (total)
JAR
CLASSES:

   old  │ new  │ diff       
  ──────┼──────┼────────────
   1510 │ 1511 │ +1 (+2 -1) 
  
  + io.livekit.android.token.DevelopmentTokenServerOptions
  + io.livekit.android.token.DevelopmentTokenSource
  
  - io.livekit.android.token.SandboxTokenSource
  

METHODS:

   old   │ new   │ diff         
  ───────┼───────┼──────────────
   20253 │ 20265 │ +12 (+17 -5) 
  
  + io.livekit.android.token.DevelopmentTokenServerOptions <init>()
  + io.livekit.android.token.DevelopmentTokenServerOptions <init>(String)
  + io.livekit.android.token.DevelopmentTokenServerOptions <init>(String, int, DefaultConstructorMarker)
  + io.livekit.android.token.DevelopmentTokenServerOptions component1() → String
  + io.livekit.android.token.DevelopmentTokenServerOptions copy(String) → DevelopmentTokenServerOptions
  + io.livekit.android.token.DevelopmentTokenServerOptions copy_default(DevelopmentTokenServerOptions, String, int, Object) → DevelopmentTokenServerOptions
  + io.livekit.android.token.DevelopmentTokenServerOptions equals(Object) → boolean
  + io.livekit.android.token.DevelopmentTokenServerOptions getBaseUrl() → String
  + io.livekit.android.token.DevelopmentTokenServerOptions hashCode() → int
  + io.livekit.android.token.DevelopmentTokenServerOptions toString() → String
  + io.livekit.android.token.DevelopmentTokenSource <init>(String, DevelopmentTokenServerOptions)
  + io.livekit.android.token.DevelopmentTokenSource fetch-gIAlu-s(TokenRequestOptions, Continuation) → Object
  + io.livekit.android.token.DevelopmentTokenSource getHeaders() → Map
  + io.livekit.android.token.DevelopmentTokenSource getMethod() → String
  + io.livekit.android.token.DevelopmentTokenSource getUrl() → URL
  + io.livekit.android.token.TokenSource_Companion fromDevelopmentTokenServer(String, DevelopmentTokenServerOptions) → ConfigurableTokenSource
  + io.livekit.android.token.TokenSource_Companion fromDevelopmentTokenServer_default(TokenSource_Companion, String, DevelopmentTokenServerOptions, int, Object) → ConfigurableTokenSource
  
  - io.livekit.android.token.SandboxTokenSource <init>(String, SandboxTokenServerOptions)
  - io.livekit.android.token.SandboxTokenSource fetch-gIAlu-s(TokenRequestOptions, Continuation) → Object
  - io.livekit.android.token.SandboxTokenSource getHeaders() → Map
  - io.livekit.android.token.SandboxTokenSource getMethod() → String
  - io.livekit.android.token.SandboxTokenSource getUrl() → URL
  

FIELDS:

   old  │ new  │ diff       
  ──────┼──────┼────────────
   5202 │ 5203 │ +1 (+3 -2) 
  
  + io.livekit.android.token.DevelopmentTokenServerOptions baseUrl: String
  + io.livekit.android.token.DevelopmentTokenSource headers: Map
  + io.livekit.android.token.DevelopmentTokenSource url: URL
  
  - io.livekit.android.token.SandboxTokenSource headers: Map
  - io.livekit.android.token.SandboxTokenSource url: URL

MaxHeimbrock and others added 2 commits August 5, 2026 10:09
…ibility

A typealias only exists at compile time, so the JVM class shipped in
v2.21.0-v2.27.0 would disappear from the artifact, breaking already
compiled apps and Java consumers. Restoring the data class (and the
original fromSandboxTokenServer signature) preserves the released ABI.
Also adds the KDoc required for public APIs to the deprecated members.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 new potential issue.

View 2 additional findings in Devin Review.

Open in Devin Review

* @see fromDevelopmentTokenServer
*/
@Suppress("DEPRECATION")
@Deprecated("Use fromDevelopmentTokenServer instead", ReplaceWith("fromDevelopmentTokenServer(sandboxId, options)"))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Automated migration hint for the old token helper produces code that does not compile

The suggested automatic replacement text attached to the old helper (ReplaceWith("fromDevelopmentTokenServer(sandboxId, options)") at livekit-android-sdk/src/main/java/io/livekit/android/token/TokenSource.kt:222) passes along the old options object, which the new helper does not accept, so applying the IDE's one-click migration leaves users with broken code.
Impact: Developers who accept the suggested upgrade get a build error instead of a working migration.

Type mismatch between old and new options types in ReplaceWith

fromDevelopmentTokenServer takes DevelopmentTokenServerOptions, while the deprecated fromSandboxTokenServer parameter options is of type SandboxTokenServerOptions (livekit-android-sdk/src/main/java/io/livekit/android/token/EndpointTokenSource.kt:64-66). The ReplaceWith expression forwards options unchanged, so the produced call is type-incorrect. The same problem exists for the class-level hint ReplaceWith("DevelopmentTokenServerOptions(baseUrl)") at livekit-android-sdk/src/main/java/io/livekit/android/token/EndpointTokenSource.kt:63, which is not a valid replacement for a type reference.

Suggested change
@Deprecated("Use fromDevelopmentTokenServer instead", ReplaceWith("fromDevelopmentTokenServer(sandboxId, options)"))
@Deprecated("Use fromDevelopmentTokenServer instead", ReplaceWith("fromDevelopmentTokenServer(sandboxId, DevelopmentTokenServerOptions(options.baseUrl))"))
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

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