Skip to content

Commit 34fd849

Browse files
committed
Merge branch 'main' into jason/deploy
2 parents 4b9ad12 + 44e7e8a commit 34fd849

18 files changed

+119
-65
lines changed

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.1.0"
2+
".": "0.1.1"
33
}

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 34
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp%2Fagentex-sdk-62a09183a027c64707ad1b9d7a5ccc66c8abf3965e6075282cb5ab72f742a2b3.yml
33
openapi_spec_hash: 47f43703822077a82e2edf82d4b7e0e5
4-
config_hash: 8691ea87e9147c7f77e63100041c1a3c
4+
config_hash: 8d5db979856e35045ae2cdc248ddae47

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Changelog
22

3+
## 0.1.1 (2025-07-24)
4+
5+
Full Changelog: [v0.1.0...v0.1.1](https://github.com/scaleapi/agentex-python/compare/v0.1.0...v0.1.1)
6+
7+
### Features
8+
9+
* **api:** manual updates ([714e97e](https://github.com/scaleapi/agentex-python/commit/714e97ed1813a4a91b421fb77fadaf2afac2450d))
10+
* **api:** manual updates ([8dccfbd](https://github.com/scaleapi/agentex-python/commit/8dccfbdd9b8b887bfb99c79a9a28163215560ae4))
11+
* **api:** manual updates ([03af884](https://github.com/scaleapi/agentex-python/commit/03af884e31a3df4d42a863c06c5ab4dfc2374374))
12+
313
## 0.1.0 (2025-07-23)
414

515
Full Changelog: [v0.1.0-alpha.6...v0.1.0](https://github.com/scaleapi/agentex-python/compare/v0.1.0-alpha.6...v0.1.0)

api.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
# Shared Types
2-
3-
```python
4-
from agentex.types import TaskMessageUpdate
5-
```
6-
71
# Agents
82

93
Types:

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "agentex-sdk"
3-
version = "0.1.0"
3+
version = "0.1.1"
44
description = "The official Python library for the agentex API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"

src/agentex/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
__title__ = "agentex"
4-
__version__ = "0.1.0" # x-release-please-version
4+
__version__ = "0.1.1" # x-release-please-version

src/agentex/lib/cli/handlers/deploy_handlers.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@
88
from pydantic import BaseModel, Field
99
from rich.console import Console
1010

11+
from agentex.lib.cli.utils.auth_utils import _encode_principal_context
1112
from agentex.lib.cli.utils.exceptions import DeploymentError, HelmError
1213
from agentex.lib.cli.utils.kubectl_utils import check_and_switch_cluster_context
14+
from agentex.lib.environment_variables import EnvVarKeys
1315
from agentex.lib.sdk.config.agent_config import AgentConfig
1416
from agentex.lib.sdk.config.agent_manifest import AgentManifest
1517
from agentex.lib.sdk.config.deployment_config import ClusterConfig
@@ -174,6 +176,10 @@ def merge_deployment_configs(
174176
if TEMPORAL_WORKER_KEY in helm_values:
175177
helm_values[TEMPORAL_WORKER_KEY]["env"] = agent_config.env
176178

179+
encoded_principal = _encode_principal_context(manifest)
180+
if encoded_principal:
181+
helm_values["env"][EnvVarKeys.AUTH_PRINCIPAL_B64] = encoded_principal
182+
177183
if manifest.deployment and manifest.deployment.imagePullSecrets:
178184
pull_secrets = [
179185
pull_secret.to_dict()

src/agentex/lib/cli/handlers/run_handlers.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@
66
from rich.console import Console
77
from rich.panel import Panel
88

9+
from agentex.lib.cli.utils.auth_utils import _encode_principal_context
910
from agentex.lib.cli.handlers.cleanup_handlers import (
1011
cleanup_agent_workflows,
1112
should_cleanup_on_restart
1213
)
14+
from agentex.lib.environment_variables import EnvVarKeys
1315
from agentex.lib.sdk.config.agent_manifest import AgentManifest
1416
from agentex.lib.utils.logging import make_logger
1517

@@ -427,6 +429,11 @@ def create_agent_environment(manifest: AgentManifest) -> dict[str, str]:
427429
"ACP_PORT": str(manifest.local_development.agent.port),
428430
}
429431

432+
# Add authorization principal if set
433+
encoded_principal = _encode_principal_context(manifest)
434+
if encoded_principal:
435+
env_vars[EnvVarKeys.AUTH_PRINCIPAL_B64] = encoded_principal
436+
430437
# Add description if available
431438
if manifest.agent.description:
432439
env_vars["AGENT_DESCRIPTION"] = manifest.agent.description

src/agentex/lib/cli/utils/__init__.py

Whitespace-only changes.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import base64
2+
import json
3+
4+
from agentex.lib.sdk.config.agent_manifest import AgentManifest
5+
6+
7+
# Base 64 encode principal dictionary
8+
def _encode_principal_context(manifest: AgentManifest):
9+
if manifest.auth is None:
10+
return None
11+
12+
principal = manifest.auth.principal
13+
if principal is None:
14+
return None
15+
16+
json_str = json.dumps(principal, separators=(',', ':'))
17+
encoded_bytes = base64.b64encode(json_str.encode('utf-8'))
18+
return encoded_bytes.decode('utf-8')

0 commit comments

Comments
 (0)