From 25054a8a77d7c9964133f545339526243f049469 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Sat, 7 Feb 2026 20:23:22 +0000
Subject: [PATCH 1/5] feat: Browser API endpoint grouping
---
.stats.yml | 4 +-
src/kernel/resources/auth/connections.py | 56 +++++++++----------
src/kernel/types/agents/auth_agent.py | 4 +-
.../types/auth/connection_create_params.py | 4 +-
src/kernel/types/auth/login_response.py | 2 +-
src/kernel/types/auth/managed_auth.py | 8 +--
6 files changed, 39 insertions(+), 39 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index ad62343..796d854 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 108
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-f967d3024897a6125d5d18c4577dbb2cc22d742d487e6a43165198685f992379.yml
-openapi_spec_hash: e1c40ef0aee3a79168eb9cc854a9e403
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-848817f2b20afb49a652952c814b99e27a94090e0770465e9a87748d27e227a7.yml
+openapi_spec_hash: 91efb805e45cdd4c73cd8b0950bef019
config_hash: 3b1fbbb6bda0dac7e8b42e155cd7da56
diff --git a/src/kernel/resources/auth/connections.py b/src/kernel/resources/auth/connections.py
index 0ae3153..7030b9d 100644
--- a/src/kernel/resources/auth/connections.py
+++ b/src/kernel/resources/auth/connections.py
@@ -70,10 +70,10 @@ def create(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> ManagedAuth:
- """Creates managed authentication for a profile and domain combination.
+ """Creates an auth connection for a profile and domain combination.
Returns 409
- Conflict if managed auth already exists for the given profile and domain.
+ Conflict if an auth connection already exists for the given profile and domain.
Args:
domain: Domain for authentication
@@ -99,7 +99,7 @@ def create(
- Ping Identity: _.pingone.com, _.pingidentity.com
credential:
- Reference to credentials for managed auth. Use one of:
+ Reference to credentials for the auth connection. Use one of:
- { name } for Kernel credentials
- { provider, path } for external provider item
@@ -153,10 +153,10 @@ def retrieve(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> ManagedAuth:
- """Retrieve managed auth by its ID.
+ """Retrieve an auth connection by its ID.
- Includes current flow state if a login is in
- progress.
+ Includes current flow state if a login is
+ in progress.
Args:
extra_headers: Send extra headers
@@ -192,7 +192,7 @@ def list(
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncOffsetPagination[ManagedAuth]:
"""
- List managed auths with optional filters for profile_name and domain.
+ List auth connections with optional filters for profile_name and domain.
Args:
domain: Filter by domain
@@ -243,11 +243,11 @@ def delete(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> None:
- """Deletes managed auth and terminates its workflow.
+ """Deletes an auth connection and terminates its workflow.
This will:
- - Delete the managed auth record
+ - Delete the auth connection record
- Terminate the Temporal workflow
- Cancel any in-progress login flows
@@ -323,10 +323,10 @@ def login(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> LoginResponse:
- """Starts a login flow for the managed auth.
+ """Starts a login flow for the auth connection.
- Returns immediately with a hosted URL
- for the user to complete authentication, or triggers automatic re-auth if
+ Returns immediately with a hosted
+ URL for the user to complete authentication, or triggers automatic re-auth if
credentials are stored.
Args:
@@ -369,8 +369,8 @@ def submit(
) -> SubmitFieldsResponse:
"""Submits field values for the login form.
- Poll the managed auth to track progress
- and get results.
+ Poll the auth connection to track
+ progress and get results.
Args:
fields: Map of field name to value
@@ -443,10 +443,10 @@ async def create(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> ManagedAuth:
- """Creates managed authentication for a profile and domain combination.
+ """Creates an auth connection for a profile and domain combination.
Returns 409
- Conflict if managed auth already exists for the given profile and domain.
+ Conflict if an auth connection already exists for the given profile and domain.
Args:
domain: Domain for authentication
@@ -472,7 +472,7 @@ async def create(
- Ping Identity: _.pingone.com, _.pingidentity.com
credential:
- Reference to credentials for managed auth. Use one of:
+ Reference to credentials for the auth connection. Use one of:
- { name } for Kernel credentials
- { provider, path } for external provider item
@@ -526,10 +526,10 @@ async def retrieve(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> ManagedAuth:
- """Retrieve managed auth by its ID.
+ """Retrieve an auth connection by its ID.
- Includes current flow state if a login is in
- progress.
+ Includes current flow state if a login is
+ in progress.
Args:
extra_headers: Send extra headers
@@ -565,7 +565,7 @@ def list(
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[ManagedAuth, AsyncOffsetPagination[ManagedAuth]]:
"""
- List managed auths with optional filters for profile_name and domain.
+ List auth connections with optional filters for profile_name and domain.
Args:
domain: Filter by domain
@@ -616,11 +616,11 @@ async def delete(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> None:
- """Deletes managed auth and terminates its workflow.
+ """Deletes an auth connection and terminates its workflow.
This will:
- - Delete the managed auth record
+ - Delete the auth connection record
- Terminate the Temporal workflow
- Cancel any in-progress login flows
@@ -696,10 +696,10 @@ async def login(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> LoginResponse:
- """Starts a login flow for the managed auth.
+ """Starts a login flow for the auth connection.
- Returns immediately with a hosted URL
- for the user to complete authentication, or triggers automatic re-auth if
+ Returns immediately with a hosted
+ URL for the user to complete authentication, or triggers automatic re-auth if
credentials are stored.
Args:
@@ -742,8 +742,8 @@ async def submit(
) -> SubmitFieldsResponse:
"""Submits field values for the login form.
- Poll the managed auth to track progress
- and get results.
+ Poll the auth connection to track
+ progress and get results.
Args:
fields: Map of field name to value
diff --git a/src/kernel/types/agents/auth_agent.py b/src/kernel/types/agents/auth_agent.py
index aa5b271..98e1158 100644
--- a/src/kernel/types/agents/auth_agent.py
+++ b/src/kernel/types/agents/auth_agent.py
@@ -10,7 +10,7 @@
class Credential(BaseModel):
- """Reference to credentials for managed auth.
+ """Reference to credentials for the auth connection.
Use one of:
- { name } for Kernel credentials
@@ -80,7 +80,7 @@ class AuthAgent(BaseModel):
"""Reason why automatic re-authentication is or is not possible"""
credential: Optional[Credential] = None
- """Reference to credentials for managed auth. Use one of:
+ """Reference to credentials for the auth connection. Use one of:
- { name } for Kernel credentials
- { provider, path } for external provider item
diff --git a/src/kernel/types/auth/connection_create_params.py b/src/kernel/types/auth/connection_create_params.py
index 9282f48..2c31f60 100644
--- a/src/kernel/types/auth/connection_create_params.py
+++ b/src/kernel/types/auth/connection_create_params.py
@@ -38,7 +38,7 @@ class ConnectionCreateParams(TypedDict, total=False):
"""
credential: Credential
- """Reference to credentials for managed auth. Use one of:
+ """Reference to credentials for the auth connection. Use one of:
- { name } for Kernel credentials
- { provider, path } for external provider item
@@ -61,7 +61,7 @@ class ConnectionCreateParams(TypedDict, total=False):
class Credential(TypedDict, total=False):
- """Reference to credentials for managed auth.
+ """Reference to credentials for the auth connection.
Use one of:
- { name } for Kernel credentials
diff --git a/src/kernel/types/auth/login_response.py b/src/kernel/types/auth/login_response.py
index 178c300..f5aed29 100644
--- a/src/kernel/types/auth/login_response.py
+++ b/src/kernel/types/auth/login_response.py
@@ -13,7 +13,7 @@ class LoginResponse(BaseModel):
"""Response from starting a login flow"""
id: str
- """Managed auth ID"""
+ """Auth connection ID"""
flow_expires_at: datetime
"""When the login flow expires"""
diff --git a/src/kernel/types/auth/managed_auth.py b/src/kernel/types/auth/managed_auth.py
index 426fe9e..3fb2286 100644
--- a/src/kernel/types/auth/managed_auth.py
+++ b/src/kernel/types/auth/managed_auth.py
@@ -11,7 +11,7 @@
class Credential(BaseModel):
- """Reference to credentials for managed auth.
+ """Reference to credentials for the auth connection.
Use one of:
- { name } for Kernel credentials
@@ -70,13 +70,13 @@ class ManagedAuth(BaseModel):
"""
id: str
- """Unique identifier for the managed auth"""
+ """Unique identifier for the auth connection"""
domain: str
"""Target domain for authentication"""
profile_name: str
- """Name of the profile associated with this managed auth"""
+ """Name of the profile associated with this auth connection"""
status: Literal["AUTHENTICATED", "NEEDS_AUTH"]
"""Current authentication status of the managed profile"""
@@ -112,7 +112,7 @@ class ManagedAuth(BaseModel):
"""Reason why automatic re-authentication is or is not possible"""
credential: Optional[Credential] = None
- """Reference to credentials for managed auth. Use one of:
+ """Reference to credentials for the auth connection. Use one of:
- { name } for Kernel credentials
- { provider, path } for external provider item
From 5369f2cea1f25b0e8191bf0b6eb30da207bce9c8 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Mon, 9 Feb 2026 19:24:41 +0000
Subject: [PATCH 2/5] codegen metadata
---
.stats.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index 796d854..15c374f 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 108
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-848817f2b20afb49a652952c814b99e27a94090e0770465e9a87748d27e227a7.yml
-openapi_spec_hash: 91efb805e45cdd4c73cd8b0950bef019
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-13e82ae9e725e2c3ca19da7248a7a9c8696a0dfe088654cf26aea07c76d6567a.yml
+openapi_spec_hash: 6d4151a6066a8474bc56923299aec18a
config_hash: 3b1fbbb6bda0dac7e8b42e155cd7da56
From 4f7f7830489ea83488b06f9723a8e5f472c1ccd4 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 10 Feb 2026 01:48:33 +0000
Subject: [PATCH 3/5] =?UTF-8?q?refactor(api):=20remove=20deprecated=20agen?=
=?UTF-8?q?t-auth=20endpoints=20from=20stainless.=E2=80=A6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.stats.yml | 4 +-
api.md | 40 -
src/kernel/_client.py | 38 -
src/kernel/resources/__init__.py | 14 -
src/kernel/resources/agents/__init__.py | 33 -
src/kernel/resources/agents/agents.py | 102 ---
src/kernel/resources/agents/auth/__init__.py | 33 -
src/kernel/resources/agents/auth/auth.py | 634 ----------------
.../resources/agents/auth/invocations.py | 682 ------------------
src/kernel/types/agents/__init__.py | 13 -
.../agents/agent_auth_invocation_response.py | 101 ---
.../agents/agent_auth_submit_response.py | 14 -
src/kernel/types/agents/auth/__init__.py | 8 -
.../agents/auth/invocation_create_params.py | 19 -
.../agents/auth/invocation_exchange_params.py | 12 -
.../auth/invocation_exchange_response.py | 15 -
.../agents/auth/invocation_submit_params.py | 28 -
src/kernel/types/agents/auth_agent.py | 108 ---
.../auth_agent_invocation_create_response.py | 31 -
src/kernel/types/agents/auth_create_params.py | 63 --
src/kernel/types/agents/auth_list_params.py | 21 -
src/kernel/types/agents/discovered_field.py | 36 -
.../types/auth/connection_follow_response.py | 32 +-
src/kernel/types/auth/managed_auth.py | 31 +-
tests/api_resources/agents/__init__.py | 1 -
tests/api_resources/agents/auth/__init__.py | 1 -
.../agents/auth/test_invocations.py | 653 -----------------
tests/api_resources/agents/test_auth.py | 417 -----------
28 files changed, 61 insertions(+), 3123 deletions(-)
delete mode 100644 src/kernel/resources/agents/__init__.py
delete mode 100644 src/kernel/resources/agents/agents.py
delete mode 100644 src/kernel/resources/agents/auth/__init__.py
delete mode 100644 src/kernel/resources/agents/auth/auth.py
delete mode 100644 src/kernel/resources/agents/auth/invocations.py
delete mode 100644 src/kernel/types/agents/__init__.py
delete mode 100644 src/kernel/types/agents/agent_auth_invocation_response.py
delete mode 100644 src/kernel/types/agents/agent_auth_submit_response.py
delete mode 100644 src/kernel/types/agents/auth/__init__.py
delete mode 100644 src/kernel/types/agents/auth/invocation_create_params.py
delete mode 100644 src/kernel/types/agents/auth/invocation_exchange_params.py
delete mode 100644 src/kernel/types/agents/auth/invocation_exchange_response.py
delete mode 100644 src/kernel/types/agents/auth/invocation_submit_params.py
delete mode 100644 src/kernel/types/agents/auth_agent.py
delete mode 100644 src/kernel/types/agents/auth_agent_invocation_create_response.py
delete mode 100644 src/kernel/types/agents/auth_create_params.py
delete mode 100644 src/kernel/types/agents/auth_list_params.py
delete mode 100644 src/kernel/types/agents/discovered_field.py
delete mode 100644 tests/api_resources/agents/__init__.py
delete mode 100644 tests/api_resources/agents/auth/__init__.py
delete mode 100644 tests/api_resources/agents/auth/test_invocations.py
delete mode 100644 tests/api_resources/agents/test_auth.py
diff --git a/.stats.yml b/.stats.yml
index 15c374f..207d899 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
-configured_endpoints: 108
+configured_endpoints: 100
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-13e82ae9e725e2c3ca19da7248a7a9c8696a0dfe088654cf26aea07c76d6567a.yml
openapi_spec_hash: 6d4151a6066a8474bc56923299aec18a
-config_hash: 3b1fbbb6bda0dac7e8b42e155cd7da56
+config_hash: 82f0a04081a3ab7111d3a9c68cd3ff2b
diff --git a/api.md b/api.md
index cb50de4..87d0de3 100644
--- a/api.md
+++ b/api.md
@@ -318,46 +318,6 @@ Methods:
- client.browser_pools.flush(id_or_name) -> None
- client.browser_pools.release(id_or_name, \*\*params) -> None
-# Agents
-
-## Auth
-
-Types:
-
-```python
-from kernel.types.agents import (
- AgentAuthInvocationResponse,
- AgentAuthSubmitResponse,
- AuthAgent,
- AuthAgentCreateRequest,
- AuthAgentInvocationCreateRequest,
- AuthAgentInvocationCreateResponse,
- DiscoveredField,
-)
-```
-
-Methods:
-
-- client.agents.auth.create(\*\*params) -> AuthAgent
-- client.agents.auth.retrieve(id) -> AuthAgent
-- client.agents.auth.list(\*\*params) -> SyncOffsetPagination[AuthAgent]
-- client.agents.auth.delete(id) -> None
-
-### Invocations
-
-Types:
-
-```python
-from kernel.types.agents.auth import InvocationExchangeResponse
-```
-
-Methods:
-
-- client.agents.auth.invocations.create(\*\*params) -> AuthAgentInvocationCreateResponse
-- client.agents.auth.invocations.retrieve(invocation_id) -> AgentAuthInvocationResponse
-- client.agents.auth.invocations.exchange(invocation_id, \*\*params) -> InvocationExchangeResponse
-- client.agents.auth.invocations.submit(invocation_id, \*\*params) -> AgentAuthSubmitResponse
-
# Credentials
Types:
diff --git a/src/kernel/_client.py b/src/kernel/_client.py
index 07c3b68..df7fd25 100644
--- a/src/kernel/_client.py
+++ b/src/kernel/_client.py
@@ -34,7 +34,6 @@
from .resources import (
apps,
auth,
- agents,
proxies,
browsers,
profiles,
@@ -53,7 +52,6 @@
from .resources.credentials import CredentialsResource, AsyncCredentialsResource
from .resources.deployments import DeploymentsResource, AsyncDeploymentsResource
from .resources.invocations import InvocationsResource, AsyncInvocationsResource
- from .resources.agents.agents import AgentsResource, AsyncAgentsResource
from .resources.browser_pools import BrowserPoolsResource, AsyncBrowserPoolsResource
from .resources.browsers.browsers import BrowsersResource, AsyncBrowsersResource
from .resources.credential_providers import CredentialProvidersResource, AsyncCredentialProvidersResource
@@ -209,12 +207,6 @@ def browser_pools(self) -> BrowserPoolsResource:
return BrowserPoolsResource(self)
- @cached_property
- def agents(self) -> AgentsResource:
- from .resources.agents import AgentsResource
-
- return AgentsResource(self)
-
@cached_property
def credentials(self) -> CredentialsResource:
from .resources.credentials import CredentialsResource
@@ -475,12 +467,6 @@ def browser_pools(self) -> AsyncBrowserPoolsResource:
return AsyncBrowserPoolsResource(self)
- @cached_property
- def agents(self) -> AsyncAgentsResource:
- from .resources.agents import AsyncAgentsResource
-
- return AsyncAgentsResource(self)
-
@cached_property
def credentials(self) -> AsyncCredentialsResource:
from .resources.credentials import AsyncCredentialsResource
@@ -668,12 +654,6 @@ def browser_pools(self) -> browser_pools.BrowserPoolsResourceWithRawResponse:
return BrowserPoolsResourceWithRawResponse(self._client.browser_pools)
- @cached_property
- def agents(self) -> agents.AgentsResourceWithRawResponse:
- from .resources.agents import AgentsResourceWithRawResponse
-
- return AgentsResourceWithRawResponse(self._client.agents)
-
@cached_property
def credentials(self) -> credentials.CredentialsResourceWithRawResponse:
from .resources.credentials import CredentialsResourceWithRawResponse
@@ -747,12 +727,6 @@ def browser_pools(self) -> browser_pools.AsyncBrowserPoolsResourceWithRawRespons
return AsyncBrowserPoolsResourceWithRawResponse(self._client.browser_pools)
- @cached_property
- def agents(self) -> agents.AsyncAgentsResourceWithRawResponse:
- from .resources.agents import AsyncAgentsResourceWithRawResponse
-
- return AsyncAgentsResourceWithRawResponse(self._client.agents)
-
@cached_property
def credentials(self) -> credentials.AsyncCredentialsResourceWithRawResponse:
from .resources.credentials import AsyncCredentialsResourceWithRawResponse
@@ -826,12 +800,6 @@ def browser_pools(self) -> browser_pools.BrowserPoolsResourceWithStreamingRespon
return BrowserPoolsResourceWithStreamingResponse(self._client.browser_pools)
- @cached_property
- def agents(self) -> agents.AgentsResourceWithStreamingResponse:
- from .resources.agents import AgentsResourceWithStreamingResponse
-
- return AgentsResourceWithStreamingResponse(self._client.agents)
-
@cached_property
def credentials(self) -> credentials.CredentialsResourceWithStreamingResponse:
from .resources.credentials import CredentialsResourceWithStreamingResponse
@@ -905,12 +873,6 @@ def browser_pools(self) -> browser_pools.AsyncBrowserPoolsResourceWithStreamingR
return AsyncBrowserPoolsResourceWithStreamingResponse(self._client.browser_pools)
- @cached_property
- def agents(self) -> agents.AsyncAgentsResourceWithStreamingResponse:
- from .resources.agents import AsyncAgentsResourceWithStreamingResponse
-
- return AsyncAgentsResourceWithStreamingResponse(self._client.agents)
-
@cached_property
def credentials(self) -> credentials.AsyncCredentialsResourceWithStreamingResponse:
from .resources.credentials import AsyncCredentialsResourceWithStreamingResponse
diff --git a/src/kernel/resources/__init__.py b/src/kernel/resources/__init__.py
index 31a325b..4896e79 100644
--- a/src/kernel/resources/__init__.py
+++ b/src/kernel/resources/__init__.py
@@ -16,14 +16,6 @@
AuthResourceWithStreamingResponse,
AsyncAuthResourceWithStreamingResponse,
)
-from .agents import (
- AgentsResource,
- AsyncAgentsResource,
- AgentsResourceWithRawResponse,
- AsyncAgentsResourceWithRawResponse,
- AgentsResourceWithStreamingResponse,
- AsyncAgentsResourceWithStreamingResponse,
-)
from .proxies import (
ProxiesResource,
AsyncProxiesResource,
@@ -152,12 +144,6 @@
"AsyncBrowserPoolsResourceWithRawResponse",
"BrowserPoolsResourceWithStreamingResponse",
"AsyncBrowserPoolsResourceWithStreamingResponse",
- "AgentsResource",
- "AsyncAgentsResource",
- "AgentsResourceWithRawResponse",
- "AsyncAgentsResourceWithRawResponse",
- "AgentsResourceWithStreamingResponse",
- "AsyncAgentsResourceWithStreamingResponse",
"CredentialsResource",
"AsyncCredentialsResource",
"CredentialsResourceWithRawResponse",
diff --git a/src/kernel/resources/agents/__init__.py b/src/kernel/resources/agents/__init__.py
deleted file mode 100644
index cb159eb..0000000
--- a/src/kernel/resources/agents/__init__.py
+++ /dev/null
@@ -1,33 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from .auth import (
- AuthResource,
- AsyncAuthResource,
- AuthResourceWithRawResponse,
- AsyncAuthResourceWithRawResponse,
- AuthResourceWithStreamingResponse,
- AsyncAuthResourceWithStreamingResponse,
-)
-from .agents import (
- AgentsResource,
- AsyncAgentsResource,
- AgentsResourceWithRawResponse,
- AsyncAgentsResourceWithRawResponse,
- AgentsResourceWithStreamingResponse,
- AsyncAgentsResourceWithStreamingResponse,
-)
-
-__all__ = [
- "AuthResource",
- "AsyncAuthResource",
- "AuthResourceWithRawResponse",
- "AsyncAuthResourceWithRawResponse",
- "AuthResourceWithStreamingResponse",
- "AsyncAuthResourceWithStreamingResponse",
- "AgentsResource",
- "AsyncAgentsResource",
- "AgentsResourceWithRawResponse",
- "AsyncAgentsResourceWithRawResponse",
- "AgentsResourceWithStreamingResponse",
- "AsyncAgentsResourceWithStreamingResponse",
-]
diff --git a/src/kernel/resources/agents/agents.py b/src/kernel/resources/agents/agents.py
deleted file mode 100644
index 6999bd5..0000000
--- a/src/kernel/resources/agents/agents.py
+++ /dev/null
@@ -1,102 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from __future__ import annotations
-
-from ..._compat import cached_property
-from .auth.auth import (
- AuthResource,
- AsyncAuthResource,
- AuthResourceWithRawResponse,
- AsyncAuthResourceWithRawResponse,
- AuthResourceWithStreamingResponse,
- AsyncAuthResourceWithStreamingResponse,
-)
-from ..._resource import SyncAPIResource, AsyncAPIResource
-
-__all__ = ["AgentsResource", "AsyncAgentsResource"]
-
-
-class AgentsResource(SyncAPIResource):
- @cached_property
- def auth(self) -> AuthResource:
- return AuthResource(self._client)
-
- @cached_property
- def with_raw_response(self) -> AgentsResourceWithRawResponse:
- """
- This property can be used as a prefix for any HTTP method call to return
- the raw response object instead of the parsed content.
-
- For more information, see https://www.github.com/kernel/kernel-python-sdk#accessing-raw-response-data-eg-headers
- """
- return AgentsResourceWithRawResponse(self)
-
- @cached_property
- def with_streaming_response(self) -> AgentsResourceWithStreamingResponse:
- """
- An alternative to `.with_raw_response` that doesn't eagerly read the response body.
-
- For more information, see https://www.github.com/kernel/kernel-python-sdk#with_streaming_response
- """
- return AgentsResourceWithStreamingResponse(self)
-
-
-class AsyncAgentsResource(AsyncAPIResource):
- @cached_property
- def auth(self) -> AsyncAuthResource:
- return AsyncAuthResource(self._client)
-
- @cached_property
- def with_raw_response(self) -> AsyncAgentsResourceWithRawResponse:
- """
- This property can be used as a prefix for any HTTP method call to return
- the raw response object instead of the parsed content.
-
- For more information, see https://www.github.com/kernel/kernel-python-sdk#accessing-raw-response-data-eg-headers
- """
- return AsyncAgentsResourceWithRawResponse(self)
-
- @cached_property
- def with_streaming_response(self) -> AsyncAgentsResourceWithStreamingResponse:
- """
- An alternative to `.with_raw_response` that doesn't eagerly read the response body.
-
- For more information, see https://www.github.com/kernel/kernel-python-sdk#with_streaming_response
- """
- return AsyncAgentsResourceWithStreamingResponse(self)
-
-
-class AgentsResourceWithRawResponse:
- def __init__(self, agents: AgentsResource) -> None:
- self._agents = agents
-
- @cached_property
- def auth(self) -> AuthResourceWithRawResponse:
- return AuthResourceWithRawResponse(self._agents.auth)
-
-
-class AsyncAgentsResourceWithRawResponse:
- def __init__(self, agents: AsyncAgentsResource) -> None:
- self._agents = agents
-
- @cached_property
- def auth(self) -> AsyncAuthResourceWithRawResponse:
- return AsyncAuthResourceWithRawResponse(self._agents.auth)
-
-
-class AgentsResourceWithStreamingResponse:
- def __init__(self, agents: AgentsResource) -> None:
- self._agents = agents
-
- @cached_property
- def auth(self) -> AuthResourceWithStreamingResponse:
- return AuthResourceWithStreamingResponse(self._agents.auth)
-
-
-class AsyncAgentsResourceWithStreamingResponse:
- def __init__(self, agents: AsyncAgentsResource) -> None:
- self._agents = agents
-
- @cached_property
- def auth(self) -> AsyncAuthResourceWithStreamingResponse:
- return AsyncAuthResourceWithStreamingResponse(self._agents.auth)
diff --git a/src/kernel/resources/agents/auth/__init__.py b/src/kernel/resources/agents/auth/__init__.py
deleted file mode 100644
index 6130549..0000000
--- a/src/kernel/resources/agents/auth/__init__.py
+++ /dev/null
@@ -1,33 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from .auth import (
- AuthResource,
- AsyncAuthResource,
- AuthResourceWithRawResponse,
- AsyncAuthResourceWithRawResponse,
- AuthResourceWithStreamingResponse,
- AsyncAuthResourceWithStreamingResponse,
-)
-from .invocations import (
- InvocationsResource,
- AsyncInvocationsResource,
- InvocationsResourceWithRawResponse,
- AsyncInvocationsResourceWithRawResponse,
- InvocationsResourceWithStreamingResponse,
- AsyncInvocationsResourceWithStreamingResponse,
-)
-
-__all__ = [
- "InvocationsResource",
- "AsyncInvocationsResource",
- "InvocationsResourceWithRawResponse",
- "AsyncInvocationsResourceWithRawResponse",
- "InvocationsResourceWithStreamingResponse",
- "AsyncInvocationsResourceWithStreamingResponse",
- "AuthResource",
- "AsyncAuthResource",
- "AuthResourceWithRawResponse",
- "AsyncAuthResourceWithRawResponse",
- "AuthResourceWithStreamingResponse",
- "AsyncAuthResourceWithStreamingResponse",
-]
diff --git a/src/kernel/resources/agents/auth/auth.py b/src/kernel/resources/agents/auth/auth.py
deleted file mode 100644
index 05e83c5..0000000
--- a/src/kernel/resources/agents/auth/auth.py
+++ /dev/null
@@ -1,634 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from __future__ import annotations
-
-import typing_extensions
-
-import httpx
-
-from ...._types import Body, Omit, Query, Headers, NoneType, NotGiven, SequenceNotStr, omit, not_given
-from ...._utils import maybe_transform, async_maybe_transform
-from ...._compat import cached_property
-from .invocations import (
- InvocationsResource,
- AsyncInvocationsResource,
- InvocationsResourceWithRawResponse,
- AsyncInvocationsResourceWithRawResponse,
- InvocationsResourceWithStreamingResponse,
- AsyncInvocationsResourceWithStreamingResponse,
-)
-from ...._resource import SyncAPIResource, AsyncAPIResource
-from ...._response import (
- to_raw_response_wrapper,
- to_streamed_response_wrapper,
- async_to_raw_response_wrapper,
- async_to_streamed_response_wrapper,
-)
-from ....pagination import SyncOffsetPagination, AsyncOffsetPagination
-from ...._base_client import AsyncPaginator, make_request_options
-from ....types.agents import auth_list_params, auth_create_params
-from ....types.agents.auth_agent import AuthAgent
-
-__all__ = ["AuthResource", "AsyncAuthResource"]
-
-
-class AuthResource(SyncAPIResource):
- @cached_property
- def invocations(self) -> InvocationsResource:
- return InvocationsResource(self._client)
-
- @cached_property
- def with_raw_response(self) -> AuthResourceWithRawResponse:
- """
- This property can be used as a prefix for any HTTP method call to return
- the raw response object instead of the parsed content.
-
- For more information, see https://www.github.com/kernel/kernel-python-sdk#accessing-raw-response-data-eg-headers
- """
- return AuthResourceWithRawResponse(self)
-
- @cached_property
- def with_streaming_response(self) -> AuthResourceWithStreamingResponse:
- """
- An alternative to `.with_raw_response` that doesn't eagerly read the response body.
-
- For more information, see https://www.github.com/kernel/kernel-python-sdk#with_streaming_response
- """
- return AuthResourceWithStreamingResponse(self)
-
- @typing_extensions.deprecated("deprecated")
- def create(
- self,
- *,
- domain: str,
- profile_name: str,
- allowed_domains: SequenceNotStr[str] | Omit = omit,
- credential_name: str | Omit = omit,
- login_url: str | Omit = omit,
- proxy: auth_create_params.Proxy | Omit = omit,
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
- # The extra values given here take precedence over values defined on the client or passed to this method.
- extra_headers: Headers | None = None,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> AuthAgent:
- """
- **Deprecated: Use POST /auth/connections instead.** Creates a new auth agent for
- the specified domain and profile combination, or returns an existing one if it
- already exists. This is idempotent - calling with the same domain and profile
- will return the same agent. Does NOT start an invocation - use POST
- /agents/auth/invocations to start an auth flow.
-
- Args:
- domain: Domain for authentication
-
- profile_name: Name of the profile to use for this auth agent
-
- allowed_domains: Additional domains that are valid for this auth agent's authentication flow
- (besides the primary domain). Useful when login pages redirect to different
- domains.
-
- The following SSO/OAuth provider domains are automatically allowed by default
- and do not need to be specified:
-
- - Google: accounts.google.com
- - Microsoft/Azure AD: login.microsoftonline.com, login.live.com
- - Okta: _.okta.com, _.oktapreview.com
- - Auth0: _.auth0.com, _.us.auth0.com, _.eu.auth0.com, _.au.auth0.com
- - Apple: appleid.apple.com
- - GitHub: github.com
- - Facebook/Meta: www.facebook.com
- - LinkedIn: www.linkedin.com
- - Amazon Cognito: \\**.amazoncognito.com
- - OneLogin: \\**.onelogin.com
- - Ping Identity: _.pingone.com, _.pingidentity.com
-
- credential_name: Optional name of an existing credential to use for this auth agent. If provided,
- the credential will be linked to the agent and its values will be used to
- auto-fill the login form on invocation.
-
- login_url: Optional login page URL. If provided, will be stored on the agent and used to
- skip discovery in future invocations.
-
- proxy: Optional proxy configuration
-
- extra_headers: Send extra headers
-
- extra_query: Add additional query parameters to the request
-
- extra_body: Add additional JSON properties to the request
-
- timeout: Override the client-level default timeout for this request, in seconds
- """
- return self._post(
- "/agents/auth",
- body=maybe_transform(
- {
- "domain": domain,
- "profile_name": profile_name,
- "allowed_domains": allowed_domains,
- "credential_name": credential_name,
- "login_url": login_url,
- "proxy": proxy,
- },
- auth_create_params.AuthCreateParams,
- ),
- options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
- ),
- cast_to=AuthAgent,
- )
-
- @typing_extensions.deprecated("deprecated")
- def retrieve(
- self,
- id: str,
- *,
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
- # The extra values given here take precedence over values defined on the client or passed to this method.
- extra_headers: Headers | None = None,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> AuthAgent:
- """
- **Deprecated: Use GET /auth/connections/{id} instead.** Retrieve an auth agent
- by its ID. Returns the current authentication status of the managed profile.
-
- Args:
- extra_headers: Send extra headers
-
- extra_query: Add additional query parameters to the request
-
- extra_body: Add additional JSON properties to the request
-
- timeout: Override the client-level default timeout for this request, in seconds
- """
- if not id:
- raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
- return self._get(
- f"/agents/auth/{id}",
- options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
- ),
- cast_to=AuthAgent,
- )
-
- @typing_extensions.deprecated("deprecated")
- def list(
- self,
- *,
- domain: str | Omit = omit,
- limit: int | Omit = omit,
- offset: int | Omit = omit,
- profile_name: str | Omit = omit,
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
- # The extra values given here take precedence over values defined on the client or passed to this method.
- extra_headers: Headers | None = None,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> SyncOffsetPagination[AuthAgent]:
- """
- **Deprecated: Use GET /auth/connections instead.** List auth agents with
- optional filters for profile_name and domain.
-
- Args:
- domain: Filter by domain
-
- limit: Maximum number of results to return
-
- offset: Number of results to skip
-
- profile_name: Filter by profile name
-
- extra_headers: Send extra headers
-
- extra_query: Add additional query parameters to the request
-
- extra_body: Add additional JSON properties to the request
-
- timeout: Override the client-level default timeout for this request, in seconds
- """
- return self._get_api_list(
- "/agents/auth",
- page=SyncOffsetPagination[AuthAgent],
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- query=maybe_transform(
- {
- "domain": domain,
- "limit": limit,
- "offset": offset,
- "profile_name": profile_name,
- },
- auth_list_params.AuthListParams,
- ),
- ),
- model=AuthAgent,
- )
-
- @typing_extensions.deprecated("deprecated")
- def delete(
- self,
- id: str,
- *,
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
- # The extra values given here take precedence over values defined on the client or passed to this method.
- extra_headers: Headers | None = None,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> None:
- """
- **Deprecated: Use DELETE /auth/connections/{id} instead.** Deletes an auth agent
- and terminates its workflow. This will:
-
- - Soft delete the auth agent record
- - Gracefully terminate the agent's Temporal workflow
- - Cancel any in-progress invocations
-
- Args:
- extra_headers: Send extra headers
-
- extra_query: Add additional query parameters to the request
-
- extra_body: Add additional JSON properties to the request
-
- timeout: Override the client-level default timeout for this request, in seconds
- """
- if not id:
- raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
- extra_headers = {"Accept": "*/*", **(extra_headers or {})}
- return self._delete(
- f"/agents/auth/{id}",
- options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
- ),
- cast_to=NoneType,
- )
-
-
-class AsyncAuthResource(AsyncAPIResource):
- @cached_property
- def invocations(self) -> AsyncInvocationsResource:
- return AsyncInvocationsResource(self._client)
-
- @cached_property
- def with_raw_response(self) -> AsyncAuthResourceWithRawResponse:
- """
- This property can be used as a prefix for any HTTP method call to return
- the raw response object instead of the parsed content.
-
- For more information, see https://www.github.com/kernel/kernel-python-sdk#accessing-raw-response-data-eg-headers
- """
- return AsyncAuthResourceWithRawResponse(self)
-
- @cached_property
- def with_streaming_response(self) -> AsyncAuthResourceWithStreamingResponse:
- """
- An alternative to `.with_raw_response` that doesn't eagerly read the response body.
-
- For more information, see https://www.github.com/kernel/kernel-python-sdk#with_streaming_response
- """
- return AsyncAuthResourceWithStreamingResponse(self)
-
- @typing_extensions.deprecated("deprecated")
- async def create(
- self,
- *,
- domain: str,
- profile_name: str,
- allowed_domains: SequenceNotStr[str] | Omit = omit,
- credential_name: str | Omit = omit,
- login_url: str | Omit = omit,
- proxy: auth_create_params.Proxy | Omit = omit,
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
- # The extra values given here take precedence over values defined on the client or passed to this method.
- extra_headers: Headers | None = None,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> AuthAgent:
- """
- **Deprecated: Use POST /auth/connections instead.** Creates a new auth agent for
- the specified domain and profile combination, or returns an existing one if it
- already exists. This is idempotent - calling with the same domain and profile
- will return the same agent. Does NOT start an invocation - use POST
- /agents/auth/invocations to start an auth flow.
-
- Args:
- domain: Domain for authentication
-
- profile_name: Name of the profile to use for this auth agent
-
- allowed_domains: Additional domains that are valid for this auth agent's authentication flow
- (besides the primary domain). Useful when login pages redirect to different
- domains.
-
- The following SSO/OAuth provider domains are automatically allowed by default
- and do not need to be specified:
-
- - Google: accounts.google.com
- - Microsoft/Azure AD: login.microsoftonline.com, login.live.com
- - Okta: _.okta.com, _.oktapreview.com
- - Auth0: _.auth0.com, _.us.auth0.com, _.eu.auth0.com, _.au.auth0.com
- - Apple: appleid.apple.com
- - GitHub: github.com
- - Facebook/Meta: www.facebook.com
- - LinkedIn: www.linkedin.com
- - Amazon Cognito: \\**.amazoncognito.com
- - OneLogin: \\**.onelogin.com
- - Ping Identity: _.pingone.com, _.pingidentity.com
-
- credential_name: Optional name of an existing credential to use for this auth agent. If provided,
- the credential will be linked to the agent and its values will be used to
- auto-fill the login form on invocation.
-
- login_url: Optional login page URL. If provided, will be stored on the agent and used to
- skip discovery in future invocations.
-
- proxy: Optional proxy configuration
-
- extra_headers: Send extra headers
-
- extra_query: Add additional query parameters to the request
-
- extra_body: Add additional JSON properties to the request
-
- timeout: Override the client-level default timeout for this request, in seconds
- """
- return await self._post(
- "/agents/auth",
- body=await async_maybe_transform(
- {
- "domain": domain,
- "profile_name": profile_name,
- "allowed_domains": allowed_domains,
- "credential_name": credential_name,
- "login_url": login_url,
- "proxy": proxy,
- },
- auth_create_params.AuthCreateParams,
- ),
- options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
- ),
- cast_to=AuthAgent,
- )
-
- @typing_extensions.deprecated("deprecated")
- async def retrieve(
- self,
- id: str,
- *,
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
- # The extra values given here take precedence over values defined on the client or passed to this method.
- extra_headers: Headers | None = None,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> AuthAgent:
- """
- **Deprecated: Use GET /auth/connections/{id} instead.** Retrieve an auth agent
- by its ID. Returns the current authentication status of the managed profile.
-
- Args:
- extra_headers: Send extra headers
-
- extra_query: Add additional query parameters to the request
-
- extra_body: Add additional JSON properties to the request
-
- timeout: Override the client-level default timeout for this request, in seconds
- """
- if not id:
- raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
- return await self._get(
- f"/agents/auth/{id}",
- options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
- ),
- cast_to=AuthAgent,
- )
-
- @typing_extensions.deprecated("deprecated")
- def list(
- self,
- *,
- domain: str | Omit = omit,
- limit: int | Omit = omit,
- offset: int | Omit = omit,
- profile_name: str | Omit = omit,
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
- # The extra values given here take precedence over values defined on the client or passed to this method.
- extra_headers: Headers | None = None,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> AsyncPaginator[AuthAgent, AsyncOffsetPagination[AuthAgent]]:
- """
- **Deprecated: Use GET /auth/connections instead.** List auth agents with
- optional filters for profile_name and domain.
-
- Args:
- domain: Filter by domain
-
- limit: Maximum number of results to return
-
- offset: Number of results to skip
-
- profile_name: Filter by profile name
-
- extra_headers: Send extra headers
-
- extra_query: Add additional query parameters to the request
-
- extra_body: Add additional JSON properties to the request
-
- timeout: Override the client-level default timeout for this request, in seconds
- """
- return self._get_api_list(
- "/agents/auth",
- page=AsyncOffsetPagination[AuthAgent],
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- query=maybe_transform(
- {
- "domain": domain,
- "limit": limit,
- "offset": offset,
- "profile_name": profile_name,
- },
- auth_list_params.AuthListParams,
- ),
- ),
- model=AuthAgent,
- )
-
- @typing_extensions.deprecated("deprecated")
- async def delete(
- self,
- id: str,
- *,
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
- # The extra values given here take precedence over values defined on the client or passed to this method.
- extra_headers: Headers | None = None,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> None:
- """
- **Deprecated: Use DELETE /auth/connections/{id} instead.** Deletes an auth agent
- and terminates its workflow. This will:
-
- - Soft delete the auth agent record
- - Gracefully terminate the agent's Temporal workflow
- - Cancel any in-progress invocations
-
- Args:
- extra_headers: Send extra headers
-
- extra_query: Add additional query parameters to the request
-
- extra_body: Add additional JSON properties to the request
-
- timeout: Override the client-level default timeout for this request, in seconds
- """
- if not id:
- raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
- extra_headers = {"Accept": "*/*", **(extra_headers or {})}
- return await self._delete(
- f"/agents/auth/{id}",
- options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
- ),
- cast_to=NoneType,
- )
-
-
-class AuthResourceWithRawResponse:
- def __init__(self, auth: AuthResource) -> None:
- self._auth = auth
-
- self.create = ( # pyright: ignore[reportDeprecated]
- to_raw_response_wrapper(
- auth.create, # pyright: ignore[reportDeprecated],
- )
- )
- self.retrieve = ( # pyright: ignore[reportDeprecated]
- to_raw_response_wrapper(
- auth.retrieve, # pyright: ignore[reportDeprecated],
- )
- )
- self.list = ( # pyright: ignore[reportDeprecated]
- to_raw_response_wrapper(
- auth.list, # pyright: ignore[reportDeprecated],
- )
- )
- self.delete = ( # pyright: ignore[reportDeprecated]
- to_raw_response_wrapper(
- auth.delete, # pyright: ignore[reportDeprecated],
- )
- )
-
- @cached_property
- def invocations(self) -> InvocationsResourceWithRawResponse:
- return InvocationsResourceWithRawResponse(self._auth.invocations)
-
-
-class AsyncAuthResourceWithRawResponse:
- def __init__(self, auth: AsyncAuthResource) -> None:
- self._auth = auth
-
- self.create = ( # pyright: ignore[reportDeprecated]
- async_to_raw_response_wrapper(
- auth.create, # pyright: ignore[reportDeprecated],
- )
- )
- self.retrieve = ( # pyright: ignore[reportDeprecated]
- async_to_raw_response_wrapper(
- auth.retrieve, # pyright: ignore[reportDeprecated],
- )
- )
- self.list = ( # pyright: ignore[reportDeprecated]
- async_to_raw_response_wrapper(
- auth.list, # pyright: ignore[reportDeprecated],
- )
- )
- self.delete = ( # pyright: ignore[reportDeprecated]
- async_to_raw_response_wrapper(
- auth.delete, # pyright: ignore[reportDeprecated],
- )
- )
-
- @cached_property
- def invocations(self) -> AsyncInvocationsResourceWithRawResponse:
- return AsyncInvocationsResourceWithRawResponse(self._auth.invocations)
-
-
-class AuthResourceWithStreamingResponse:
- def __init__(self, auth: AuthResource) -> None:
- self._auth = auth
-
- self.create = ( # pyright: ignore[reportDeprecated]
- to_streamed_response_wrapper(
- auth.create, # pyright: ignore[reportDeprecated],
- )
- )
- self.retrieve = ( # pyright: ignore[reportDeprecated]
- to_streamed_response_wrapper(
- auth.retrieve, # pyright: ignore[reportDeprecated],
- )
- )
- self.list = ( # pyright: ignore[reportDeprecated]
- to_streamed_response_wrapper(
- auth.list, # pyright: ignore[reportDeprecated],
- )
- )
- self.delete = ( # pyright: ignore[reportDeprecated]
- to_streamed_response_wrapper(
- auth.delete, # pyright: ignore[reportDeprecated],
- )
- )
-
- @cached_property
- def invocations(self) -> InvocationsResourceWithStreamingResponse:
- return InvocationsResourceWithStreamingResponse(self._auth.invocations)
-
-
-class AsyncAuthResourceWithStreamingResponse:
- def __init__(self, auth: AsyncAuthResource) -> None:
- self._auth = auth
-
- self.create = ( # pyright: ignore[reportDeprecated]
- async_to_streamed_response_wrapper(
- auth.create, # pyright: ignore[reportDeprecated],
- )
- )
- self.retrieve = ( # pyright: ignore[reportDeprecated]
- async_to_streamed_response_wrapper(
- auth.retrieve, # pyright: ignore[reportDeprecated],
- )
- )
- self.list = ( # pyright: ignore[reportDeprecated]
- async_to_streamed_response_wrapper(
- auth.list, # pyright: ignore[reportDeprecated],
- )
- )
- self.delete = ( # pyright: ignore[reportDeprecated]
- async_to_streamed_response_wrapper(
- auth.delete, # pyright: ignore[reportDeprecated],
- )
- )
-
- @cached_property
- def invocations(self) -> AsyncInvocationsResourceWithStreamingResponse:
- return AsyncInvocationsResourceWithStreamingResponse(self._auth.invocations)
diff --git a/src/kernel/resources/agents/auth/invocations.py b/src/kernel/resources/agents/auth/invocations.py
deleted file mode 100644
index 617afdd..0000000
--- a/src/kernel/resources/agents/auth/invocations.py
+++ /dev/null
@@ -1,682 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from __future__ import annotations
-
-import typing_extensions
-from typing import Dict
-from typing_extensions import Literal, overload
-
-import httpx
-
-from ...._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
-from ...._utils import required_args, maybe_transform, async_maybe_transform
-from ...._compat import cached_property
-from ...._resource import SyncAPIResource, AsyncAPIResource
-from ...._response import (
- to_raw_response_wrapper,
- to_streamed_response_wrapper,
- async_to_raw_response_wrapper,
- async_to_streamed_response_wrapper,
-)
-from ...._base_client import make_request_options
-from ....types.agents.auth import invocation_create_params, invocation_submit_params, invocation_exchange_params
-from ....types.agents.agent_auth_submit_response import AgentAuthSubmitResponse
-from ....types.agents.agent_auth_invocation_response import AgentAuthInvocationResponse
-from ....types.agents.auth.invocation_exchange_response import InvocationExchangeResponse
-from ....types.agents.auth_agent_invocation_create_response import AuthAgentInvocationCreateResponse
-
-__all__ = ["InvocationsResource", "AsyncInvocationsResource"]
-
-
-class InvocationsResource(SyncAPIResource):
- @cached_property
- def with_raw_response(self) -> InvocationsResourceWithRawResponse:
- """
- This property can be used as a prefix for any HTTP method call to return
- the raw response object instead of the parsed content.
-
- For more information, see https://www.github.com/kernel/kernel-python-sdk#accessing-raw-response-data-eg-headers
- """
- return InvocationsResourceWithRawResponse(self)
-
- @cached_property
- def with_streaming_response(self) -> InvocationsResourceWithStreamingResponse:
- """
- An alternative to `.with_raw_response` that doesn't eagerly read the response body.
-
- For more information, see https://www.github.com/kernel/kernel-python-sdk#with_streaming_response
- """
- return InvocationsResourceWithStreamingResponse(self)
-
- @typing_extensions.deprecated("deprecated")
- def create(
- self,
- *,
- auth_agent_id: str,
- save_credential_as: str | Omit = omit,
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
- # The extra values given here take precedence over values defined on the client or passed to this method.
- extra_headers: Headers | None = None,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> AuthAgentInvocationCreateResponse:
- """
- **Deprecated: Use POST /auth/connections/{id}/login instead.** Creates a new
- authentication invocation for the specified auth agent. This starts the auth
- flow and returns a hosted URL for the user to complete authentication.
-
- Args:
- auth_agent_id: ID of the auth agent to create an invocation for
-
- save_credential_as: If provided, saves the submitted credentials under this name upon successful
- login. The credential will be linked to the auth agent for automatic
- re-authentication.
-
- extra_headers: Send extra headers
-
- extra_query: Add additional query parameters to the request
-
- extra_body: Add additional JSON properties to the request
-
- timeout: Override the client-level default timeout for this request, in seconds
- """
- return self._post(
- "/agents/auth/invocations",
- body=maybe_transform(
- {
- "auth_agent_id": auth_agent_id,
- "save_credential_as": save_credential_as,
- },
- invocation_create_params.InvocationCreateParams,
- ),
- options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
- ),
- cast_to=AuthAgentInvocationCreateResponse,
- )
-
- @typing_extensions.deprecated("deprecated")
- def retrieve(
- self,
- invocation_id: str,
- *,
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
- # The extra values given here take precedence over values defined on the client or passed to this method.
- extra_headers: Headers | None = None,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> AgentAuthInvocationResponse:
- """
- **Deprecated: Use GET /auth/connections/{id} instead.** Returns invocation
- details including status, app_name, and domain. Supports both API key and JWT
- (from exchange endpoint) authentication.
-
- Args:
- extra_headers: Send extra headers
-
- extra_query: Add additional query parameters to the request
-
- extra_body: Add additional JSON properties to the request
-
- timeout: Override the client-level default timeout for this request, in seconds
- """
- if not invocation_id:
- raise ValueError(f"Expected a non-empty value for `invocation_id` but received {invocation_id!r}")
- return self._get(
- f"/agents/auth/invocations/{invocation_id}",
- options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
- ),
- cast_to=AgentAuthInvocationResponse,
- )
-
- @typing_extensions.deprecated("deprecated")
- def exchange(
- self,
- invocation_id: str,
- *,
- code: str,
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
- # The extra values given here take precedence over values defined on the client or passed to this method.
- extra_headers: Headers | None = None,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> InvocationExchangeResponse:
- """
- **Deprecated: Use POST /auth/connections/{id}/exchange instead.** Validates the
- handoff code and returns a JWT token for subsequent requests. No authentication
- required (the handoff code serves as the credential).
-
- Args:
- code: Handoff code from start endpoint
-
- extra_headers: Send extra headers
-
- extra_query: Add additional query parameters to the request
-
- extra_body: Add additional JSON properties to the request
-
- timeout: Override the client-level default timeout for this request, in seconds
- """
- if not invocation_id:
- raise ValueError(f"Expected a non-empty value for `invocation_id` but received {invocation_id!r}")
- return self._post(
- f"/agents/auth/invocations/{invocation_id}/exchange",
- body=maybe_transform({"code": code}, invocation_exchange_params.InvocationExchangeParams),
- options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
- ),
- cast_to=InvocationExchangeResponse,
- )
-
- @typing_extensions.deprecated("deprecated")
- @overload
- def submit(
- self,
- invocation_id: str,
- *,
- field_values: Dict[str, str],
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
- # The extra values given here take precedence over values defined on the client or passed to this method.
- extra_headers: Headers | None = None,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> AgentAuthSubmitResponse:
- """
- **Deprecated: Use POST /auth/connections/{id}/submit instead.** Submits field
- values for the discovered login form. Returns immediately after submission is
- accepted. Poll the invocation endpoint to track progress and get results.
-
- Args:
- field_values: Values for the discovered login fields
-
- extra_headers: Send extra headers
-
- extra_query: Add additional query parameters to the request
-
- extra_body: Add additional JSON properties to the request
-
- timeout: Override the client-level default timeout for this request, in seconds
- """
- ...
-
- @typing_extensions.deprecated("deprecated")
- @overload
- def submit(
- self,
- invocation_id: str,
- *,
- sso_button: str,
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
- # The extra values given here take precedence over values defined on the client or passed to this method.
- extra_headers: Headers | None = None,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> AgentAuthSubmitResponse:
- """
- **Deprecated: Use POST /auth/connections/{id}/submit instead.** Submits field
- values for the discovered login form. Returns immediately after submission is
- accepted. Poll the invocation endpoint to track progress and get results.
-
- Args:
- sso_button: Selector of SSO button to click
-
- extra_headers: Send extra headers
-
- extra_query: Add additional query parameters to the request
-
- extra_body: Add additional JSON properties to the request
-
- timeout: Override the client-level default timeout for this request, in seconds
- """
- ...
-
- @typing_extensions.deprecated("deprecated")
- @overload
- def submit(
- self,
- invocation_id: str,
- *,
- selected_mfa_type: Literal["sms", "call", "email", "totp", "push", "password"],
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
- # The extra values given here take precedence over values defined on the client or passed to this method.
- extra_headers: Headers | None = None,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> AgentAuthSubmitResponse:
- """
- **Deprecated: Use POST /auth/connections/{id}/submit instead.** Submits field
- values for the discovered login form. Returns immediately after submission is
- accepted. Poll the invocation endpoint to track progress and get results.
-
- Args:
- selected_mfa_type: The MFA delivery method type (includes password for auth method selection pages)
-
- extra_headers: Send extra headers
-
- extra_query: Add additional query parameters to the request
-
- extra_body: Add additional JSON properties to the request
-
- timeout: Override the client-level default timeout for this request, in seconds
- """
- ...
-
- @typing_extensions.deprecated("deprecated")
- @required_args(["field_values"], ["sso_button"], ["selected_mfa_type"])
- def submit(
- self,
- invocation_id: str,
- *,
- field_values: Dict[str, str] | Omit = omit,
- sso_button: str | Omit = omit,
- selected_mfa_type: Literal["sms", "call", "email", "totp", "push", "password"] | Omit = omit,
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
- # The extra values given here take precedence over values defined on the client or passed to this method.
- extra_headers: Headers | None = None,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> AgentAuthSubmitResponse:
- if not invocation_id:
- raise ValueError(f"Expected a non-empty value for `invocation_id` but received {invocation_id!r}")
- return self._post(
- f"/agents/auth/invocations/{invocation_id}/submit",
- body=maybe_transform(
- {
- "field_values": field_values,
- "sso_button": sso_button,
- "selected_mfa_type": selected_mfa_type,
- },
- invocation_submit_params.InvocationSubmitParams,
- ),
- options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
- ),
- cast_to=AgentAuthSubmitResponse,
- )
-
-
-class AsyncInvocationsResource(AsyncAPIResource):
- @cached_property
- def with_raw_response(self) -> AsyncInvocationsResourceWithRawResponse:
- """
- This property can be used as a prefix for any HTTP method call to return
- the raw response object instead of the parsed content.
-
- For more information, see https://www.github.com/kernel/kernel-python-sdk#accessing-raw-response-data-eg-headers
- """
- return AsyncInvocationsResourceWithRawResponse(self)
-
- @cached_property
- def with_streaming_response(self) -> AsyncInvocationsResourceWithStreamingResponse:
- """
- An alternative to `.with_raw_response` that doesn't eagerly read the response body.
-
- For more information, see https://www.github.com/kernel/kernel-python-sdk#with_streaming_response
- """
- return AsyncInvocationsResourceWithStreamingResponse(self)
-
- @typing_extensions.deprecated("deprecated")
- async def create(
- self,
- *,
- auth_agent_id: str,
- save_credential_as: str | Omit = omit,
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
- # The extra values given here take precedence over values defined on the client or passed to this method.
- extra_headers: Headers | None = None,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> AuthAgentInvocationCreateResponse:
- """
- **Deprecated: Use POST /auth/connections/{id}/login instead.** Creates a new
- authentication invocation for the specified auth agent. This starts the auth
- flow and returns a hosted URL for the user to complete authentication.
-
- Args:
- auth_agent_id: ID of the auth agent to create an invocation for
-
- save_credential_as: If provided, saves the submitted credentials under this name upon successful
- login. The credential will be linked to the auth agent for automatic
- re-authentication.
-
- extra_headers: Send extra headers
-
- extra_query: Add additional query parameters to the request
-
- extra_body: Add additional JSON properties to the request
-
- timeout: Override the client-level default timeout for this request, in seconds
- """
- return await self._post(
- "/agents/auth/invocations",
- body=await async_maybe_transform(
- {
- "auth_agent_id": auth_agent_id,
- "save_credential_as": save_credential_as,
- },
- invocation_create_params.InvocationCreateParams,
- ),
- options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
- ),
- cast_to=AuthAgentInvocationCreateResponse,
- )
-
- @typing_extensions.deprecated("deprecated")
- async def retrieve(
- self,
- invocation_id: str,
- *,
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
- # The extra values given here take precedence over values defined on the client or passed to this method.
- extra_headers: Headers | None = None,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> AgentAuthInvocationResponse:
- """
- **Deprecated: Use GET /auth/connections/{id} instead.** Returns invocation
- details including status, app_name, and domain. Supports both API key and JWT
- (from exchange endpoint) authentication.
-
- Args:
- extra_headers: Send extra headers
-
- extra_query: Add additional query parameters to the request
-
- extra_body: Add additional JSON properties to the request
-
- timeout: Override the client-level default timeout for this request, in seconds
- """
- if not invocation_id:
- raise ValueError(f"Expected a non-empty value for `invocation_id` but received {invocation_id!r}")
- return await self._get(
- f"/agents/auth/invocations/{invocation_id}",
- options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
- ),
- cast_to=AgentAuthInvocationResponse,
- )
-
- @typing_extensions.deprecated("deprecated")
- async def exchange(
- self,
- invocation_id: str,
- *,
- code: str,
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
- # The extra values given here take precedence over values defined on the client or passed to this method.
- extra_headers: Headers | None = None,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> InvocationExchangeResponse:
- """
- **Deprecated: Use POST /auth/connections/{id}/exchange instead.** Validates the
- handoff code and returns a JWT token for subsequent requests. No authentication
- required (the handoff code serves as the credential).
-
- Args:
- code: Handoff code from start endpoint
-
- extra_headers: Send extra headers
-
- extra_query: Add additional query parameters to the request
-
- extra_body: Add additional JSON properties to the request
-
- timeout: Override the client-level default timeout for this request, in seconds
- """
- if not invocation_id:
- raise ValueError(f"Expected a non-empty value for `invocation_id` but received {invocation_id!r}")
- return await self._post(
- f"/agents/auth/invocations/{invocation_id}/exchange",
- body=await async_maybe_transform({"code": code}, invocation_exchange_params.InvocationExchangeParams),
- options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
- ),
- cast_to=InvocationExchangeResponse,
- )
-
- @typing_extensions.deprecated("deprecated")
- @overload
- async def submit(
- self,
- invocation_id: str,
- *,
- field_values: Dict[str, str],
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
- # The extra values given here take precedence over values defined on the client or passed to this method.
- extra_headers: Headers | None = None,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> AgentAuthSubmitResponse:
- """
- **Deprecated: Use POST /auth/connections/{id}/submit instead.** Submits field
- values for the discovered login form. Returns immediately after submission is
- accepted. Poll the invocation endpoint to track progress and get results.
-
- Args:
- field_values: Values for the discovered login fields
-
- extra_headers: Send extra headers
-
- extra_query: Add additional query parameters to the request
-
- extra_body: Add additional JSON properties to the request
-
- timeout: Override the client-level default timeout for this request, in seconds
- """
- ...
-
- @typing_extensions.deprecated("deprecated")
- @overload
- async def submit(
- self,
- invocation_id: str,
- *,
- sso_button: str,
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
- # The extra values given here take precedence over values defined on the client or passed to this method.
- extra_headers: Headers | None = None,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> AgentAuthSubmitResponse:
- """
- **Deprecated: Use POST /auth/connections/{id}/submit instead.** Submits field
- values for the discovered login form. Returns immediately after submission is
- accepted. Poll the invocation endpoint to track progress and get results.
-
- Args:
- sso_button: Selector of SSO button to click
-
- extra_headers: Send extra headers
-
- extra_query: Add additional query parameters to the request
-
- extra_body: Add additional JSON properties to the request
-
- timeout: Override the client-level default timeout for this request, in seconds
- """
- ...
-
- @typing_extensions.deprecated("deprecated")
- @overload
- async def submit(
- self,
- invocation_id: str,
- *,
- selected_mfa_type: Literal["sms", "call", "email", "totp", "push", "password"],
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
- # The extra values given here take precedence over values defined on the client or passed to this method.
- extra_headers: Headers | None = None,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> AgentAuthSubmitResponse:
- """
- **Deprecated: Use POST /auth/connections/{id}/submit instead.** Submits field
- values for the discovered login form. Returns immediately after submission is
- accepted. Poll the invocation endpoint to track progress and get results.
-
- Args:
- selected_mfa_type: The MFA delivery method type (includes password for auth method selection pages)
-
- extra_headers: Send extra headers
-
- extra_query: Add additional query parameters to the request
-
- extra_body: Add additional JSON properties to the request
-
- timeout: Override the client-level default timeout for this request, in seconds
- """
- ...
-
- @typing_extensions.deprecated("deprecated")
- @required_args(["field_values"], ["sso_button"], ["selected_mfa_type"])
- async def submit(
- self,
- invocation_id: str,
- *,
- field_values: Dict[str, str] | Omit = omit,
- sso_button: str | Omit = omit,
- selected_mfa_type: Literal["sms", "call", "email", "totp", "push", "password"] | Omit = omit,
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
- # The extra values given here take precedence over values defined on the client or passed to this method.
- extra_headers: Headers | None = None,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> AgentAuthSubmitResponse:
- if not invocation_id:
- raise ValueError(f"Expected a non-empty value for `invocation_id` but received {invocation_id!r}")
- return await self._post(
- f"/agents/auth/invocations/{invocation_id}/submit",
- body=await async_maybe_transform(
- {
- "field_values": field_values,
- "sso_button": sso_button,
- "selected_mfa_type": selected_mfa_type,
- },
- invocation_submit_params.InvocationSubmitParams,
- ),
- options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
- ),
- cast_to=AgentAuthSubmitResponse,
- )
-
-
-class InvocationsResourceWithRawResponse:
- def __init__(self, invocations: InvocationsResource) -> None:
- self._invocations = invocations
-
- self.create = ( # pyright: ignore[reportDeprecated]
- to_raw_response_wrapper(
- invocations.create, # pyright: ignore[reportDeprecated],
- )
- )
- self.retrieve = ( # pyright: ignore[reportDeprecated]
- to_raw_response_wrapper(
- invocations.retrieve, # pyright: ignore[reportDeprecated],
- )
- )
- self.exchange = ( # pyright: ignore[reportDeprecated]
- to_raw_response_wrapper(
- invocations.exchange, # pyright: ignore[reportDeprecated],
- )
- )
- self.submit = ( # pyright: ignore[reportDeprecated]
- to_raw_response_wrapper(
- invocations.submit, # pyright: ignore[reportDeprecated],
- )
- )
-
-
-class AsyncInvocationsResourceWithRawResponse:
- def __init__(self, invocations: AsyncInvocationsResource) -> None:
- self._invocations = invocations
-
- self.create = ( # pyright: ignore[reportDeprecated]
- async_to_raw_response_wrapper(
- invocations.create, # pyright: ignore[reportDeprecated],
- )
- )
- self.retrieve = ( # pyright: ignore[reportDeprecated]
- async_to_raw_response_wrapper(
- invocations.retrieve, # pyright: ignore[reportDeprecated],
- )
- )
- self.exchange = ( # pyright: ignore[reportDeprecated]
- async_to_raw_response_wrapper(
- invocations.exchange, # pyright: ignore[reportDeprecated],
- )
- )
- self.submit = ( # pyright: ignore[reportDeprecated]
- async_to_raw_response_wrapper(
- invocations.submit, # pyright: ignore[reportDeprecated],
- )
- )
-
-
-class InvocationsResourceWithStreamingResponse:
- def __init__(self, invocations: InvocationsResource) -> None:
- self._invocations = invocations
-
- self.create = ( # pyright: ignore[reportDeprecated]
- to_streamed_response_wrapper(
- invocations.create, # pyright: ignore[reportDeprecated],
- )
- )
- self.retrieve = ( # pyright: ignore[reportDeprecated]
- to_streamed_response_wrapper(
- invocations.retrieve, # pyright: ignore[reportDeprecated],
- )
- )
- self.exchange = ( # pyright: ignore[reportDeprecated]
- to_streamed_response_wrapper(
- invocations.exchange, # pyright: ignore[reportDeprecated],
- )
- )
- self.submit = ( # pyright: ignore[reportDeprecated]
- to_streamed_response_wrapper(
- invocations.submit, # pyright: ignore[reportDeprecated],
- )
- )
-
-
-class AsyncInvocationsResourceWithStreamingResponse:
- def __init__(self, invocations: AsyncInvocationsResource) -> None:
- self._invocations = invocations
-
- self.create = ( # pyright: ignore[reportDeprecated]
- async_to_streamed_response_wrapper(
- invocations.create, # pyright: ignore[reportDeprecated],
- )
- )
- self.retrieve = ( # pyright: ignore[reportDeprecated]
- async_to_streamed_response_wrapper(
- invocations.retrieve, # pyright: ignore[reportDeprecated],
- )
- )
- self.exchange = ( # pyright: ignore[reportDeprecated]
- async_to_streamed_response_wrapper(
- invocations.exchange, # pyright: ignore[reportDeprecated],
- )
- )
- self.submit = ( # pyright: ignore[reportDeprecated]
- async_to_streamed_response_wrapper(
- invocations.submit, # pyright: ignore[reportDeprecated],
- )
- )
diff --git a/src/kernel/types/agents/__init__.py b/src/kernel/types/agents/__init__.py
deleted file mode 100644
index 2ecdef6..0000000
--- a/src/kernel/types/agents/__init__.py
+++ /dev/null
@@ -1,13 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from __future__ import annotations
-
-from .auth_agent import AuthAgent as AuthAgent
-from .auth_list_params import AuthListParams as AuthListParams
-from .discovered_field import DiscoveredField as DiscoveredField
-from .auth_create_params import AuthCreateParams as AuthCreateParams
-from .agent_auth_submit_response import AgentAuthSubmitResponse as AgentAuthSubmitResponse
-from .agent_auth_invocation_response import AgentAuthInvocationResponse as AgentAuthInvocationResponse
-from .auth_agent_invocation_create_response import (
- AuthAgentInvocationCreateResponse as AuthAgentInvocationCreateResponse,
-)
diff --git a/src/kernel/types/agents/agent_auth_invocation_response.py b/src/kernel/types/agents/agent_auth_invocation_response.py
deleted file mode 100644
index fa75549..0000000
--- a/src/kernel/types/agents/agent_auth_invocation_response.py
+++ /dev/null
@@ -1,101 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import List, Optional
-from datetime import datetime
-from typing_extensions import Literal
-
-from ..._models import BaseModel
-from .discovered_field import DiscoveredField
-
-__all__ = ["AgentAuthInvocationResponse", "MfaOption", "PendingSSOButton"]
-
-
-class MfaOption(BaseModel):
- """An MFA method option for verification"""
-
- label: str
- """The visible option text"""
-
- type: Literal["sms", "call", "email", "totp", "push", "password"]
- """
- The MFA delivery method type (includes password for auth method selection pages)
- """
-
- description: Optional[str] = None
- """Additional instructions from the site"""
-
- target: Optional[str] = None
- """The masked destination (phone/email) if shown"""
-
-
-class PendingSSOButton(BaseModel):
- """An SSO button for signing in with an external identity provider"""
-
- label: str
- """Visible button text"""
-
- provider: str
- """Identity provider name"""
-
- selector: str
- """XPath selector for the button"""
-
-
-class AgentAuthInvocationResponse(BaseModel):
- """Response from get invocation endpoint"""
-
- app_name: str
- """App name (org name at time of invocation creation)"""
-
- domain: str
- """Domain for authentication"""
-
- expires_at: datetime
- """When the handoff code expires"""
-
- status: Literal["IN_PROGRESS", "SUCCESS", "EXPIRED", "CANCELED", "FAILED"]
- """Invocation status"""
-
- step: Literal[
- "initialized", "discovering", "awaiting_input", "awaiting_external_action", "submitting", "completed", "expired"
- ]
- """Current step in the invocation workflow"""
-
- type: Literal["login", "reauth"]
- """The session type:
-
- - login: User-initiated authentication
- - reauth: System-triggered re-authentication (via health check)
- """
-
- error_message: Optional[str] = None
- """Error message explaining why the invocation failed (present when status=FAILED)"""
-
- external_action_message: Optional[str] = None
- """
- Instructions for user when external action is required (present when
- step=awaiting_external_action)
- """
-
- live_view_url: Optional[str] = None
- """Browser live view URL for debugging the invocation"""
-
- mfa_options: Optional[List[MfaOption]] = None
- """
- MFA method options to choose from (present when step=awaiting_input and MFA
- selection is required)
- """
-
- pending_fields: Optional[List[DiscoveredField]] = None
- """Fields currently awaiting input (present when step=awaiting_input)"""
-
- pending_sso_buttons: Optional[List[PendingSSOButton]] = None
- """SSO buttons available on the page (present when step=awaiting_input)"""
-
- sso_provider: Optional[str] = None
- """SSO provider being used for authentication (e.g., google, github, microsoft)"""
-
- submitted_fields: Optional[List[str]] = None
- """
- Names of fields that have been submitted (present when step=submitting or later)
- """
diff --git a/src/kernel/types/agents/agent_auth_submit_response.py b/src/kernel/types/agents/agent_auth_submit_response.py
deleted file mode 100644
index 8cb0df1..0000000
--- a/src/kernel/types/agents/agent_auth_submit_response.py
+++ /dev/null
@@ -1,14 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from ..._models import BaseModel
-
-__all__ = ["AgentAuthSubmitResponse"]
-
-
-class AgentAuthSubmitResponse(BaseModel):
- """
- Response from submit endpoint - returns immediately after submission is accepted
- """
-
- accepted: bool
- """Whether the submission was accepted for processing"""
diff --git a/src/kernel/types/agents/auth/__init__.py b/src/kernel/types/agents/auth/__init__.py
deleted file mode 100644
index 41e8ba8..0000000
--- a/src/kernel/types/agents/auth/__init__.py
+++ /dev/null
@@ -1,8 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from __future__ import annotations
-
-from .invocation_create_params import InvocationCreateParams as InvocationCreateParams
-from .invocation_submit_params import InvocationSubmitParams as InvocationSubmitParams
-from .invocation_exchange_params import InvocationExchangeParams as InvocationExchangeParams
-from .invocation_exchange_response import InvocationExchangeResponse as InvocationExchangeResponse
diff --git a/src/kernel/types/agents/auth/invocation_create_params.py b/src/kernel/types/agents/auth/invocation_create_params.py
deleted file mode 100644
index b2727e0..0000000
--- a/src/kernel/types/agents/auth/invocation_create_params.py
+++ /dev/null
@@ -1,19 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from __future__ import annotations
-
-from typing_extensions import Required, TypedDict
-
-__all__ = ["InvocationCreateParams"]
-
-
-class InvocationCreateParams(TypedDict, total=False):
- auth_agent_id: Required[str]
- """ID of the auth agent to create an invocation for"""
-
- save_credential_as: str
- """
- If provided, saves the submitted credentials under this name upon successful
- login. The credential will be linked to the auth agent for automatic
- re-authentication.
- """
diff --git a/src/kernel/types/agents/auth/invocation_exchange_params.py b/src/kernel/types/agents/auth/invocation_exchange_params.py
deleted file mode 100644
index 71e4d18..0000000
--- a/src/kernel/types/agents/auth/invocation_exchange_params.py
+++ /dev/null
@@ -1,12 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from __future__ import annotations
-
-from typing_extensions import Required, TypedDict
-
-__all__ = ["InvocationExchangeParams"]
-
-
-class InvocationExchangeParams(TypedDict, total=False):
- code: Required[str]
- """Handoff code from start endpoint"""
diff --git a/src/kernel/types/agents/auth/invocation_exchange_response.py b/src/kernel/types/agents/auth/invocation_exchange_response.py
deleted file mode 100644
index 710d9c3..0000000
--- a/src/kernel/types/agents/auth/invocation_exchange_response.py
+++ /dev/null
@@ -1,15 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from ...._models import BaseModel
-
-__all__ = ["InvocationExchangeResponse"]
-
-
-class InvocationExchangeResponse(BaseModel):
- """Response from exchange endpoint"""
-
- invocation_id: str
- """Invocation ID"""
-
- jwt: str
- """JWT token with invocation_id claim (30 minute TTL)"""
diff --git a/src/kernel/types/agents/auth/invocation_submit_params.py b/src/kernel/types/agents/auth/invocation_submit_params.py
deleted file mode 100644
index dc5ee5f..0000000
--- a/src/kernel/types/agents/auth/invocation_submit_params.py
+++ /dev/null
@@ -1,28 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from __future__ import annotations
-
-from typing import Dict, Union
-from typing_extensions import Literal, Required, TypeAlias, TypedDict
-
-__all__ = ["InvocationSubmitParams", "Variant0", "Variant1", "Variant2"]
-
-
-class Variant0(TypedDict, total=False):
- field_values: Required[Dict[str, str]]
- """Values for the discovered login fields"""
-
-
-class Variant1(TypedDict, total=False):
- sso_button: Required[str]
- """Selector of SSO button to click"""
-
-
-class Variant2(TypedDict, total=False):
- selected_mfa_type: Required[Literal["sms", "call", "email", "totp", "push", "password"]]
- """
- The MFA delivery method type (includes password for auth method selection pages)
- """
-
-
-InvocationSubmitParams: TypeAlias = Union[Variant0, Variant1, Variant2]
diff --git a/src/kernel/types/agents/auth_agent.py b/src/kernel/types/agents/auth_agent.py
deleted file mode 100644
index 98e1158..0000000
--- a/src/kernel/types/agents/auth_agent.py
+++ /dev/null
@@ -1,108 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import List, Optional
-from datetime import datetime
-from typing_extensions import Literal
-
-from ..._models import BaseModel
-
-__all__ = ["AuthAgent", "Credential"]
-
-
-class Credential(BaseModel):
- """Reference to credentials for the auth connection.
-
- Use one of:
- - { name } for Kernel credentials
- - { provider, path } for external provider item
- - { provider, auto: true } for external provider domain lookup
- """
-
- auto: Optional[bool] = None
- """If true, lookup by domain from the specified provider"""
-
- name: Optional[str] = None
- """Kernel credential name"""
-
- path: Optional[str] = None
- """Provider-specific path (e.g., "VaultName/ItemName" for 1Password)"""
-
- provider: Optional[str] = None
- """External provider name (e.g., "my-1p")"""
-
-
-class AuthAgent(BaseModel):
- """
- An auth agent that manages authentication for a specific domain and profile combination
- """
-
- id: str
- """Unique identifier for the auth agent"""
-
- domain: str
- """Target domain for authentication"""
-
- profile_name: str
- """Name of the profile associated with this auth agent"""
-
- status: Literal["AUTHENTICATED", "NEEDS_AUTH"]
- """Current authentication status of the managed profile"""
-
- allowed_domains: Optional[List[str]] = None
- """
- Additional domains that are valid for this auth agent's authentication flow
- (besides the primary domain). Useful when login pages redirect to different
- domains.
-
- The following SSO/OAuth provider domains are automatically allowed by default
- and do not need to be specified:
-
- - Google: accounts.google.com
- - Microsoft/Azure AD: login.microsoftonline.com, login.live.com
- - Okta: _.okta.com, _.oktapreview.com
- - Auth0: _.auth0.com, _.us.auth0.com, _.eu.auth0.com, _.au.auth0.com
- - Apple: appleid.apple.com
- - GitHub: github.com
- - Facebook/Meta: www.facebook.com
- - LinkedIn: www.linkedin.com
- - Amazon Cognito: \\**.amazoncognito.com
- - OneLogin: \\**.onelogin.com
- - Ping Identity: _.pingone.com, _.pingidentity.com
- """
-
- can_reauth: Optional[bool] = None
- """
- Whether automatic re-authentication is possible (has credential_id, selectors,
- and login_url)
- """
-
- can_reauth_reason: Optional[str] = None
- """Reason why automatic re-authentication is or is not possible"""
-
- credential: Optional[Credential] = None
- """Reference to credentials for the auth connection. Use one of:
-
- - { name } for Kernel credentials
- - { provider, path } for external provider item
- - { provider, auto: true } for external provider domain lookup
- """
-
- credential_id: Optional[str] = None
- """
- ID of the linked Kernel credential for automatic re-authentication (deprecated,
- use credential)
- """
-
- has_selectors: Optional[bool] = None
- """
- Whether this auth agent has stored selectors for deterministic re-authentication
- """
-
- last_auth_check_at: Optional[datetime] = None
- """When the last authentication check was performed"""
-
- post_login_url: Optional[str] = None
- """URL where the browser landed after successful login.
-
- Query parameters and fragments are stripped for privacy.
- """
diff --git a/src/kernel/types/agents/auth_agent_invocation_create_response.py b/src/kernel/types/agents/auth_agent_invocation_create_response.py
deleted file mode 100644
index fc5d8db..0000000
--- a/src/kernel/types/agents/auth_agent_invocation_create_response.py
+++ /dev/null
@@ -1,31 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from datetime import datetime
-from typing_extensions import Literal
-
-from ..._models import BaseModel
-
-__all__ = ["AuthAgentInvocationCreateResponse"]
-
-
-class AuthAgentInvocationCreateResponse(BaseModel):
- """Response from creating an invocation. Always returns an invocation_id."""
-
- expires_at: datetime
- """When the handoff code expires."""
-
- handoff_code: str
- """One-time code for handoff."""
-
- hosted_url: str
- """URL to redirect user to."""
-
- invocation_id: str
- """Unique identifier for the invocation."""
-
- type: Literal["login", "reauth"]
- """The session type:
-
- - login: User-initiated authentication
- - reauth: System-triggered re-authentication (via health check)
- """
diff --git a/src/kernel/types/agents/auth_create_params.py b/src/kernel/types/agents/auth_create_params.py
deleted file mode 100644
index 613f003..0000000
--- a/src/kernel/types/agents/auth_create_params.py
+++ /dev/null
@@ -1,63 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from __future__ import annotations
-
-from typing_extensions import Required, TypedDict
-
-from ..._types import SequenceNotStr
-
-__all__ = ["AuthCreateParams", "Proxy"]
-
-
-class AuthCreateParams(TypedDict, total=False):
- domain: Required[str]
- """Domain for authentication"""
-
- profile_name: Required[str]
- """Name of the profile to use for this auth agent"""
-
- allowed_domains: SequenceNotStr[str]
- """
- Additional domains that are valid for this auth agent's authentication flow
- (besides the primary domain). Useful when login pages redirect to different
- domains.
-
- The following SSO/OAuth provider domains are automatically allowed by default
- and do not need to be specified:
-
- - Google: accounts.google.com
- - Microsoft/Azure AD: login.microsoftonline.com, login.live.com
- - Okta: _.okta.com, _.oktapreview.com
- - Auth0: _.auth0.com, _.us.auth0.com, _.eu.auth0.com, _.au.auth0.com
- - Apple: appleid.apple.com
- - GitHub: github.com
- - Facebook/Meta: www.facebook.com
- - LinkedIn: www.linkedin.com
- - Amazon Cognito: \\**.amazoncognito.com
- - OneLogin: \\**.onelogin.com
- - Ping Identity: _.pingone.com, _.pingidentity.com
- """
-
- credential_name: str
- """Optional name of an existing credential to use for this auth agent.
-
- If provided, the credential will be linked to the agent and its values will be
- used to auto-fill the login form on invocation.
- """
-
- login_url: str
- """Optional login page URL.
-
- If provided, will be stored on the agent and used to skip discovery in future
- invocations.
- """
-
- proxy: Proxy
- """Optional proxy configuration"""
-
-
-class Proxy(TypedDict, total=False):
- """Optional proxy configuration"""
-
- proxy_id: str
- """ID of the proxy to use"""
diff --git a/src/kernel/types/agents/auth_list_params.py b/src/kernel/types/agents/auth_list_params.py
deleted file mode 100644
index 52d5337..0000000
--- a/src/kernel/types/agents/auth_list_params.py
+++ /dev/null
@@ -1,21 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from __future__ import annotations
-
-from typing_extensions import TypedDict
-
-__all__ = ["AuthListParams"]
-
-
-class AuthListParams(TypedDict, total=False):
- domain: str
- """Filter by domain"""
-
- limit: int
- """Maximum number of results to return"""
-
- offset: int
- """Number of results to skip"""
-
- profile_name: str
- """Filter by profile name"""
diff --git a/src/kernel/types/agents/discovered_field.py b/src/kernel/types/agents/discovered_field.py
deleted file mode 100644
index 4dbf53a..0000000
--- a/src/kernel/types/agents/discovered_field.py
+++ /dev/null
@@ -1,36 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import Optional
-from typing_extensions import Literal
-
-from ..._models import BaseModel
-
-__all__ = ["DiscoveredField"]
-
-
-class DiscoveredField(BaseModel):
- """A discovered form field"""
-
- label: str
- """Field label"""
-
- name: str
- """Field name"""
-
- selector: str
- """CSS selector for the field"""
-
- type: Literal["text", "email", "password", "tel", "number", "url", "code", "totp"]
- """Field type"""
-
- linked_mfa_type: Optional[Literal["sms", "call", "email", "totp", "push", "password"]] = None
- """
- If this field is associated with an MFA option, the type of that option (e.g.,
- password field linked to "Enter password" option)
- """
-
- placeholder: Optional[str] = None
- """Field placeholder"""
-
- required: Optional[bool] = None
- """Whether field is required"""
diff --git a/src/kernel/types/auth/connection_follow_response.py b/src/kernel/types/auth/connection_follow_response.py
index 488ec81..e54d5c1 100644
--- a/src/kernel/types/auth/connection_follow_response.py
+++ b/src/kernel/types/auth/connection_follow_response.py
@@ -8,16 +8,44 @@
from ..._models import BaseModel
from ..shared.error_event import ErrorEvent
from ..shared.heartbeat_event import HeartbeatEvent
-from ..agents.discovered_field import DiscoveredField
__all__ = [
"ConnectionFollowResponse",
"ManagedAuthStateEvent",
+ "ManagedAuthStateEventDiscoveredField",
"ManagedAuthStateEventMfaOption",
"ManagedAuthStateEventPendingSSOButton",
]
+class ManagedAuthStateEventDiscoveredField(BaseModel):
+ """A discovered form field"""
+
+ label: str
+ """Field label"""
+
+ name: str
+ """Field name"""
+
+ selector: str
+ """CSS selector for the field"""
+
+ type: Literal["text", "email", "password", "tel", "number", "url", "code", "totp"]
+ """Field type"""
+
+ linked_mfa_type: Optional[Literal["sms", "call", "email", "totp", "push", "password"]] = None
+ """
+ If this field is associated with an MFA option, the type of that option (e.g.,
+ password field linked to "Enter password" option)
+ """
+
+ placeholder: Optional[str] = None
+ """Field placeholder"""
+
+ required: Optional[bool] = None
+ """Whether field is required"""
+
+
class ManagedAuthStateEventMfaOption(BaseModel):
"""An MFA method option for verification"""
@@ -64,7 +92,7 @@ class ManagedAuthStateEvent(BaseModel):
timestamp: datetime
"""Time the state was reported."""
- discovered_fields: Optional[List[DiscoveredField]] = None
+ discovered_fields: Optional[List[ManagedAuthStateEventDiscoveredField]] = None
"""Fields awaiting input (present when flow_step=AWAITING_INPUT)."""
error_message: Optional[str] = None
diff --git a/src/kernel/types/auth/managed_auth.py b/src/kernel/types/auth/managed_auth.py
index 3fb2286..9cfc827 100644
--- a/src/kernel/types/auth/managed_auth.py
+++ b/src/kernel/types/auth/managed_auth.py
@@ -5,9 +5,8 @@
from typing_extensions import Literal
from ..._models import BaseModel
-from ..agents.discovered_field import DiscoveredField
-__all__ = ["ManagedAuth", "Credential", "MfaOption", "PendingSSOButton"]
+__all__ = ["ManagedAuth", "Credential", "DiscoveredField", "MfaOption", "PendingSSOButton"]
class Credential(BaseModel):
@@ -32,6 +31,34 @@ class Credential(BaseModel):
"""External provider name (e.g., "my-1p")"""
+class DiscoveredField(BaseModel):
+ """A discovered form field"""
+
+ label: str
+ """Field label"""
+
+ name: str
+ """Field name"""
+
+ selector: str
+ """CSS selector for the field"""
+
+ type: Literal["text", "email", "password", "tel", "number", "url", "code", "totp"]
+ """Field type"""
+
+ linked_mfa_type: Optional[Literal["sms", "call", "email", "totp", "push", "password"]] = None
+ """
+ If this field is associated with an MFA option, the type of that option (e.g.,
+ password field linked to "Enter password" option)
+ """
+
+ placeholder: Optional[str] = None
+ """Field placeholder"""
+
+ required: Optional[bool] = None
+ """Whether field is required"""
+
+
class MfaOption(BaseModel):
"""An MFA method option for verification"""
diff --git a/tests/api_resources/agents/__init__.py b/tests/api_resources/agents/__init__.py
deleted file mode 100644
index fd8019a..0000000
--- a/tests/api_resources/agents/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
diff --git a/tests/api_resources/agents/auth/__init__.py b/tests/api_resources/agents/auth/__init__.py
deleted file mode 100644
index fd8019a..0000000
--- a/tests/api_resources/agents/auth/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
diff --git a/tests/api_resources/agents/auth/test_invocations.py b/tests/api_resources/agents/auth/test_invocations.py
deleted file mode 100644
index 829a607..0000000
--- a/tests/api_resources/agents/auth/test_invocations.py
+++ /dev/null
@@ -1,653 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from __future__ import annotations
-
-import os
-from typing import Any, cast
-
-import pytest
-
-from kernel import Kernel, AsyncKernel
-from tests.utils import assert_matches_type
-from kernel.types.agents import AgentAuthSubmitResponse, AgentAuthInvocationResponse, AuthAgentInvocationCreateResponse
-from kernel.types.agents.auth import (
- InvocationExchangeResponse,
-)
-
-# pyright: reportDeprecated=false
-
-base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
-
-
-class TestInvocations:
- parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- def test_method_create(self, client: Kernel) -> None:
- with pytest.warns(DeprecationWarning):
- invocation = client.agents.auth.invocations.create(
- auth_agent_id="abc123xyz",
- )
-
- assert_matches_type(AuthAgentInvocationCreateResponse, invocation, path=["response"])
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- def test_method_create_with_all_params(self, client: Kernel) -> None:
- with pytest.warns(DeprecationWarning):
- invocation = client.agents.auth.invocations.create(
- auth_agent_id="abc123xyz",
- save_credential_as="my-netflix-login",
- )
-
- assert_matches_type(AuthAgentInvocationCreateResponse, invocation, path=["response"])
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- def test_raw_response_create(self, client: Kernel) -> None:
- with pytest.warns(DeprecationWarning):
- response = client.agents.auth.invocations.with_raw_response.create(
- auth_agent_id="abc123xyz",
- )
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- invocation = response.parse()
- assert_matches_type(AuthAgentInvocationCreateResponse, invocation, path=["response"])
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- def test_streaming_response_create(self, client: Kernel) -> None:
- with pytest.warns(DeprecationWarning):
- with client.agents.auth.invocations.with_streaming_response.create(
- auth_agent_id="abc123xyz",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- invocation = response.parse()
- assert_matches_type(AuthAgentInvocationCreateResponse, invocation, path=["response"])
-
- assert cast(Any, response.is_closed) is True
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- def test_method_retrieve(self, client: Kernel) -> None:
- with pytest.warns(DeprecationWarning):
- invocation = client.agents.auth.invocations.retrieve(
- "invocation_id",
- )
-
- assert_matches_type(AgentAuthInvocationResponse, invocation, path=["response"])
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- def test_raw_response_retrieve(self, client: Kernel) -> None:
- with pytest.warns(DeprecationWarning):
- response = client.agents.auth.invocations.with_raw_response.retrieve(
- "invocation_id",
- )
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- invocation = response.parse()
- assert_matches_type(AgentAuthInvocationResponse, invocation, path=["response"])
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- def test_streaming_response_retrieve(self, client: Kernel) -> None:
- with pytest.warns(DeprecationWarning):
- with client.agents.auth.invocations.with_streaming_response.retrieve(
- "invocation_id",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- invocation = response.parse()
- assert_matches_type(AgentAuthInvocationResponse, invocation, path=["response"])
-
- assert cast(Any, response.is_closed) is True
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- def test_path_params_retrieve(self, client: Kernel) -> None:
- with pytest.warns(DeprecationWarning):
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `invocation_id` but received ''"):
- client.agents.auth.invocations.with_raw_response.retrieve(
- "",
- )
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- def test_method_exchange(self, client: Kernel) -> None:
- with pytest.warns(DeprecationWarning):
- invocation = client.agents.auth.invocations.exchange(
- invocation_id="invocation_id",
- code="abc123xyz",
- )
-
- assert_matches_type(InvocationExchangeResponse, invocation, path=["response"])
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- def test_raw_response_exchange(self, client: Kernel) -> None:
- with pytest.warns(DeprecationWarning):
- response = client.agents.auth.invocations.with_raw_response.exchange(
- invocation_id="invocation_id",
- code="abc123xyz",
- )
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- invocation = response.parse()
- assert_matches_type(InvocationExchangeResponse, invocation, path=["response"])
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- def test_streaming_response_exchange(self, client: Kernel) -> None:
- with pytest.warns(DeprecationWarning):
- with client.agents.auth.invocations.with_streaming_response.exchange(
- invocation_id="invocation_id",
- code="abc123xyz",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- invocation = response.parse()
- assert_matches_type(InvocationExchangeResponse, invocation, path=["response"])
-
- assert cast(Any, response.is_closed) is True
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- def test_path_params_exchange(self, client: Kernel) -> None:
- with pytest.warns(DeprecationWarning):
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `invocation_id` but received ''"):
- client.agents.auth.invocations.with_raw_response.exchange(
- invocation_id="",
- code="abc123xyz",
- )
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- def test_method_submit_overload_1(self, client: Kernel) -> None:
- with pytest.warns(DeprecationWarning):
- invocation = client.agents.auth.invocations.submit(
- invocation_id="invocation_id",
- field_values={
- "email": "user@example.com",
- "password": "********",
- },
- )
-
- assert_matches_type(AgentAuthSubmitResponse, invocation, path=["response"])
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- def test_raw_response_submit_overload_1(self, client: Kernel) -> None:
- with pytest.warns(DeprecationWarning):
- response = client.agents.auth.invocations.with_raw_response.submit(
- invocation_id="invocation_id",
- field_values={
- "email": "user@example.com",
- "password": "********",
- },
- )
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- invocation = response.parse()
- assert_matches_type(AgentAuthSubmitResponse, invocation, path=["response"])
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- def test_streaming_response_submit_overload_1(self, client: Kernel) -> None:
- with pytest.warns(DeprecationWarning):
- with client.agents.auth.invocations.with_streaming_response.submit(
- invocation_id="invocation_id",
- field_values={
- "email": "user@example.com",
- "password": "********",
- },
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- invocation = response.parse()
- assert_matches_type(AgentAuthSubmitResponse, invocation, path=["response"])
-
- assert cast(Any, response.is_closed) is True
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- def test_path_params_submit_overload_1(self, client: Kernel) -> None:
- with pytest.warns(DeprecationWarning):
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `invocation_id` but received ''"):
- client.agents.auth.invocations.with_raw_response.submit(
- invocation_id="",
- field_values={
- "email": "user@example.com",
- "password": "********",
- },
- )
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- def test_method_submit_overload_2(self, client: Kernel) -> None:
- with pytest.warns(DeprecationWarning):
- invocation = client.agents.auth.invocations.submit(
- invocation_id="invocation_id",
- sso_button="xpath=//button[contains(text(), 'Continue with Google')]",
- )
-
- assert_matches_type(AgentAuthSubmitResponse, invocation, path=["response"])
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- def test_raw_response_submit_overload_2(self, client: Kernel) -> None:
- with pytest.warns(DeprecationWarning):
- response = client.agents.auth.invocations.with_raw_response.submit(
- invocation_id="invocation_id",
- sso_button="xpath=//button[contains(text(), 'Continue with Google')]",
- )
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- invocation = response.parse()
- assert_matches_type(AgentAuthSubmitResponse, invocation, path=["response"])
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- def test_streaming_response_submit_overload_2(self, client: Kernel) -> None:
- with pytest.warns(DeprecationWarning):
- with client.agents.auth.invocations.with_streaming_response.submit(
- invocation_id="invocation_id",
- sso_button="xpath=//button[contains(text(), 'Continue with Google')]",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- invocation = response.parse()
- assert_matches_type(AgentAuthSubmitResponse, invocation, path=["response"])
-
- assert cast(Any, response.is_closed) is True
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- def test_path_params_submit_overload_2(self, client: Kernel) -> None:
- with pytest.warns(DeprecationWarning):
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `invocation_id` but received ''"):
- client.agents.auth.invocations.with_raw_response.submit(
- invocation_id="",
- sso_button="xpath=//button[contains(text(), 'Continue with Google')]",
- )
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- def test_method_submit_overload_3(self, client: Kernel) -> None:
- with pytest.warns(DeprecationWarning):
- invocation = client.agents.auth.invocations.submit(
- invocation_id="invocation_id",
- selected_mfa_type="sms",
- )
-
- assert_matches_type(AgentAuthSubmitResponse, invocation, path=["response"])
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- def test_raw_response_submit_overload_3(self, client: Kernel) -> None:
- with pytest.warns(DeprecationWarning):
- response = client.agents.auth.invocations.with_raw_response.submit(
- invocation_id="invocation_id",
- selected_mfa_type="sms",
- )
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- invocation = response.parse()
- assert_matches_type(AgentAuthSubmitResponse, invocation, path=["response"])
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- def test_streaming_response_submit_overload_3(self, client: Kernel) -> None:
- with pytest.warns(DeprecationWarning):
- with client.agents.auth.invocations.with_streaming_response.submit(
- invocation_id="invocation_id",
- selected_mfa_type="sms",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- invocation = response.parse()
- assert_matches_type(AgentAuthSubmitResponse, invocation, path=["response"])
-
- assert cast(Any, response.is_closed) is True
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- def test_path_params_submit_overload_3(self, client: Kernel) -> None:
- with pytest.warns(DeprecationWarning):
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `invocation_id` but received ''"):
- client.agents.auth.invocations.with_raw_response.submit(
- invocation_id="",
- selected_mfa_type="sms",
- )
-
-
-class TestAsyncInvocations:
- parametrize = pytest.mark.parametrize(
- "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
- )
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- async def test_method_create(self, async_client: AsyncKernel) -> None:
- with pytest.warns(DeprecationWarning):
- invocation = await async_client.agents.auth.invocations.create(
- auth_agent_id="abc123xyz",
- )
-
- assert_matches_type(AuthAgentInvocationCreateResponse, invocation, path=["response"])
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- async def test_method_create_with_all_params(self, async_client: AsyncKernel) -> None:
- with pytest.warns(DeprecationWarning):
- invocation = await async_client.agents.auth.invocations.create(
- auth_agent_id="abc123xyz",
- save_credential_as="my-netflix-login",
- )
-
- assert_matches_type(AuthAgentInvocationCreateResponse, invocation, path=["response"])
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- async def test_raw_response_create(self, async_client: AsyncKernel) -> None:
- with pytest.warns(DeprecationWarning):
- response = await async_client.agents.auth.invocations.with_raw_response.create(
- auth_agent_id="abc123xyz",
- )
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- invocation = await response.parse()
- assert_matches_type(AuthAgentInvocationCreateResponse, invocation, path=["response"])
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- async def test_streaming_response_create(self, async_client: AsyncKernel) -> None:
- with pytest.warns(DeprecationWarning):
- async with async_client.agents.auth.invocations.with_streaming_response.create(
- auth_agent_id="abc123xyz",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- invocation = await response.parse()
- assert_matches_type(AuthAgentInvocationCreateResponse, invocation, path=["response"])
-
- assert cast(Any, response.is_closed) is True
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- async def test_method_retrieve(self, async_client: AsyncKernel) -> None:
- with pytest.warns(DeprecationWarning):
- invocation = await async_client.agents.auth.invocations.retrieve(
- "invocation_id",
- )
-
- assert_matches_type(AgentAuthInvocationResponse, invocation, path=["response"])
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- async def test_raw_response_retrieve(self, async_client: AsyncKernel) -> None:
- with pytest.warns(DeprecationWarning):
- response = await async_client.agents.auth.invocations.with_raw_response.retrieve(
- "invocation_id",
- )
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- invocation = await response.parse()
- assert_matches_type(AgentAuthInvocationResponse, invocation, path=["response"])
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- async def test_streaming_response_retrieve(self, async_client: AsyncKernel) -> None:
- with pytest.warns(DeprecationWarning):
- async with async_client.agents.auth.invocations.with_streaming_response.retrieve(
- "invocation_id",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- invocation = await response.parse()
- assert_matches_type(AgentAuthInvocationResponse, invocation, path=["response"])
-
- assert cast(Any, response.is_closed) is True
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- async def test_path_params_retrieve(self, async_client: AsyncKernel) -> None:
- with pytest.warns(DeprecationWarning):
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `invocation_id` but received ''"):
- await async_client.agents.auth.invocations.with_raw_response.retrieve(
- "",
- )
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- async def test_method_exchange(self, async_client: AsyncKernel) -> None:
- with pytest.warns(DeprecationWarning):
- invocation = await async_client.agents.auth.invocations.exchange(
- invocation_id="invocation_id",
- code="abc123xyz",
- )
-
- assert_matches_type(InvocationExchangeResponse, invocation, path=["response"])
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- async def test_raw_response_exchange(self, async_client: AsyncKernel) -> None:
- with pytest.warns(DeprecationWarning):
- response = await async_client.agents.auth.invocations.with_raw_response.exchange(
- invocation_id="invocation_id",
- code="abc123xyz",
- )
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- invocation = await response.parse()
- assert_matches_type(InvocationExchangeResponse, invocation, path=["response"])
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- async def test_streaming_response_exchange(self, async_client: AsyncKernel) -> None:
- with pytest.warns(DeprecationWarning):
- async with async_client.agents.auth.invocations.with_streaming_response.exchange(
- invocation_id="invocation_id",
- code="abc123xyz",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- invocation = await response.parse()
- assert_matches_type(InvocationExchangeResponse, invocation, path=["response"])
-
- assert cast(Any, response.is_closed) is True
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- async def test_path_params_exchange(self, async_client: AsyncKernel) -> None:
- with pytest.warns(DeprecationWarning):
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `invocation_id` but received ''"):
- await async_client.agents.auth.invocations.with_raw_response.exchange(
- invocation_id="",
- code="abc123xyz",
- )
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- async def test_method_submit_overload_1(self, async_client: AsyncKernel) -> None:
- with pytest.warns(DeprecationWarning):
- invocation = await async_client.agents.auth.invocations.submit(
- invocation_id="invocation_id",
- field_values={
- "email": "user@example.com",
- "password": "********",
- },
- )
-
- assert_matches_type(AgentAuthSubmitResponse, invocation, path=["response"])
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- async def test_raw_response_submit_overload_1(self, async_client: AsyncKernel) -> None:
- with pytest.warns(DeprecationWarning):
- response = await async_client.agents.auth.invocations.with_raw_response.submit(
- invocation_id="invocation_id",
- field_values={
- "email": "user@example.com",
- "password": "********",
- },
- )
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- invocation = await response.parse()
- assert_matches_type(AgentAuthSubmitResponse, invocation, path=["response"])
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- async def test_streaming_response_submit_overload_1(self, async_client: AsyncKernel) -> None:
- with pytest.warns(DeprecationWarning):
- async with async_client.agents.auth.invocations.with_streaming_response.submit(
- invocation_id="invocation_id",
- field_values={
- "email": "user@example.com",
- "password": "********",
- },
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- invocation = await response.parse()
- assert_matches_type(AgentAuthSubmitResponse, invocation, path=["response"])
-
- assert cast(Any, response.is_closed) is True
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- async def test_path_params_submit_overload_1(self, async_client: AsyncKernel) -> None:
- with pytest.warns(DeprecationWarning):
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `invocation_id` but received ''"):
- await async_client.agents.auth.invocations.with_raw_response.submit(
- invocation_id="",
- field_values={
- "email": "user@example.com",
- "password": "********",
- },
- )
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- async def test_method_submit_overload_2(self, async_client: AsyncKernel) -> None:
- with pytest.warns(DeprecationWarning):
- invocation = await async_client.agents.auth.invocations.submit(
- invocation_id="invocation_id",
- sso_button="xpath=//button[contains(text(), 'Continue with Google')]",
- )
-
- assert_matches_type(AgentAuthSubmitResponse, invocation, path=["response"])
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- async def test_raw_response_submit_overload_2(self, async_client: AsyncKernel) -> None:
- with pytest.warns(DeprecationWarning):
- response = await async_client.agents.auth.invocations.with_raw_response.submit(
- invocation_id="invocation_id",
- sso_button="xpath=//button[contains(text(), 'Continue with Google')]",
- )
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- invocation = await response.parse()
- assert_matches_type(AgentAuthSubmitResponse, invocation, path=["response"])
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- async def test_streaming_response_submit_overload_2(self, async_client: AsyncKernel) -> None:
- with pytest.warns(DeprecationWarning):
- async with async_client.agents.auth.invocations.with_streaming_response.submit(
- invocation_id="invocation_id",
- sso_button="xpath=//button[contains(text(), 'Continue with Google')]",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- invocation = await response.parse()
- assert_matches_type(AgentAuthSubmitResponse, invocation, path=["response"])
-
- assert cast(Any, response.is_closed) is True
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- async def test_path_params_submit_overload_2(self, async_client: AsyncKernel) -> None:
- with pytest.warns(DeprecationWarning):
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `invocation_id` but received ''"):
- await async_client.agents.auth.invocations.with_raw_response.submit(
- invocation_id="",
- sso_button="xpath=//button[contains(text(), 'Continue with Google')]",
- )
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- async def test_method_submit_overload_3(self, async_client: AsyncKernel) -> None:
- with pytest.warns(DeprecationWarning):
- invocation = await async_client.agents.auth.invocations.submit(
- invocation_id="invocation_id",
- selected_mfa_type="sms",
- )
-
- assert_matches_type(AgentAuthSubmitResponse, invocation, path=["response"])
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- async def test_raw_response_submit_overload_3(self, async_client: AsyncKernel) -> None:
- with pytest.warns(DeprecationWarning):
- response = await async_client.agents.auth.invocations.with_raw_response.submit(
- invocation_id="invocation_id",
- selected_mfa_type="sms",
- )
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- invocation = await response.parse()
- assert_matches_type(AgentAuthSubmitResponse, invocation, path=["response"])
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- async def test_streaming_response_submit_overload_3(self, async_client: AsyncKernel) -> None:
- with pytest.warns(DeprecationWarning):
- async with async_client.agents.auth.invocations.with_streaming_response.submit(
- invocation_id="invocation_id",
- selected_mfa_type="sms",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- invocation = await response.parse()
- assert_matches_type(AgentAuthSubmitResponse, invocation, path=["response"])
-
- assert cast(Any, response.is_closed) is True
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- async def test_path_params_submit_overload_3(self, async_client: AsyncKernel) -> None:
- with pytest.warns(DeprecationWarning):
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `invocation_id` but received ''"):
- await async_client.agents.auth.invocations.with_raw_response.submit(
- invocation_id="",
- selected_mfa_type="sms",
- )
diff --git a/tests/api_resources/agents/test_auth.py b/tests/api_resources/agents/test_auth.py
deleted file mode 100644
index c64d77d..0000000
--- a/tests/api_resources/agents/test_auth.py
+++ /dev/null
@@ -1,417 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from __future__ import annotations
-
-import os
-from typing import Any, cast
-
-import pytest
-
-from kernel import Kernel, AsyncKernel
-from tests.utils import assert_matches_type
-from kernel.pagination import SyncOffsetPagination, AsyncOffsetPagination
-from kernel.types.agents import AuthAgent
-
-# pyright: reportDeprecated=false
-
-base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
-
-
-class TestAuth:
- parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- def test_method_create(self, client: Kernel) -> None:
- with pytest.warns(DeprecationWarning):
- auth = client.agents.auth.create(
- domain="netflix.com",
- profile_name="user-123",
- )
-
- assert_matches_type(AuthAgent, auth, path=["response"])
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- def test_method_create_with_all_params(self, client: Kernel) -> None:
- with pytest.warns(DeprecationWarning):
- auth = client.agents.auth.create(
- domain="netflix.com",
- profile_name="user-123",
- allowed_domains=["login.netflix.com", "auth.netflix.com"],
- credential_name="my-netflix-login",
- login_url="https://netflix.com/login",
- proxy={"proxy_id": "proxy_id"},
- )
-
- assert_matches_type(AuthAgent, auth, path=["response"])
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- def test_raw_response_create(self, client: Kernel) -> None:
- with pytest.warns(DeprecationWarning):
- response = client.agents.auth.with_raw_response.create(
- domain="netflix.com",
- profile_name="user-123",
- )
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- auth = response.parse()
- assert_matches_type(AuthAgent, auth, path=["response"])
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- def test_streaming_response_create(self, client: Kernel) -> None:
- with pytest.warns(DeprecationWarning):
- with client.agents.auth.with_streaming_response.create(
- domain="netflix.com",
- profile_name="user-123",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- auth = response.parse()
- assert_matches_type(AuthAgent, auth, path=["response"])
-
- assert cast(Any, response.is_closed) is True
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- def test_method_retrieve(self, client: Kernel) -> None:
- with pytest.warns(DeprecationWarning):
- auth = client.agents.auth.retrieve(
- "id",
- )
-
- assert_matches_type(AuthAgent, auth, path=["response"])
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- def test_raw_response_retrieve(self, client: Kernel) -> None:
- with pytest.warns(DeprecationWarning):
- response = client.agents.auth.with_raw_response.retrieve(
- "id",
- )
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- auth = response.parse()
- assert_matches_type(AuthAgent, auth, path=["response"])
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- def test_streaming_response_retrieve(self, client: Kernel) -> None:
- with pytest.warns(DeprecationWarning):
- with client.agents.auth.with_streaming_response.retrieve(
- "id",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- auth = response.parse()
- assert_matches_type(AuthAgent, auth, path=["response"])
-
- assert cast(Any, response.is_closed) is True
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- def test_path_params_retrieve(self, client: Kernel) -> None:
- with pytest.warns(DeprecationWarning):
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
- client.agents.auth.with_raw_response.retrieve(
- "",
- )
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- def test_method_list(self, client: Kernel) -> None:
- with pytest.warns(DeprecationWarning):
- auth = client.agents.auth.list()
-
- assert_matches_type(SyncOffsetPagination[AuthAgent], auth, path=["response"])
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- def test_method_list_with_all_params(self, client: Kernel) -> None:
- with pytest.warns(DeprecationWarning):
- auth = client.agents.auth.list(
- domain="domain",
- limit=100,
- offset=0,
- profile_name="profile_name",
- )
-
- assert_matches_type(SyncOffsetPagination[AuthAgent], auth, path=["response"])
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- def test_raw_response_list(self, client: Kernel) -> None:
- with pytest.warns(DeprecationWarning):
- response = client.agents.auth.with_raw_response.list()
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- auth = response.parse()
- assert_matches_type(SyncOffsetPagination[AuthAgent], auth, path=["response"])
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- def test_streaming_response_list(self, client: Kernel) -> None:
- with pytest.warns(DeprecationWarning):
- with client.agents.auth.with_streaming_response.list() as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- auth = response.parse()
- assert_matches_type(SyncOffsetPagination[AuthAgent], auth, path=["response"])
-
- assert cast(Any, response.is_closed) is True
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- def test_method_delete(self, client: Kernel) -> None:
- with pytest.warns(DeprecationWarning):
- auth = client.agents.auth.delete(
- "id",
- )
-
- assert auth is None
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- def test_raw_response_delete(self, client: Kernel) -> None:
- with pytest.warns(DeprecationWarning):
- response = client.agents.auth.with_raw_response.delete(
- "id",
- )
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- auth = response.parse()
- assert auth is None
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- def test_streaming_response_delete(self, client: Kernel) -> None:
- with pytest.warns(DeprecationWarning):
- with client.agents.auth.with_streaming_response.delete(
- "id",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- auth = response.parse()
- assert auth is None
-
- assert cast(Any, response.is_closed) is True
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- def test_path_params_delete(self, client: Kernel) -> None:
- with pytest.warns(DeprecationWarning):
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
- client.agents.auth.with_raw_response.delete(
- "",
- )
-
-
-class TestAsyncAuth:
- parametrize = pytest.mark.parametrize(
- "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
- )
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- async def test_method_create(self, async_client: AsyncKernel) -> None:
- with pytest.warns(DeprecationWarning):
- auth = await async_client.agents.auth.create(
- domain="netflix.com",
- profile_name="user-123",
- )
-
- assert_matches_type(AuthAgent, auth, path=["response"])
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- async def test_method_create_with_all_params(self, async_client: AsyncKernel) -> None:
- with pytest.warns(DeprecationWarning):
- auth = await async_client.agents.auth.create(
- domain="netflix.com",
- profile_name="user-123",
- allowed_domains=["login.netflix.com", "auth.netflix.com"],
- credential_name="my-netflix-login",
- login_url="https://netflix.com/login",
- proxy={"proxy_id": "proxy_id"},
- )
-
- assert_matches_type(AuthAgent, auth, path=["response"])
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- async def test_raw_response_create(self, async_client: AsyncKernel) -> None:
- with pytest.warns(DeprecationWarning):
- response = await async_client.agents.auth.with_raw_response.create(
- domain="netflix.com",
- profile_name="user-123",
- )
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- auth = await response.parse()
- assert_matches_type(AuthAgent, auth, path=["response"])
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- async def test_streaming_response_create(self, async_client: AsyncKernel) -> None:
- with pytest.warns(DeprecationWarning):
- async with async_client.agents.auth.with_streaming_response.create(
- domain="netflix.com",
- profile_name="user-123",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- auth = await response.parse()
- assert_matches_type(AuthAgent, auth, path=["response"])
-
- assert cast(Any, response.is_closed) is True
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- async def test_method_retrieve(self, async_client: AsyncKernel) -> None:
- with pytest.warns(DeprecationWarning):
- auth = await async_client.agents.auth.retrieve(
- "id",
- )
-
- assert_matches_type(AuthAgent, auth, path=["response"])
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- async def test_raw_response_retrieve(self, async_client: AsyncKernel) -> None:
- with pytest.warns(DeprecationWarning):
- response = await async_client.agents.auth.with_raw_response.retrieve(
- "id",
- )
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- auth = await response.parse()
- assert_matches_type(AuthAgent, auth, path=["response"])
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- async def test_streaming_response_retrieve(self, async_client: AsyncKernel) -> None:
- with pytest.warns(DeprecationWarning):
- async with async_client.agents.auth.with_streaming_response.retrieve(
- "id",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- auth = await response.parse()
- assert_matches_type(AuthAgent, auth, path=["response"])
-
- assert cast(Any, response.is_closed) is True
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- async def test_path_params_retrieve(self, async_client: AsyncKernel) -> None:
- with pytest.warns(DeprecationWarning):
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
- await async_client.agents.auth.with_raw_response.retrieve(
- "",
- )
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- async def test_method_list(self, async_client: AsyncKernel) -> None:
- with pytest.warns(DeprecationWarning):
- auth = await async_client.agents.auth.list()
-
- assert_matches_type(AsyncOffsetPagination[AuthAgent], auth, path=["response"])
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- async def test_method_list_with_all_params(self, async_client: AsyncKernel) -> None:
- with pytest.warns(DeprecationWarning):
- auth = await async_client.agents.auth.list(
- domain="domain",
- limit=100,
- offset=0,
- profile_name="profile_name",
- )
-
- assert_matches_type(AsyncOffsetPagination[AuthAgent], auth, path=["response"])
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- async def test_raw_response_list(self, async_client: AsyncKernel) -> None:
- with pytest.warns(DeprecationWarning):
- response = await async_client.agents.auth.with_raw_response.list()
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- auth = await response.parse()
- assert_matches_type(AsyncOffsetPagination[AuthAgent], auth, path=["response"])
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- async def test_streaming_response_list(self, async_client: AsyncKernel) -> None:
- with pytest.warns(DeprecationWarning):
- async with async_client.agents.auth.with_streaming_response.list() as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- auth = await response.parse()
- assert_matches_type(AsyncOffsetPagination[AuthAgent], auth, path=["response"])
-
- assert cast(Any, response.is_closed) is True
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- async def test_method_delete(self, async_client: AsyncKernel) -> None:
- with pytest.warns(DeprecationWarning):
- auth = await async_client.agents.auth.delete(
- "id",
- )
-
- assert auth is None
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- async def test_raw_response_delete(self, async_client: AsyncKernel) -> None:
- with pytest.warns(DeprecationWarning):
- response = await async_client.agents.auth.with_raw_response.delete(
- "id",
- )
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- auth = await response.parse()
- assert auth is None
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- async def test_streaming_response_delete(self, async_client: AsyncKernel) -> None:
- with pytest.warns(DeprecationWarning):
- async with async_client.agents.auth.with_streaming_response.delete(
- "id",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- auth = await response.parse()
- assert auth is None
-
- assert cast(Any, response.is_closed) is True
-
- @pytest.mark.skip(reason="Prism tests are disabled")
- @parametrize
- async def test_path_params_delete(self, async_client: AsyncKernel) -> None:
- with pytest.warns(DeprecationWarning):
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
- await async_client.agents.auth.with_raw_response.delete(
- "",
- )
From 8e144ab2740f5d9161123840296f3d8809b0a79d Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 10 Feb 2026 03:55:03 +0000
Subject: [PATCH 4/5] chore(internal): bump dependencies
---
requirements-dev.lock | 20 ++++++++++----------
requirements.lock | 8 ++++----
2 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/requirements-dev.lock b/requirements-dev.lock
index 7643dfb..4a38b20 100644
--- a/requirements-dev.lock
+++ b/requirements-dev.lock
@@ -12,14 +12,14 @@
-e file:.
aiohappyeyeballs==2.6.1
# via aiohttp
-aiohttp==3.13.2
+aiohttp==3.13.3
# via httpx-aiohttp
# via kernel
aiosignal==1.4.0
# via aiohttp
annotated-types==0.7.0
# via pydantic
-anyio==4.12.0
+anyio==4.12.1
# via httpx
# via kernel
argcomplete==3.6.3
@@ -31,7 +31,7 @@ attrs==25.4.0
# via nox
backports-asyncio-runner==1.2.0
# via pytest-asyncio
-certifi==2025.11.12
+certifi==2026.1.4
# via httpcore
# via httpx
colorlog==6.10.1
@@ -61,7 +61,7 @@ httpx==0.28.1
# via httpx-aiohttp
# via kernel
# via respx
-httpx-aiohttp==0.1.9
+httpx-aiohttp==0.1.12
# via kernel
humanize==4.13.0
# via nox
@@ -69,7 +69,7 @@ idna==3.11
# via anyio
# via httpx
# via yarl
-importlib-metadata==8.7.0
+importlib-metadata==8.7.1
iniconfig==2.1.0
# via pytest
markdown-it-py==3.0.0
@@ -82,14 +82,14 @@ multidict==6.7.0
mypy==1.17.0
mypy-extensions==1.1.0
# via mypy
-nodeenv==1.9.1
+nodeenv==1.10.0
# via pyright
nox==2025.11.12
packaging==25.0
# via dependency-groups
# via nox
# via pytest
-pathspec==0.12.1
+pathspec==1.0.3
# via mypy
platformdirs==4.4.0
# via virtualenv
@@ -115,13 +115,13 @@ python-dateutil==2.9.0.post0
# via time-machine
respx==0.22.0
rich==14.2.0
-ruff==0.14.7
+ruff==0.14.13
six==1.17.0
# via python-dateutil
sniffio==1.3.1
# via kernel
time-machine==2.19.0
-tomli==2.3.0
+tomli==2.4.0
# via dependency-groups
# via mypy
# via nox
@@ -141,7 +141,7 @@ typing-extensions==4.15.0
# via virtualenv
typing-inspection==0.4.2
# via pydantic
-virtualenv==20.35.4
+virtualenv==20.36.1
# via nox
yarl==1.22.0
# via aiohttp
diff --git a/requirements.lock b/requirements.lock
index bbfe2b3..5f6c7ff 100644
--- a/requirements.lock
+++ b/requirements.lock
@@ -12,21 +12,21 @@
-e file:.
aiohappyeyeballs==2.6.1
# via aiohttp
-aiohttp==3.13.2
+aiohttp==3.13.3
# via httpx-aiohttp
# via kernel
aiosignal==1.4.0
# via aiohttp
annotated-types==0.7.0
# via pydantic
-anyio==4.12.0
+anyio==4.12.1
# via httpx
# via kernel
async-timeout==5.0.1
# via aiohttp
attrs==25.4.0
# via aiohttp
-certifi==2025.11.12
+certifi==2026.1.4
# via httpcore
# via httpx
distro==1.9.0
@@ -43,7 +43,7 @@ httpcore==1.0.9
httpx==0.28.1
# via httpx-aiohttp
# via kernel
-httpx-aiohttp==0.1.9
+httpx-aiohttp==0.1.12
# via kernel
idna==3.11
# via anyio
From b8b9019b86d0b87a0d7f2e3e401d58e810a63664 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 10 Feb 2026 03:55:22 +0000
Subject: [PATCH 5/5] release: 0.33.0
---
.release-please-manifest.json | 2 +-
CHANGELOG.md | 18 ++++++++++++++++++
pyproject.toml | 2 +-
src/kernel/_version.py | 2 +-
4 files changed, 21 insertions(+), 3 deletions(-)
diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index f04d089..57dc0c3 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.32.0"
+ ".": "0.33.0"
}
\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9d13c7e..5b67962 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,23 @@
# Changelog
+## 0.33.0 (2026-02-10)
+
+Full Changelog: [v0.32.0...v0.33.0](https://github.com/kernel/kernel-python-sdk/compare/v0.32.0...v0.33.0)
+
+### Features
+
+* Browser API endpoint grouping ([25054a8](https://github.com/kernel/kernel-python-sdk/commit/25054a8a77d7c9964133f545339526243f049469))
+
+
+### Chores
+
+* **internal:** bump dependencies ([8e144ab](https://github.com/kernel/kernel-python-sdk/commit/8e144ab2740f5d9161123840296f3d8809b0a79d))
+
+
+### Refactors
+
+* **api:** remove deprecated agent-auth endpoints from stainless.… ([4f7f783](https://github.com/kernel/kernel-python-sdk/commit/4f7f7830489ea83488b06f9723a8e5f472c1ccd4))
+
## 0.32.0 (2026-02-07)
Full Changelog: [v0.31.1...v0.32.0](https://github.com/kernel/kernel-python-sdk/compare/v0.31.1...v0.32.0)
diff --git a/pyproject.toml b/pyproject.toml
index 93afc32..1ede922 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "kernel"
-version = "0.32.0"
+version = "0.33.0"
description = "The official Python library for the kernel API"
dynamic = ["readme"]
license = "Apache-2.0"
diff --git a/src/kernel/_version.py b/src/kernel/_version.py
index 0247998..8f65338 100644
--- a/src/kernel/_version.py
+++ b/src/kernel/_version.py
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
__title__ = "kernel"
-__version__ = "0.32.0" # x-release-please-version
+__version__ = "0.33.0" # x-release-please-version