Skip to content

Commit 3706e8d

Browse files
feat: Define auth secrets and inject them into the environment.
1 parent f2c8c4c commit 3706e8d

File tree

5 files changed

+44
-8
lines changed

5 files changed

+44
-8
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 14
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta%2Fwarp-api-d45cb71aa9505f79b4ad42f50c3528e028508a941068c137393cbf2f54a8dd20.yml
3-
openapi_spec_hash: 2816d2eedf7d73fdde8a3fbb7bc96336
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta%2Fwarp-api-d57dae004e23149ddae4bd26e3ba05c2378d2c1070df0f303b19e45111c780d5.yml
3+
openapi_spec_hash: 6a15b456e6520a79981fafed3b0c94b9
44
config_hash: 40327fb76b7cce7b97f23de9b8d48efb

src/oz_agent_sdk/types/ambient_agent_config.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,15 @@ class Harness(BaseModel):
1717
Default (nil/empty) uses Warp's built-in harness.
1818
"""
1919

20+
auth_secret_name: Optional[str] = None
21+
"""Name of a managed secret to use as the authentication credential for the
22+
harness.
23+
24+
The secret must exist within the caller's personal or team scope. The
25+
environment variable injected into the agent is determined by the secret type
26+
(e.g. ANTHROPIC_API_KEY for anthropic_api_key secrets).
27+
"""
28+
2029
type: Optional[Literal["oz", "claude"]] = None
2130
"""The harness type identifier.
2231

src/oz_agent_sdk/types/ambient_agent_config_param.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,15 @@ class Harness(TypedDict, total=False):
1616
Default (nil/empty) uses Warp's built-in harness.
1717
"""
1818

19+
auth_secret_name: str
20+
"""Name of a managed secret to use as the authentication credential for the
21+
harness.
22+
23+
The secret must exist within the caller's personal or team scope. The
24+
environment variable injected into the agent is determined by the secret type
25+
(e.g. ANTHROPIC_API_KEY for anthropic_api_key secrets).
26+
"""
27+
1928
type: Literal["oz", "claude"]
2029
"""The harness type identifier.
2130

tests/api_resources/agent/test_schedules.py

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,10 @@ def test_method_create_with_all_params(self, client: OzAPI) -> None:
4040
"base_prompt": "base_prompt",
4141
"computer_use_enabled": True,
4242
"environment_id": "environment_id",
43-
"harness": {"type": "oz"},
43+
"harness": {
44+
"auth_secret_name": "auth_secret_name",
45+
"type": "oz",
46+
},
4447
"idle_timeout_minutes": 1,
4548
"mcp_servers": {
4649
"foo": {
@@ -156,7 +159,10 @@ def test_method_update_with_all_params(self, client: OzAPI) -> None:
156159
"base_prompt": "base_prompt",
157160
"computer_use_enabled": True,
158161
"environment_id": "environment_id",
159-
"harness": {"type": "oz"},
162+
"harness": {
163+
"auth_secret_name": "auth_secret_name",
164+
"type": "oz",
165+
},
160166
"idle_timeout_minutes": 1,
161167
"mcp_servers": {
162168
"foo": {
@@ -399,7 +405,10 @@ async def test_method_create_with_all_params(self, async_client: AsyncOzAPI) ->
399405
"base_prompt": "base_prompt",
400406
"computer_use_enabled": True,
401407
"environment_id": "environment_id",
402-
"harness": {"type": "oz"},
408+
"harness": {
409+
"auth_secret_name": "auth_secret_name",
410+
"type": "oz",
411+
},
403412
"idle_timeout_minutes": 1,
404413
"mcp_servers": {
405414
"foo": {
@@ -515,7 +524,10 @@ async def test_method_update_with_all_params(self, async_client: AsyncOzAPI) ->
515524
"base_prompt": "base_prompt",
516525
"computer_use_enabled": True,
517526
"environment_id": "environment_id",
518-
"harness": {"type": "oz"},
527+
"harness": {
528+
"auth_secret_name": "auth_secret_name",
529+
"type": "oz",
530+
},
519531
"idle_timeout_minutes": 1,
520532
"mcp_servers": {
521533
"foo": {

tests/api_resources/test_agent.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,10 @@ def test_method_run_with_all_params(self, client: OzAPI) -> None:
123123
"base_prompt": "base_prompt",
124124
"computer_use_enabled": True,
125125
"environment_id": "environment_id",
126-
"harness": {"type": "oz"},
126+
"harness": {
127+
"auth_secret_name": "auth_secret_name",
128+
"type": "oz",
129+
},
127130
"idle_timeout_minutes": 1,
128131
"mcp_servers": {
129132
"foo": {
@@ -280,7 +283,10 @@ async def test_method_run_with_all_params(self, async_client: AsyncOzAPI) -> Non
280283
"base_prompt": "base_prompt",
281284
"computer_use_enabled": True,
282285
"environment_id": "environment_id",
283-
"harness": {"type": "oz"},
286+
"harness": {
287+
"auth_secret_name": "auth_secret_name",
288+
"type": "oz",
289+
},
284290
"idle_timeout_minutes": 1,
285291
"mcp_servers": {
286292
"foo": {

0 commit comments

Comments
 (0)