Refresh generated Python app-server SDK types (#18862)

This is the first step in splitting the Python SDK PyPI publish work
into reviewable layers: land the generated SDK refresh by itself before
changing packaging mechanics. The next PRs will make the runtime wheel
publishable, then wire the SDK package/version pinning to that runtime.

## Summary
- Refresh generated Python app-server v2 models and notification
registry from the current schema.
- Update the public API signature expectations for the newly generated
kwargs.

## Stack
- PR 1 of 3 for the Python SDK PyPI publishing split.
- Follow-up PRs will handle runtime wheel publishing mechanics, then
SDK/package version pinning.

## Tests
- `uv run --extra dev pytest` in `sdk/python` -> 51 passed, 37 skipped.
This commit is contained in:
Steve Coffey
2026-04-21 10:23:27 -07:00
committed by GitHub
parent f8562bd47b
commit 38ba876ea9
4 changed files with 1467 additions and 356 deletions

View File

@@ -22,7 +22,9 @@ def _assert_no_any_annotations(fn: object) -> None:
signature = inspect.signature(fn)
for param in signature.parameters.values():
if param.annotation is Any:
raise AssertionError(f"{fn} has public parameter typed as Any: {param.name}")
raise AssertionError(
f"{fn} has public parameter typed as Any: {param.name}"
)
if signature.return_annotation is Any:
raise AssertionError(f"{fn} has public return annotation typed as Any")
@@ -56,6 +58,7 @@ def test_generated_public_signatures_are_snake_case_and_typed() -> None:
"sandbox",
"service_name",
"service_tier",
"session_start_source",
],
Codex.thread_list: [
"archived",
@@ -64,6 +67,7 @@ def test_generated_public_signatures_are_snake_case_and_typed() -> None:
"limit",
"model_providers",
"search_term",
"sort_direction",
"sort_key",
"source_kinds",
],
@@ -131,6 +135,7 @@ def test_generated_public_signatures_are_snake_case_and_typed() -> None:
"sandbox",
"service_name",
"service_tier",
"session_start_source",
],
AsyncCodex.thread_list: [
"archived",
@@ -139,6 +144,7 @@ def test_generated_public_signatures_are_snake_case_and_typed() -> None:
"limit",
"model_providers",
"search_term",
"sort_direction",
"sort_key",
"source_kinds",
],
@@ -197,7 +203,9 @@ def test_generated_public_signatures_are_snake_case_and_typed() -> None:
for fn, expected_kwargs in expected.items():
actual = _keyword_only_names(fn)
assert actual == expected_kwargs, f"unexpected kwargs for {fn}: {actual}"
assert all(name == name.lower() for name in actual), f"non snake_case kwargs in {fn}: {actual}"
assert all(name == name.lower() for name in actual), (
f"non snake_case kwargs in {fn}: {actual}"
)
_assert_no_any_annotations(fn)
@@ -247,4 +255,6 @@ def test_initialize_metadata_requires_non_empty_information() -> None:
except RuntimeError as exc:
assert "missing required metadata" in str(exc)
else:
raise AssertionError("expected RuntimeError when initialize metadata is missing")
raise AssertionError(
"expected RuntimeError when initialize metadata is missing"
)