Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
lint:
timeout-minutes: 10
name: lint
runs-on: ${{ github.repository == 'stainless-sdks/stagehand-csharp' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
runs-on: ${{ startsWith(github.repository, 'stainless-sdks/') && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')

steps:
Expand All @@ -37,7 +37,7 @@ jobs:
build:
timeout-minutes: 10
name: build
runs-on: ${{ github.repository == 'stainless-sdks/stagehand-csharp' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
runs-on: ${{ startsWith(github.repository, 'stainless-sdks/') && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')

steps:
Expand All @@ -54,7 +54,7 @@ jobs:
test:
timeout-minutes: 10
name: test
runs-on: ${{ github.repository == 'stainless-sdks/stagehand-csharp' && 'depot-windows-2022' || 'windows-latest' }}
runs-on: ${{ startsWith(github.repository, 'stainless-sdks/') && 'depot-windows-2022' || 'windows-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "3.21.0"
".": "3.22.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 8
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase/stagehand-c7910965e66e73ad8b65b6cc391d431094b2a6c6577c3e9d82feaa8138e74cff.yml
openapi_spec_hash: 37748bb69c22a9ce721d9b5a5861f964
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase/stagehand-64b47a6dd07208d708130e739a272f7d37d4e42494a7c8e566ef66007f8ff25f.yml
openapi_spec_hash: 4cdfcfed592c8631fbab9117bf45bb67
config_hash: 1fb12ae9b478488bc1e56bfbdc210b01
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# Changelog

## 3.22.0 (2026-07-25)

Full Changelog: [v3.21.0...v3.22.0](https://github.com/browserbase/stagehand-net/compare/v3.21.0...v3.22.0)

### Features

* [STG-2090] Add Azure Entra model auth support ([889f962](https://github.com/browserbase/stagehand-net/commit/889f962499019bbe14fbb29e2d5bf6afdf096a99))
* **server-v3:** expose OpenAI endpoint format ([eb515f8](https://github.com/browserbase/stagehand-net/commit/eb515f8aa3a8d6d508cc5e3d3c4f8e598744f57d))
* **stlc:** configurable CI runner and private-production-repo support in workflow templates ([21b8d30](https://github.com/browserbase/stagehand-net/commit/21b8d30f5b2d75636d77521c9ebe255be396a756))


### Bug Fixes

* **client:** tolerate JSON null in required untyped fields and prefer more specific union variants ([0d81242](https://github.com/browserbase/stagehand-net/commit/0d81242a3cdd1980f72b98f4758be0e11b21583e))
* **csharp:** resolve ambiguity in parsing query strings ([6a57880](https://github.com/browserbase/stagehand-net/commit/6a57880b0ecfbe79c5acc5e5a942df3d19494715))

## 3.21.0 (2026-05-29)

Full Changelog: [v3.20.0...v3.21.0](https://github.com/browserbase/stagehand-net/compare/v3.20.0...v3.21.0)
Expand Down
37 changes: 37 additions & 0 deletions src/Stagehand.Tests/Core/JsonDictionaryTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,43 @@ public void GetNotNullStruct_ThrowsWhenTypeInvalid()
Assert.Contains("'text' must be of type", exception.Message);
}

[Fact]
public void GetNotAbsentElement_ReturnsValue()
{
var dict = new JsonDictionary();
dict.Set("age", 30);

var age = dict.GetNotAbsentElement("age");

Assert.Equal(30, age.GetInt32());
}

[Fact]
public void GetNotAbsentElement_ThrowsWhenKeyAbsent()
{
var dict = new JsonDictionary();

var exception = Assert.Throws<StagehandInvalidDataException>(() =>
dict.GetNotAbsentElement("missing")
);
Assert.Contains("'missing' cannot be absent", exception.Message);
}

[Fact]
public void GetNotAbsentElement_ReturnsNullElementWhenValueIsNull()
{
var dict = new JsonDictionary(
new Dictionary<string, JsonElement>
{
["nullable"] = JsonSerializer.SerializeToElement<string?>(null),
}
);

var element = dict.GetNotAbsentElement("nullable");

Assert.Equal(JsonValueKind.Null, element.ValueKind);
}

[Fact]
public void GetNullableClass_ReturnsValueWhenPresent()
{
Expand Down
38 changes: 38 additions & 0 deletions src/Stagehand.Tests/Core/MultipartJsonDictionaryTest.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using System.Collections.Frozen;
using System.Collections.Generic;
using System.Text.Json;
using Stagehand.Core;
using Stagehand.Exceptions;

Expand Down Expand Up @@ -205,6 +206,43 @@ public void GetNotNullStruct_ThrowsWhenTypeInvalid()
Assert.Contains("'text' must be of type", exception.Message);
}

[Fact]
public void GetNotAbsentElement_ReturnsValue()
{
var dict = new MultipartJsonDictionary();
dict.Set("age", 30);

var age = dict.GetNotAbsentElement("age");

Assert.Equal(30, age.GetInt32());
}

[Fact]
public void GetNotAbsentElement_ThrowsWhenKeyAbsent()
{
var dict = new MultipartJsonDictionary();

var exception = Assert.Throws<StagehandInvalidDataException>(() =>
dict.GetNotAbsentElement("missing")
);
Assert.Contains("'missing' cannot be absent", exception.Message);
}

[Fact]
public void GetNotAbsentElement_ReturnsNullElementWhenValueIsNull()
{
var dict = new MultipartJsonDictionary(
new Dictionary<string, MultipartJsonElement>
{
["nullable"] = MultipartJsonSerializer.SerializeToElement<string?>(null),
}
);

var element = dict.GetNotAbsentElement("nullable");

Assert.Equal(JsonValueKind.Null, element.ValueKind);
}

[Fact]
public void GetNullableClass_ReturnsValueWhenPresent()
{
Expand Down
Loading
Loading