Skip to content

fix(limrun): attribute API-key traffic with the SDK userAgent option - #3679

Merged
thymikee merged 2 commits into
mainfrom
fix/limrun-sdk-user-agent
Oct 15, 2026
Merged

thymikee merged 2 commits into
mainfrom
fix/limrun-sdk-user-agent

Conversation

@thymikee

@thymikee thymikee commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Summary

Upgrade @limrun/api to 0.64.1 and use its new userAgent client option (limrun-inc/typescript-sdk#546) in place of the per-request User-Agent override on instance creation. Requests made with the Limrun API key now start their User-Agent with agent-device-cli/<version>, ahead of the SDK's own Limrun/JS <sdk-version>. This covers creating, listing, and deleting instances, uploading assets, and connect verification.

  • limrunUserAgent(clientVersion) in client-options.ts builds the value for both API-key clients: the runtime and connect verification.
  • client-options.test.ts drives the real SDK through a fetch stub and asserts the prefix reaches the wire. The old allocation test duplicated the cleanup coverage in limrun-runtime.test.ts, so it is removed.
  • Docs updated in website/docs/docs/limrun.md.
  • chore(gates) adds a minimumReleaseAgeExclude entry for @limrun/api@0.64.1, published today.

13 files.

Validation

Head 1cd2ce113: pnpm check:affected --run, all runnable checks passed. Fresh-context review found one issue (the test no longer covered attribution), which is now fixed.

Wire check: the real runtime and SDK sent to a local HTTP server:

base 35c21b618 (SDK 0.60.0) head 1cd2ce113 (SDK 0.64.1)
POST /v1/ios_instances agent-device-cli/<v> agent-device-cli/<v> Limrun/JS 0.64.1
DELETE /v1/ios_instances/<id> Limrun/JS 0.60.0 agent-device-cli/<v> Limrun/JS 0.64.1
GET /v1/ios_instances (connect) Limrun/JS 0.60.0 agent-device-cli/<v> Limrun/JS 0.64.1

Not live-verified: we have no confirmation yet that Limrun receives the header. The local CLI (0.21.11) and T3's bundled daemon (0.21.12) both predate attribution, which likely explains why Limrun hasn't seen it so far.

🤖 Generated with Claude Code

View guided diff Turn on auto-fix

thymikee and others added 2 commits October 15, 2026 16:15
Upgrade @limrun/api to 0.64.1 and set its new userAgent client option on
the runtime and connect-verification clients, so every request made with
the organization API key starts its User-Agent with
agent-device-cli/<version> ahead of the SDK's Limrun/JS identifier. This
replaces the per-request User-Agent override on instance creation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
0.64.1 is the first release with the userAgent client option and was
published today.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 14 files

View guided diff | Turn on auto-fix | Re-trigger cubic

@thymikee

Copy link
Copy Markdown
Member Author

This is ready. The change sets the SDK userAgent option for API-key traffic, and I found no problems at 1cd2ce1. Not blocking: limrunUserAgent is asserted with a hand-built prefix in three test files (client-options.test.ts, connection-verification.test.ts, limrun-runtime.test.ts), so the mocked constructor-option tests could assert through limrunUserAgent instead. Take it or leave it. I could not run the tests against @limrun/api 0.64.1 here, so I did not confirm the SDK's prefix-before-Limrun/JS ordering myself. I rely on the wire table and the real-SDK test in the PR. No live Limrun run is needed, since this touches no device path. CI is still queued, with nothing failed yet. Before merge, CI must pass on 1cd2ce1, especially the lockfile and install checks for the 0.64.1 bump and the minimumReleaseAgeExclude entry.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Oct 15, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Size Report

Metric Base Current Diff
Installed (including dependencies) 5.24 MB 5.24 MB +324 B
Package (unpacked) 5.24 MB 5.24 MB +324 B
Package (download) 1.57 MB 1.57 MB +93 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 27.9 ms 27.0 ms -0.9 ms
CLI --help 78.3 ms 76.6 ms -1.6 ms

@github-actions

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://callstack.github.io/agent-device/pr-preview/pr-3679/

Built to branch gh-pages at 2026-10-15 15:23 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@thymikee
thymikee merged commit 1f78c28 into main Oct 15, 2026
25 of 26 checks passed
@thymikee
thymikee deleted the fix/limrun-sdk-user-agent branch October 15, 2026 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant