diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fa08d79..08100c4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ jobs: lint: timeout-minutes: 10 name: lint - runs-on: ${{ github.repository == 'stainless-sdks/steel-python' && '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: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 @@ -44,7 +44,7 @@ jobs: permissions: contents: read id-token: write - runs-on: ${{ github.repository == 'stainless-sdks/steel-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} + runs-on: ${{ startsWith(github.repository, 'stainless-sdks/') && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 @@ -84,7 +84,7 @@ jobs: test: timeout-minutes: 10 name: test - runs-on: ${{ github.repository == 'stainless-sdks/steel-python' && '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 steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 diff --git a/.release-please-manifest.json b/.release-please-manifest.json index e756293..0c2ecec 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.19.0" + ".": "0.20.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 1107fef..236afc9 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 39 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/nen-labs/steel-7dfdbffbc4a1b1f44637815cabdc6831ab00a3bbf5157cec73107b5f9d6be8df.yml -openapi_spec_hash: 8d63332328e084a1f1be8d643ceaa685 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/nen-labs/steel-ce5d1b98232bff8090133e02e6421e8d559fed0386f9c83f3ad501ca173527aa.yml +openapi_spec_hash: aba12d36d6d1be379bee50d4d9545247 config_hash: dce4dea59023b0a00890fa654fbfffb4 diff --git a/CHANGELOG.md b/CHANGELOG.md index 579fc6c..f8b2146 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## 0.20.0 (2026-08-20) + +Full Changelog: [v0.19.0...v0.20.0](https://github.com/steel-dev/steel-python/compare/v0.19.0...v0.20.0) + +### Features + +* **api:** api update ([879f6dc](https://github.com/steel-dev/steel-python/commit/879f6dcfb4d245beee7b46a75d4701193d91fb58)) +* **stlc:** configurable CI runner and private-production-repo support in workflow templates ([837c9ae](https://github.com/steel-dev/steel-python/commit/837c9ae8c741960dc8fac522a738fc352124da93)) + + +### Chores + +* **internal:** allow the mock server port to be set with STAINLESS_MOCK_PORT ([213dcea](https://github.com/steel-dev/steel-python/commit/213dcea7ab877262c656780e437ea9ce44c68331)) + ## 0.19.0 (2026-06-23) Full Changelog: [v0.18.0...v0.19.0](https://github.com/steel-dev/steel-python/compare/v0.18.0...v0.19.0) diff --git a/pyproject.toml b/pyproject.toml index 4ecb2fe..800c788 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "steel-sdk" -version = "0.19.0" +version = "0.20.0" description = "The official Python library for the steel API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/scripts/mock b/scripts/mock index feebe5e..984e1c0 100755 --- a/scripts/mock +++ b/scripts/mock @@ -4,6 +4,11 @@ set -e cd "$(dirname "$0")/.." +if [ "$1" == "--install" ]; then + npm exec --package=@stdy/cli@0.22.1 -- steady --version + exit 0 +fi + if [[ -n "$1" && "$1" != '--'* ]]; then URL="$1" shift @@ -20,16 +25,18 @@ fi echo "==> Starting mock server with URL ${URL}" # Run steady mock on the given spec +MOCK_PORT="${STAINLESS_MOCK_PORT:-4010}" + if [ "$1" == "--daemon" ]; then # Pre-install the package so the download doesn't eat into the startup timeout npm exec --package=@stdy/cli@0.22.1 -- steady --version - npm exec --package=@stdy/cli@0.22.1 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL" &> .stdy.log & + npm exec --package=@stdy/cli@0.22.1 -- steady --host 127.0.0.1 -p "$MOCK_PORT" --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL" &> .stdy.log & # Wait for server to come online via health endpoint (max 30s) echo -n "Waiting for server" attempts=0 - while ! curl --silent --fail "http://127.0.0.1:4010/_x-steady/health" >/dev/null 2>&1; do + while ! curl --silent --fail "http://127.0.0.1:$MOCK_PORT/_x-steady/health" >/dev/null 2>&1; do if ! kill -0 $! 2>/dev/null; then echo cat .stdy.log @@ -48,5 +55,5 @@ if [ "$1" == "--daemon" ]; then echo else - npm exec --package=@stdy/cli@0.22.1 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL" + npm exec --package=@stdy/cli@0.22.1 -- steady --host 127.0.0.1 -p "$MOCK_PORT" --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL" fi diff --git a/scripts/test b/scripts/test index 19acc91..9dbb5cd 100755 --- a/scripts/test +++ b/scripts/test @@ -9,8 +9,10 @@ GREEN='\033[0;32m' YELLOW='\033[0;33m' NC='\033[0m' # No Color +MOCK_PORT="${STAINLESS_MOCK_PORT:-4010}" + function steady_is_running() { - curl --silent "http://127.0.0.1:4010/_x-steady/health" >/dev/null 2>&1 + curl --silent "http://127.0.0.1:$MOCK_PORT/_x-steady/health" >/dev/null 2>&1 } kill_server_on_port() { @@ -27,7 +29,7 @@ function is_overriding_api_base_url() { if ! is_overriding_api_base_url && ! steady_is_running ; then # When we exit this script, make sure to kill the background mock server process - trap 'kill_server_on_port 4010' EXIT + trap 'kill_server_on_port "$MOCK_PORT"' EXIT # Start the dev server ./scripts/mock --daemon @@ -43,7 +45,7 @@ elif ! steady_is_running ; then echo -e "To run the server, pass in the path or url of your OpenAPI" echo -e "spec to the steady command:" echo - echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.22.1 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=brackets --validator-form-object-format=brackets${NC}" + echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.22.1 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p $MOCK_PORT --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=brackets --validator-form-object-format=brackets${NC}" echo exit 1 @@ -52,6 +54,10 @@ else echo fi +if [ -n "${STAINLESS_MOCK_PORT:-}" ] && ! is_overriding_api_base_url ; then + export TEST_API_BASE_URL="http://127.0.0.1:$MOCK_PORT" +fi + export DEFER_PYDANTIC_BUILD=false echo "==> Running tests" diff --git a/src/steel/_version.py b/src/steel/_version.py index c951ee8..1f5d3f3 100644 --- a/src/steel/_version.py +++ b/src/steel/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "steel" -__version__ = "0.19.0" # x-release-please-version +__version__ = "0.20.0" # x-release-please-version diff --git a/src/steel/types/session.py b/src/steel/types/session.py index b5b6150..24aacb7 100644 --- a/src/steel/types/session.py +++ b/src/steel/types/session.py @@ -87,6 +87,9 @@ class Session(BaseModel): id: str """Unique identifier for the session""" + browser_mode: Literal["stealth", "standard", "unknown"] = FieldInfo(alias="browserMode") + """Browser mode used for this session.""" + created_at: datetime = FieldInfo(alias="createdAt") """Timestamp when the session started""" @@ -159,24 +162,7 @@ class Session(BaseModel): project_id: Optional[str] = FieldInfo(alias="projectId", default=None) """The project associated with the session""" - region: Optional[ - Literal[ - "lax", - "ord", - "iad", - "scl", - "fra", - "nrt", - "us-east", - "us-west", - "us-central", - "eu-west", - "eu-central", - "ap-northeast", - "ap-southeast", - "sa-east", - ] - ] = None + region: Optional[str] = None """The region where the session was created.""" release_reason: Optional[ diff --git a/src/steel/types/sessionslist.py b/src/steel/types/sessionslist.py index 90ba256..b6a4ae3 100644 --- a/src/steel/types/sessionslist.py +++ b/src/steel/types/sessionslist.py @@ -95,6 +95,9 @@ class Session(BaseModel): id: str """Unique identifier for the session""" + browser_mode: Literal["stealth", "standard", "unknown"] = FieldInfo(alias="browserMode") + """Browser mode used for this session.""" + created_at: datetime = FieldInfo(alias="createdAt") """Timestamp when the session started""" @@ -167,24 +170,7 @@ class Session(BaseModel): project_id: Optional[str] = FieldInfo(alias="projectId", default=None) """The project associated with the session""" - region: Optional[ - Literal[ - "lax", - "ord", - "iad", - "scl", - "fra", - "nrt", - "us-east", - "us-west", - "us-central", - "eu-west", - "eu-central", - "ap-northeast", - "ap-southeast", - "sa-east", - ] - ] = None + region: Optional[str] = None """The region where the session was created.""" release_reason: Optional[