agentenv-framework-protocol 0.1.305__tar.gz → 0.1.307__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.
Files changed (39) hide show
  1. {agentenv_framework_protocol-0.1.305 → agentenv_framework_protocol-0.1.307}/PKG-INFO +4 -3
  2. {agentenv_framework_protocol-0.1.305 → agentenv_framework_protocol-0.1.307}/README.md +3 -2
  3. {agentenv_framework_protocol-0.1.305 → agentenv_framework_protocol-0.1.307}/pyproject.toml +1 -1
  4. {agentenv_framework_protocol-0.1.305 → agentenv_framework_protocol-0.1.307}/src/agentenv_protocol/preflight.py +1 -1
  5. {agentenv_framework_protocol-0.1.305 → agentenv_framework_protocol-0.1.307}/src/agentenv_protocol/transfers.py +12 -5
  6. {agentenv_framework_protocol-0.1.305 → agentenv_framework_protocol-0.1.307}/.gitignore +0 -0
  7. {agentenv_framework_protocol-0.1.305 → agentenv_framework_protocol-0.1.307}/LICENSE +0 -0
  8. {agentenv_framework_protocol-0.1.305 → agentenv_framework_protocol-0.1.307}/NOTICE +0 -0
  9. {agentenv_framework_protocol-0.1.305 → agentenv_framework_protocol-0.1.307}/THIRD_PARTY_NOTICES.md +0 -0
  10. {agentenv_framework_protocol-0.1.305 → agentenv_framework_protocol-0.1.307}/examples/__init__.py +0 -0
  11. {agentenv_framework_protocol-0.1.305 → agentenv_framework_protocol-0.1.307}/examples/advanced_agent.py +0 -0
  12. {agentenv_framework_protocol-0.1.305 → agentenv_framework_protocol-0.1.307}/examples/basic_agent.py +0 -0
  13. {agentenv_framework_protocol-0.1.305 → agentenv_framework_protocol-0.1.307}/examples/custom_extensions_agent.py +0 -0
  14. {agentenv_framework_protocol-0.1.305 → agentenv_framework_protocol-0.1.307}/examples/multimodal_agent.py +0 -0
  15. {agentenv_framework_protocol-0.1.305 → agentenv_framework_protocol-0.1.307}/examples/reference_model.py +0 -0
  16. {agentenv_framework_protocol-0.1.305 → agentenv_framework_protocol-0.1.307}/examples/streaming_agent.py +0 -0
  17. {agentenv_framework_protocol-0.1.305 → agentenv_framework_protocol-0.1.307}/src/agentenv_protocol/__init__.py +0 -0
  18. {agentenv_framework_protocol-0.1.305 → agentenv_framework_protocol-0.1.307}/src/agentenv_protocol/a2a_agent/__init__.py +0 -0
  19. {agentenv_framework_protocol-0.1.305 → agentenv_framework_protocol-0.1.307}/src/agentenv_protocol/a2a_agent/_triggers.py +0 -0
  20. {agentenv_framework_protocol-0.1.305 → agentenv_framework_protocol-0.1.307}/src/agentenv_protocol/a2a_agent/extensions.py +0 -0
  21. {agentenv_framework_protocol-0.1.305 → agentenv_framework_protocol-0.1.307}/src/agentenv_protocol/a2a_agent/framework.py +0 -0
  22. {agentenv_framework_protocol-0.1.305 → agentenv_framework_protocol-0.1.307}/src/agentenv_protocol/a2a_agent/registry.py +0 -0
  23. {agentenv_framework_protocol-0.1.305 → agentenv_framework_protocol-0.1.307}/src/agentenv_protocol/a2a_agent/staging.py +0 -0
  24. {agentenv_framework_protocol-0.1.305 → agentenv_framework_protocol-0.1.307}/src/agentenv_protocol/a2a_agent/tasks/__init__.py +0 -0
  25. {agentenv_framework_protocol-0.1.305 → agentenv_framework_protocol-0.1.307}/src/agentenv_protocol/a2a_agent/tasks/v1.py +0 -0
  26. {agentenv_framework_protocol-0.1.305 → agentenv_framework_protocol-0.1.307}/src/agentenv_protocol/agent_env_environment.py +0 -0
  27. {agentenv_framework_protocol-0.1.305 → agentenv_framework_protocol-0.1.307}/src/agentenv_protocol/client.py +0 -0
  28. {agentenv_framework_protocol-0.1.305 → agentenv_framework_protocol-0.1.307}/src/agentenv_protocol/manifest.py +0 -0
  29. {agentenv_framework_protocol-0.1.305 → agentenv_framework_protocol-0.1.307}/src/agentenv_protocol/types.py +0 -0
  30. {agentenv_framework_protocol-0.1.305 → agentenv_framework_protocol-0.1.307}/tests/test_a2a_agent.py +0 -0
  31. {agentenv_framework_protocol-0.1.305 → agentenv_framework_protocol-0.1.307}/tests/test_a2a_agent_examples.py +0 -0
  32. {agentenv_framework_protocol-0.1.305 → agentenv_framework_protocol-0.1.307}/tests/test_a2a_object_transfers.py +0 -0
  33. {agentenv_framework_protocol-0.1.305 → agentenv_framework_protocol-0.1.307}/tests/test_a2a_staging.py +0 -0
  34. {agentenv_framework_protocol-0.1.305 → agentenv_framework_protocol-0.1.307}/tests/test_agent_env_environment.py +0 -0
  35. {agentenv_framework_protocol-0.1.305 → agentenv_framework_protocol-0.1.307}/tests/test_client.py +0 -0
  36. {agentenv_framework_protocol-0.1.305 → agentenv_framework_protocol-0.1.307}/tests/test_data_objects.py +0 -0
  37. {agentenv_framework_protocol-0.1.305 → agentenv_framework_protocol-0.1.307}/tests/test_intake.py +0 -0
  38. {agentenv_framework_protocol-0.1.305 → agentenv_framework_protocol-0.1.307}/tests/test_manifest.py +0 -0
  39. {agentenv_framework_protocol-0.1.305 → agentenv_framework_protocol-0.1.307}/tests/test_preflight.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: agentenv-framework-protocol
