Skip to content

C# SDK v2 - #318

Draft
razor-x wants to merge 15 commits into
mainfrom
beta
Draft

C# SDK v2#318
razor-x wants to merge 15 commits into
mainfrom
beta

Conversation

@razor-x

@razor-x razor-x commented Aug 20, 2026

Copy link
Copy Markdown
Member

V2

claude and others added 15 commits August 19, 2026 18:31
… tests

Record the prerelease channel as a git note when cutting a prerelease
version, guard the release job against a bogus 1.0.0 baseline on
prerelease branches, and set up Node.js in the test job so the test
suite can run @seamapi/fake-seam-connect. Pin @seamapi/types exact for
the duration of the v2 work so the daily dependency bump does not
regenerate the SDK against a moving API spec.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UxKRzX7AFRz33NyFQgfgK9
BREAKING CHANGE: The SDK is rebuilt on the shared Seam SDK architecture
as v2. The RestSharp/Newtonsoft runtime is replaced by System.Net.Http
and System.Text.Json with no third-party dependencies, and the public
surface changes throughout.

Added
- Personal access token authentication with a workspace id, and a
  SeamWithoutWorkspaceClient for listing and creating workspaces.
- Environment configuration: SEAM_API_KEY, SEAM_PERSONAL_ACCESS_TOKEN,
  SEAM_WORKSPACE_ID, and SEAM_ENDPOINT, consulted only when no
  credential is passed explicitly.
- Token format validation with specific errors for the wrong kind of
  token.
- Static factories: SeamClient.FromApiKey, FromPersonalAccessToken, and
  FromHttpClient for a fully preconfigured client.
- Retries: idempotent requests retry twice on transport errors,
  timeouts, 429, and 5xx with exponential backoff and jitter, honoring
  Retry-After; POST and PATCH are never retried.
- seam-sdk-name and seam-sdk-version headers on every request.
- waitForActionAttempt: every endpoint returning an action attempt now
  waits for it by default (10s timeout, 1s polling), raising
  SeamActionAttemptFailedException or SeamActionAttemptTimeoutException,
  configurable per client and per call via ActionAttemptWait.
- Pagination: SeamPage, Pagination metadata, and SeamPaginator with
  FirstPageAsync, NextPageAsync, FlattenToListAsync, and IAsyncEnumerable
  iteration; paginated endpoints emit ListPageAsync and ListPager.
- A typed exception hierarchy rooted at SeamException, carrying the
  Seam error code, status code, and seam-request-id.
- CancellationToken support on every endpoint method.
- Optional<T> for nullable parameters, distinguishing omitted from an
  explicit JSON null (Null.Value).
- A test suite covering the shared SDK behavior matrix, run against
  @seamapi/fake-seam-connect.

Changed
- The client is SeamClient with a SeamClientOptions object; the raw
  HttpClient is exposed as SeamClient.Client.
- Endpoint methods are async-only and take a single request object with
  compile-time-required members; route namespaces are nested
  (seam.Acs.Users) instead of reversed flat names (UsersAcs).
- Generated code moved to src/Seam/Routes and src/Seam/Models, is
  deleted and regenerated wholesale, and unknown union variants now
  preserve their raw payload.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UxKRzX7AFRz33NyFQgfgK9
Verifies incoming webhook signatures with Svix and parses the payload
into the typed Event union, matching the SeamWebhook the other Seam
SDKs provide.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UxKRzX7AFRz33NyFQgfgK9
…tion

The other SDK suites tag fake limitations with UPSTREAM comments: the
fake rejects a personal access token on /devices/list (so those tests
use /devices/get) and still requires the deprecated connect_partner_name
when creating a workspace.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UxKRzX7AFRz33NyFQgfgK9
fake-seam-connect 2.0.5 authorizes personal access tokens on
/devices/list, so the /devices/get workaround and its UPSTREAM markers
are removed. The connect_partner_name pragma stays until the reversed
deprecation lands in a blueprint bump and the SDK is regenerated.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UxKRzX7AFRz33NyFQgfgK9
# Conflicts:
#	package-lock.json
#	package.json
#	src/Seam/Api/Events.cs
#	src/Seam/Api/Workspaces.cs
#	src/Seam/Model/AccessCode.cs
#	src/Seam/Model/Device.cs
#	src/Seam/Model/UnmanagedAccessCode.cs
#	src/Seam/Model/UnmanagedDevice.cs
#	src/Seam/Model/Workspace.cs
#	src/Seam/Seam.csproj
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.

3 participants