agentenv-framework-protocol 0.1.341__tar.gz → 0.1.343__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {agentenv_framework_protocol-0.1.341 → agentenv_framework_protocol-0.1.343}/PKG-INFO +4 -3
- {agentenv_framework_protocol-0.1.341 → agentenv_framework_protocol-0.1.343}/README.md +3 -2
- {agentenv_framework_protocol-0.1.341 → agentenv_framework_protocol-0.1.343}/examples/reference_model.py +6 -1
- {agentenv_framework_protocol-0.1.341 → agentenv_framework_protocol-0.1.343}/pyproject.toml +1 -1
- {agentenv_framework_protocol-0.1.341 → agentenv_framework_protocol-0.1.343}/tests/test_a2a_agent_examples.py +17 -2
- {agentenv_framework_protocol-0.1.341 → agentenv_framework_protocol-0.1.343}/.gitignore +0 -0
- {agentenv_framework_protocol-0.1.341 → agentenv_framework_protocol-0.1.343}/LICENSE +0 -0
- {agentenv_framework_protocol-0.1.341 → agentenv_framework_protocol-0.1.343}/NOTICE +0 -0
- {agentenv_framework_protocol-0.1.341 → agentenv_framework_protocol-0.1.343}/THIRD_PARTY_NOTICES.md +0 -0
- {agentenv_framework_protocol-0.1.341 → agentenv_framework_protocol-0.1.343}/examples/__init__.py +0 -0
- {agentenv_framework_protocol-0.1.341 → agentenv_framework_protocol-0.1.343}/examples/advanced_agent.py +0 -0
- {agentenv_framework_protocol-0.1.341 → agentenv_framework_protocol-0.1.343}/examples/basic_agent.py +0 -0
- {agentenv_framework_protocol-0.1.341 → agentenv_framework_protocol-0.1.343}/examples/custom_extensions_agent.py +0 -0
- {agentenv_framework_protocol-0.1.341 → agentenv_framework_protocol-0.1.343}/examples/multimodal_agent.py +0 -0
- {agentenv_framework_protocol-0.1.341 → agentenv_framework_protocol-0.1.343}/examples/streaming_agent.py +0 -0
- {agentenv_framework_protocol-0.1.341 → agentenv_framework_protocol-0.1.343}/src/agentenv_protocol/__init__.py +0 -0
- {agentenv_framework_protocol-0.1.341 → agentenv_framework_protocol-0.1.343}/src/agentenv_protocol/a2a_agent/__init__.py +0 -0
- {agentenv_framework_protocol-0.1.341 → agentenv_framework_protocol-0.1.343}/src/agentenv_protocol/a2a_agent/_trajectory_log.py +0 -0
- {agentenv_framework_protocol-0.1.341 → agentenv_framework_protocol-0.1.343}/src/agentenv_protocol/a2a_agent/_triggers.py +0 -0
- {agentenv_framework_protocol-0.1.341 → agentenv_framework_protocol-0.1.343}/src/agentenv_protocol/a2a_agent/extensions.py +0 -0
- {agentenv_framework_protocol-0.1.341 → agentenv_framework_protocol-0.1.343}/src/agentenv_protocol/a2a_agent/framework.py +0 -0
- {agentenv_framework_protocol-0.1.341 → agentenv_framework_protocol-0.1.343}/src/agentenv_protocol/a2a_agent/registry.py +0 -0
- {agentenv_framework_protocol-0.1.341 → agentenv_framework_protocol-0.1.343}/src/agentenv_protocol/a2a_agent/staging.py +0 -0
- {agentenv_framework_protocol-0.1.341 → agentenv_framework_protocol-0.1.343}/src/agentenv_protocol/a2a_agent/tasks/__init__.py +0 -0
- {agentenv_framework_protocol-0.1.341 → agentenv_framework_protocol-0.1.343}/src/agentenv_protocol/a2a_agent/tasks/v1.py +0 -0
- {agentenv_framework_protocol-0.1.341 → agentenv_framework_protocol-0.1.343}/src/agentenv_protocol/agent_env_environment.py +0 -0
- {agentenv_framework_protocol-0.1.341 → agentenv_framework_protocol-0.1.343}/src/agentenv_protocol/client.py +0 -0
- {agentenv_framework_protocol-0.1.341 → agentenv_framework_protocol-0.1.343}/src/agentenv_protocol/manifest.py +0 -0
- {agentenv_framework_protocol-0.1.341 → agentenv_framework_protocol-0.1.343}/src/agentenv_protocol/preflight.py +0 -0
- {agentenv_framework_protocol-0.1.341 → agentenv_framework_protocol-0.1.343}/src/agentenv_protocol/tool_client.py +0 -0
- {agentenv_framework_protocol-0.1.341 → agentenv_framework_protocol-0.1.343}/src/agentenv_protocol/tool_context.py +0 -0
- {agentenv_framework_protocol-0.1.341 → agentenv_framework_protocol-0.1.343}/src/agentenv_protocol/transfers.py +0 -0
- {agentenv_framework_protocol-0.1.341 → agentenv_framework_protocol-0.1.343}/src/agentenv_protocol/types.py +0 -0
- {agentenv_framework_protocol-0.1.341 → agentenv_framework_protocol-0.1.343}/tests/test_a2a_agent.py +0 -0
- {agentenv_framework_protocol-0.1.341 → agentenv_framework_protocol-0.1.343}/tests/test_a2a_object_transfers.py +0 -0
- {agentenv_framework_protocol-0.1.341 → agentenv_framework_protocol-0.1.343}/tests/test_a2a_staging.py +0 -0
- {agentenv_framework_protocol-0.1.341 → agentenv_framework_protocol-0.1.343}/tests/test_a2a_trajectory_log.py +0 -0
- {agentenv_framework_protocol-0.1.341 → agentenv_framework_protocol-0.1.343}/tests/test_agent_env_environment.py +0 -0
- {agentenv_framework_protocol-0.1.341 → agentenv_framework_protocol-0.1.343}/tests/test_client.py +0 -0
- {agentenv_framework_protocol-0.1.341 → agentenv_framework_protocol-0.1.343}/tests/test_data_objects.py +0 -0
- {agentenv_framework_protocol-0.1.341 → agentenv_framework_protocol-0.1.343}/tests/test_intake.py +0 -0
- {agentenv_framework_protocol-0.1.341 → agentenv_framework_protocol-0.1.343}/tests/test_manifest.py +0 -0
- {agentenv_framework_protocol-0.1.341 → agentenv_framework_protocol-0.1.343}/tests/test_preflight.py +0 -0
- {agentenv_framework_protocol-0.1.341 → agentenv_framework_protocol-0.1.343}/tests/test_tool_client.py +0 -0
- {agentenv_framework_protocol-0.1.341 → agentenv_framework_protocol-0.1.343}/tests/test_tool_context.py +0 -0
- {agentenv_framework_protocol-0.1.341 → agentenv_framework_protocol-0.1.343}/tests/test_tool_context_fastmcp.py +0 -0
- {agentenv_framework_protocol-0.1.341 → agentenv_framework_protocol-0.1.343}/tests/test_tool_context_injection.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: agentenv-framework-protocol
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.343
|
|
4
4
|
Summary: Open data-plane protocol and server SDK for agent environments.
|
|
5
5
|
Project-URL: Homepage, https://www.agentenvframework.com
|
|
6
6
|
Project-URL: Documentation, https://www.agentenvframework.com/docs
|
|
@@ -724,8 +724,9 @@ multi-operation custom extensions, and advanced ASGI-lifespan plus
|
|
|
724
724
|
common SDK-operation override hooks.
|
|
725
725
|
|
|
726
726
|
The agent examples make real OpenAI-compatible model calls. Set
|
|
727
|
-
`LITELLM_API_KEY` and, when needed, `LITELLM_BASE_URL`;
|
|
728
|
-
|
|
727
|
+
`LITELLM_API_KEY` and, when needed, `LITELLM_BASE_URL`; they also send the headers in
|
|
728
|
+
`LITELLM_EXTRA_HEADERS`, a JSON object AgentEnv sets when the endpoint needs any. Their typed
|
|
729
|
+
agent config selects the model and system prompt for each deployment. Tests inject a fake
|
|
729
730
|
model client, so the example suite remains offline and deterministic.
|
|
730
731
|
|
|
731
732
|
### Object transfer
|
|
@@ -679,8 +679,9 @@ multi-operation custom extensions, and advanced ASGI-lifespan plus
|
|
|
679
679
|
common SDK-operation override hooks.
|
|
680
680
|
|
|
681
681
|
The agent examples make real OpenAI-compatible model calls. Set
|
|
682
|
-
`LITELLM_API_KEY` and, when needed, `LITELLM_BASE_URL`;
|
|
683
|
-
|
|
682
|
+
`LITELLM_API_KEY` and, when needed, `LITELLM_BASE_URL`; they also send the headers in
|
|
683
|
+
`LITELLM_EXTRA_HEADERS`, a JSON object AgentEnv sets when the endpoint needs any. Their typed
|
|
684
|
+
agent config selects the model and system prompt for each deployment. Tests inject a fake
|
|
684
685
|
model client, so the example suite remains offline and deterministic.
|
|
685
686
|
|
|
686
687
|
### Object transfer
|
|
@@ -42,13 +42,18 @@ class OpenAICompatibleModel:
|
|
|
42
42
|
raise RuntimeError(
|
|
43
43
|
"LITELLM_BASE_URL must be set before running the agent"
|
|
44
44
|
)
|
|
45
|
+
# The endpoint's headers are for the endpoint AgentEnv configured, never one this client was pointed at.
|
|
46
|
+
configured = os.getenv("LITELLM_BASE_URL") or ""
|
|
47
|
+
headers = (json.loads(os.getenv("LITELLM_EXTRA_HEADERS") or "{}")
|
|
48
|
+
if base_url.rstrip("/") == configured.rstrip("/") else {})
|
|
45
49
|
base_url = base_url.rstrip("/")
|
|
46
50
|
endpoint = (
|
|
47
51
|
f"{base_url}/chat/completions"
|
|
48
52
|
if base_url.endswith("/v1")
|
|
49
53
|
else f"{base_url}/v1/chat/completions"
|
|
50
54
|
)
|
|
51
|
-
|
|
55
|
+
own = {k: v for k, v in headers.items() if k.lower() != "authorization"}
|
|
56
|
+
return endpoint, {**own, "Authorization": f"Bearer {api_key}"}
|
|
52
57
|
|
|
53
58
|
async def complete(
|
|
54
59
|
self,
|
|
@@ -64,9 +64,24 @@ StreamingAgent = _streaming.StreamingAgent
|
|
|
64
64
|
|
|
65
65
|
|
|
66
66
|
@pytest.mark.asyncio
|
|
67
|
-
|
|
67
|
+
@pytest.mark.parametrize("endpoint_headers, configured_url, sent_headers", [
|
|
68
|
+
(None, "https://models.example/v1", {"Authorization": "Bearer request-scoped-key"}),
|
|
69
|
+
('{"X-Bill-To": "acme", "authorization": "Bearer theirs"}', "https://models.example/v1",
|
|
70
|
+
{"X-Bill-To": "acme", "Authorization": "Bearer request-scoped-key"}),
|
|
71
|
+
('{"X-Bill-To": "acme"}', "https://models.example/v1/", {"X-Bill-To": "acme", "Authorization": "Bearer request-scoped-key"}),
|
|
72
|
+
('{"X-Bill-To": "acme"}', "https://configured.example/v1", {"Authorization": "Bearer request-scoped-key"}),
|
|
73
|
+
], ids=["no-endpoint-headers", "endpoint-headers", "trailing-slash", "another-endpoint"])
|
|
74
|
+
async def test_reference_model_forwards_generic_metadata_and_the_endpoints_headers(
|
|
68
75
|
monkeypatch: pytest.MonkeyPatch,
|
|
76
|
+
endpoint_headers: str | None,
|
|
77
|
+
configured_url: str,
|
|
78
|
+
sent_headers: dict[str, str],
|
|
69
79
|
) -> None:
|
|
80
|
+
monkeypatch.setenv("LITELLM_BASE_URL", configured_url)
|
|
81
|
+
if endpoint_headers is None:
|
|
82
|
+
monkeypatch.delenv("LITELLM_EXTRA_HEADERS", raising=False)
|
|
83
|
+
else:
|
|
84
|
+
monkeypatch.setenv("LITELLM_EXTRA_HEADERS", endpoint_headers)
|
|
70
85
|
captured: dict[str, Any] = {}
|
|
71
86
|
class Response:
|
|
72
87
|
def raise_for_status(self) -> None:
|
|
@@ -107,7 +122,7 @@ async def test_reference_model_forwards_generic_metadata(
|
|
|
107
122
|
"client": {"timeout": 120},
|
|
108
123
|
"request": {
|
|
109
124
|
"url": "https://models.example/v1/chat/completions",
|
|
110
|
-
"headers":
|
|
125
|
+
"headers": sent_headers,
|
|
111
126
|
"json": {
|
|
112
127
|
"model": "test-model",
|
|
113
128
|
"messages": [{"role": "user", "content": "hello"}],
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{agentenv_framework_protocol-0.1.341 → agentenv_framework_protocol-0.1.343}/THIRD_PARTY_NOTICES.md
RENAMED
|
File without changes
|
{agentenv_framework_protocol-0.1.341 → agentenv_framework_protocol-0.1.343}/examples/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{agentenv_framework_protocol-0.1.341 → agentenv_framework_protocol-0.1.343}/examples/basic_agent.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{agentenv_framework_protocol-0.1.341 → agentenv_framework_protocol-0.1.343}/tests/test_a2a_agent.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{agentenv_framework_protocol-0.1.341 → agentenv_framework_protocol-0.1.343}/tests/test_client.py
RENAMED
|
File without changes
|
|
File without changes
|
{agentenv_framework_protocol-0.1.341 → agentenv_framework_protocol-0.1.343}/tests/test_intake.py
RENAMED
|
File without changes
|
{agentenv_framework_protocol-0.1.341 → agentenv_framework_protocol-0.1.343}/tests/test_manifest.py
RENAMED
|
File without changes
|
{agentenv_framework_protocol-0.1.341 → agentenv_framework_protocol-0.1.343}/tests/test_preflight.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|