3
- Version: 0.1.305
3
+ Version: 0.1.307
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
@@ -649,8 +649,9 @@ objects are in the store.
649
649
  SDK agents advertise only these shapes, and AgentEnv sends no others. It moves
650
650
  a skill bundle, snapshot or changelog only through grants, so the call needs an
651
651
  agent that advertises the object variant and an object store that issues grants
652
- (the S3 store does, and namespace grants for changelog capture only when it
653
- signs with long-term credentials); otherwise it fails before anything is sent.
652
+ (the S3, Cloud Storage and local stores do, though S3 issues the namespace grants
653
+ changelog capture needs only when it signs with long-term credentials); otherwise
654
+ it fails before anything is sent.
654
655
  Skills given as SKILL.md text and trajectories returned inline need no grants.
655
656
  A snapshot is restored only from the snapshot objects in the table above; one
656
657
  that holds the runtime's own files instead cannot be. An
@@ -605,8 +605,9 @@ objects are in the store.
605
605
  SDK agents advertise only these shapes, and AgentEnv sends no others. It moves
606
606
  a skill bundle, snapshot or changelog only through grants, so the call needs an
607
607
  agent that advertises the object variant and an object store that issues grants
608
- (the S3 store does, and namespace grants for changelog capture only when it
609
- signs with long-term credentials); otherwise it fails before anything is sent.
608
+ (the S3, Cloud Storage and local stores do, though S3 issues the namespace grants
609
+ changelog capture needs only when it signs with long-term credentials); otherwise
610
+ it fails before anything is sent.
610
611
  Skills given as SKILL.md text and trajectories returned inline need no grants.
611
612
  A snapshot is restored only from the snapshot objects in the table above; one
612
613
  that holds the runtime's own files instead cannot be. An
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "agentenv-framework-protocol"
3
- version = "0.1.305"
3
+ version = "0.1.307"
4
4
  description = "Open data-plane protocol and server SDK for agent environments."
5
5
  readme = "README.md"
6
6
  license = "Apache-2.0"
@@ -1,6 +1,6 @@
1
1
  """Pre-deploy fit-check for the data-plane intake declaration.
2
2
 
3
- Pure functions over plain dicts — no I/O, no Mongo/S3 — so they run at authoring/
3
+ Pure functions over plain dicts — no I/O, no store access — so they run at authoring/
4
4
  registration time. The agent-env-side ``preflight(universe, env)`` wraps these by
5
5
  reading ``client.intake_declaration(card)`` and each service's seed ``data.json``.
6
6
  """
@@ -33,7 +33,7 @@ _MIME_TYPE = re.compile(r"^[!#$&^_.+\-|~0-9A-Za-z]+/[!#$&^_.+\-|~0-9A-Za-z]+$")
33
33
  _SHA256 = re.compile(r"^[0-9a-f]{64}$")
34
34
  _CHUNK_BYTES = 64 * 1024
35
35
  _UTC = timezone.utc # noqa: UP017 -- datetime.UTC requires Python 3.11.
36
- # Idle limits, not totals, as long as botocore's: long enough for a slow uplink to drain its
36
+ # Idle limits, not totals, of a minute, as cloud storage SDKs use: long enough for a slow uplink to drain its
37
37
  # buffers before the store answers, short enough that a stalled connection is retried within
38
38
  # the minutes agent-env waits for an extension call.
39
39
  TRANSFER_IDLE_TIMEOUT_SECONDS = 60.0
@@ -271,20 +271,27 @@ def _raise_for_transfer_status(response: httpx.Response) -> None:
271
271
  if (
272
272
  response.status_code in (408, 429)
273
273
  or response.status_code >= 500
274
- or _is_s3_request_timeout(response)
274
+ or _is_store_request_timeout(response)
275
275
  ):
276
276
  raise TransferError("transfer_unavailable", _UNAVAILABLE)
277
277
  raise TransferError("transfer_rejected", "The object store rejected the transfer.")
278
278
 
279
279
 
280
- def _is_s3_request_timeout(response: httpx.Response) -> bool:
281
- """S3 answers an upload that stalled with a 400 whose error code is RequestTimeout."""
280
+ # Body markers of a stalled upload that a store answers with a 400 rather than a 408.
281
+ _STALLED_UPLOAD_MARKERS = (
282
+ b"<Code>RequestTimeout</Code>", # S3
283
+ )
284
+
285
+
286
+ def _is_store_request_timeout(response: httpx.Response) -> bool:
287
+ """An upload that stalled, answered with a 400 by a store that does not send a 408 for it."""
282
288
  if response.status_code != 400:
283
289
  return False
284
290
  try:
285
- return b"<Code>RequestTimeout</Code>" in response.content[:1024]
291
+ head = response.content[:1024]
286
292
  except httpx.ResponseNotRead:
287
293
  return False
294
+ return any(marker in head for marker in _STALLED_UPLOAD_MARKERS)
288
295
 
289
296
 
290
297
  @contextmanager