agentenv-framework-protocol 0.1.674__tar.gz → 0.1.676__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 (267) hide show
  1. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/PKG-INFO +1 -1
  2. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/pyproject.toml +1 -1
  3. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/a2a_agent/__init__.py +10 -0
  4. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/a2a_agent/proxy.py +5 -2
  5. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/a2a_agent/tasks/v1.py +40 -4
  6. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_a2a_proxy.py +13 -0
  7. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_usage.py +53 -2
  8. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/.gitignore +0 -0
  9. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/LICENSE +0 -0
  10. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/NOTICE +0 -0
  11. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/README.md +0 -0
  12. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/THIRD_PARTY_NOTICES.md +0 -0
  13. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/examples/__init__.py +0 -0
  14. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/examples/advanced_agent.py +0 -0
  15. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/examples/basic_agent.py +0 -0
  16. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/examples/custom_extensions_agent.py +0 -0
  17. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/examples/multimodal_agent.py +0 -0
  18. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/examples/reference_model.py +0 -0
  19. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/examples/streaming_agent.py +0 -0
  20. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/examples/website/notes/.gitignore +0 -0
  21. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/examples/website/notes/Dockerfile +0 -0
  22. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/examples/website/notes/Dockerfile.dockerignore +0 -0
  23. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/examples/website/notes/README.md +0 -0
  24. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/examples/website/notes/data/seed.json +0 -0
  25. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/examples/website/notes/env.toml +0 -0
  26. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/examples/website/notes/site.py +0 -0
  27. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/examples/website/notes/web/index.html +0 -0
  28. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/examples/website/notes/web/package-lock.json +0 -0
  29. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/examples/website/notes/web/package.json +0 -0
  30. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/examples/website/notes/web/src/main.js +0 -0
  31. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/examples/website/notes/web/src/style.css +0 -0
  32. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/examples/website/notes/web/vite.config.js +0 -0
  33. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/__init__.py +0 -0
  34. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/a2a_agent/_atif_copy.py +0 -0
  35. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/a2a_agent/_media_spool.py +0 -0
  36. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/a2a_agent/_secrets.py +0 -0
  37. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/a2a_agent/_snapshot_state.py +0 -0
  38. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/a2a_agent/_trajectory_log.py +0 -0
  39. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/a2a_agent/_triggers.py +0 -0
  40. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/a2a_agent/_turn_index.py +0 -0
  41. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/a2a_agent/clock.py +0 -0
  42. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/a2a_agent/control_token.py +0 -0
  43. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/a2a_agent/extensions.py +0 -0
  44. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/a2a_agent/framework.py +0 -0
  45. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/a2a_agent/peer_agents.py +0 -0
  46. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/a2a_agent/registry.py +0 -0
  47. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/a2a_agent/staging.py +0 -0
  48. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/a2a_agent/tasks/__init__.py +0 -0
  49. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/agent_env_environment.py +0 -0
  50. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/atif/PROFILE.md +0 -0
  51. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/atif/__init__.py +0 -0
  52. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/atif/__main__.py +0 -0
  53. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/atif/_image_size.py +0 -0
  54. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/atif/adapter.py +0 -0
  55. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/atif/builder.py +0 -0
  56. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/atif/fixtures/coding.json +0 -0
  57. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/atif/fixtures/coding.stripped.json +0 -0
  58. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/atif/fixtures/computer_use.json +0 -0
  59. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/atif/fixtures/late_result.json +0 -0
  60. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/atif/fixtures/media/482405b002a62efa8516c36709a7a100637507670576fa73a20ad5420d55c66f.png +0 -0
  61. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/atif/fixtures/media/55c64d0fcd6f9d5f7c828093857e3fdfda68478bb4e9bd24d481ef391c7804e8.heic +0 -0
  62. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/atif/fixtures/media/67905ad3cc2dd52b1f5f6a6d2814de0396618b29b4238b9af5207aeb69936e6d.mp4 +0 -0
  63. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/atif/fixtures/media/69a8aa01fe5537076d023dd5e9cc4275b39fc0434aa6483a9f58b66ef2f3c896.png +0 -0
  64. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/atif/fixtures/media/82e60066a2de261b6653bcdda90d1cb9a7af2f474cecd82e8d371e8384d72315.png +0 -0
  65. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/atif/fixtures/media/845e91831319e89c4d656bdb80c278ac09a7230d61e5dfd2e1b1fbb436ac8917.pdf +0 -0
  66. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/atif/fixtures/multi_agent.json +0 -0
  67. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/atif/fixtures/odd_parts.json +0 -0
  68. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/atif/fixtures/subagent.json +0 -0
  69. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/atif/fixtures/two_turns.json +0 -0
  70. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/atif/kit.py +0 -0
  71. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/atif/models/LICENSE +0 -0
  72. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/atif/models/VENDORED.md +0 -0
  73. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/atif/models/__init__.py +0 -0
  74. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/atif/models/agent.py +0 -0
  75. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/atif/models/content.py +0 -0
  76. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/atif/models/final_metrics.py +0 -0
  77. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/atif/models/metrics.py +0 -0
  78. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/atif/models/observation.py +0 -0
  79. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/atif/models/observation_result.py +0 -0
  80. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/atif/models/step.py +0 -0
  81. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/atif/models/subagent_trajectory_ref.py +0 -0
  82. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/atif/models/tool_call.py +0 -0
  83. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/atif/models/trajectory.py +0 -0
  84. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/atif/profile.py +0 -0
  85. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/atif/reader.py +0 -0
  86. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/atif/runner.py +0 -0
  87. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/atif/served.py +0 -0
  88. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/atif/validator.py +0 -0
  89. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/client.py +0 -0
  90. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/computer/__init__.py +0 -0
  91. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/computer/_adb.py +0 -0
  92. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/computer/_declare.py +0 -0
  93. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/computer/_desktop.py +0 -0
  94. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/computer/_job.py +0 -0
  95. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/computer/_linux.py +0 -0
  96. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/computer/_load.py +0 -0
  97. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/computer/_macos.py +0 -0
  98. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/computer/_reaping.py +0 -0
  99. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/computer/_session_posix.py +0 -0
  100. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/computer/_session_windows.py +0 -0
  101. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/computer/_windows.py +0 -0
  102. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/computer/_with_fds.py +0 -0
  103. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/computer/_x11.py +0 -0
  104. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/computer/annotate.py +0 -0
  105. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/computer/app.py +0 -0
  106. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/computer/app_data.py +0 -0
  107. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/computer/app_runtime.py +0 -0
  108. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/computer/apps.py +0 -0
  109. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/computer/card.py +0 -0
  110. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/computer/checks.py +0 -0
  111. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/computer/clock.py +0 -0
  112. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/computer/conformance/__init__.py +0 -0
  113. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/computer/conformance/__main__.py +0 -0
  114. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/computer/conformance/checks.py +0 -0
  115. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/computer/conformance/client.py +0 -0
  116. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/computer/conformance/desk.py +0 -0
  117. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/computer/conformance/fixture.py +0 -0
  118. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/computer/conformance/mp4.py +0 -0
  119. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/computer/conformance/page_fixture.py +0 -0
  120. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/computer/conformance/report.py +0 -0
  121. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/computer/conformance/wayland_fixture.py +0 -0
  122. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/computer/dataplane.py +0 -0
  123. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/computer/driver.py +0 -0
  124. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/computer/errors.py +0 -0
  125. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/computer/extensions.py +0 -0
  126. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/computer/frames.py +0 -0
  127. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/computer/keys.py +0 -0
  128. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/computer/launch.py +0 -0
  129. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/computer/manifest.py +0 -0
  130. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/computer/operations.py +0 -0
  131. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/computer/platform.py +0 -0
  132. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/computer/prefix.py +0 -0
  133. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/computer/queue.py +0 -0
  134. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/computer/recording.py +0 -0
  135. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/computer/results.py +0 -0
  136. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/computer/run_install_step.py +0 -0
  137. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/computer/runtime.py +0 -0
  138. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/computer/seed.py +0 -0
  139. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/computer/serve.py +0 -0
  140. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/computer/serve_app.py +0 -0
  141. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/computer/served.py +0 -0
  142. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/computer/session.py +0 -0
  143. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/computer/settings.py +0 -0
  144. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/computer/skill.py +0 -0
  145. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/computer/spaces.py +0 -0
  146. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/computer/svc.py +0 -0
  147. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/computer/tools.py +0 -0
  148. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/errors.py +0 -0
  149. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/manifest.py +0 -0
  150. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/passthrough.py +0 -0
  151. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/preflight.py +0 -0
  152. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/tool_access.py +0 -0
  153. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/tool_client.py +0 -0
  154. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/tool_context.py +0 -0
  155. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/transfers.py +0 -0
  156. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/types.py +0 -0
  157. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/website/__init__.py +0 -0
  158. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/website/clock.py +0 -0
  159. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/website/conformance.py +0 -0
  160. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/website/environment.py +0 -0
  161. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/website/errors.py +0 -0
  162. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/website/forwarding.py +0 -0
  163. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/website/readiness.py +0 -0
  164. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/website/routes.py +0 -0
  165. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/website/session.py +0 -0
  166. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/website_browser/__init__.py +0 -0
  167. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/website_browser/cdp.py +0 -0
  168. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/website_browser/contexts.py +0 -0
  169. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/website_browser/control.py +0 -0
  170. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/website_browser/data.py +0 -0
  171. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/website_browser/devtools.py +0 -0
  172. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/website_browser/environment.py +0 -0
  173. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/website_browser/log.py +0 -0
  174. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/website_browser/network.py +0 -0
  175. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/website_browser/recording.py +0 -0
  176. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/website_browser/scope.py +0 -0
  177. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/website_browser/shapes.py +0 -0
  178. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/src/agentenv_protocol/website_browser/stream.py +0 -0
  179. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/atif_cases.py +0 -0
  180. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/computer_fake.py +0 -0
  181. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/conftest.py +0 -0
  182. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/fake_adb.py +0 -0
  183. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/probe_fake.py +0 -0
  184. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_a2a_agent.py +0 -0
  185. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_a2a_agent_clock.py +0 -0
  186. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_a2a_agent_examples.py +0 -0
  187. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_a2a_atif_media.py +0 -0
  188. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_a2a_atif_prescribe.py +0 -0
  189. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_a2a_atif_scrubbing.py +0 -0
  190. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_a2a_atif_serving.py +0 -0
  191. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_a2a_atif_turns.py +0 -0
  192. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_a2a_cdp_config.py +0 -0
  193. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_a2a_object_transfers.py +0 -0
  194. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_a2a_peer_agents.py +0 -0
  195. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_a2a_staging.py +0 -0
  196. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_a2a_trajectory_log.py +0 -0
  197. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_agent_env_environment.py +0 -0
  198. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_atif_builder.py +0 -0
  199. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_atif_fixtures.py +0 -0
  200. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_atif_kit.py +0 -0
  201. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_atif_profile.py +0 -0
  202. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_atif_reader.py +0 -0
  203. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_atif_validator.py +0 -0
  204. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_atif_vendored.py +0 -0
  205. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_browser_cdp.py +0 -0
  206. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_browser_contexts.py +0 -0
  207. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_browser_data.py +0 -0
  208. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_browser_log.py +0 -0
  209. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_browser_network.py +0 -0
  210. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_browser_recording.py +0 -0
  211. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_browser_state.py +0 -0
  212. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_client.py +0 -0
  213. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_computer_app_data.py +0 -0
  214. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_computer_app_server.py +0 -0
  215. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_computer_beside.py +0 -0
  216. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_computer_clock.py +0 -0
  217. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_computer_conformance.py +0 -0
  218. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_computer_conformance_attempts.py +0 -0
  219. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_computer_conformance_checks.py +0 -0
  220. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_computer_conformance_page.py +0 -0
  221. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_computer_conformance_recording.py +0 -0
  222. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_computer_dataplane.py +0 -0
  223. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_computer_declare.py +0 -0
  224. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_computer_driver.py +0 -0
  225. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_computer_driver_keys.py +0 -0
  226. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_computer_extensions.py +0 -0
  227. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_computer_frames.py +0 -0
  228. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_computer_macos.py +0 -0
  229. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_computer_page.py +0 -0
  230. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_computer_queue.py +0 -0
  231. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_computer_recording.py +0 -0
  232. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_computer_recording_annotate.py +0 -0
  233. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_computer_screenshot_delay.py +0 -0
  234. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_computer_seed.py +0 -0
  235. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_computer_serve.py +0 -0
  236. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_computer_served.py +0 -0
  237. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_computer_session_windows.py +0 -0
  238. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_computer_spaces.py +0 -0
  239. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_computer_svc_forward.py +0 -0
  240. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_computer_tool_prefix.py +0 -0
  241. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_computer_windows_driver.py +0 -0
  242. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_control_token.py +0 -0
  243. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_data_objects.py +0 -0
  244. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_devtools_pipe.py +0 -0
  245. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_errors.py +0 -0
  246. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_extension_methods.py +0 -0
  247. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_intake.py +0 -0
  248. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_manifest.py +0 -0
  249. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_preflight.py +0 -0
  250. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_rpc_keepalive.py +0 -0
  251. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_tool_access.py +0 -0
  252. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_tool_annotations.py +0 -0
  253. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_tool_client.py +0 -0
  254. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_tool_context.py +0 -0
  255. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_tool_context_fastmcp.py +0 -0
  256. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_tool_context_injection.py +0 -0
  257. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_tool_defers.py +0 -0
  258. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_usage_models.py +0 -0
  259. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_website_api.py +0 -0
  260. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_website_browser.py +0 -0
  261. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_website_conformance.py +0 -0
  262. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_website_environment.py +0 -0
  263. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_website_forwarding.py +0 -0
  264. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_website_live.py +0 -0
  265. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_website_mcp.py +0 -0
  266. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_website_notes_example.py +0 -0
  267. {agentenv_framework_protocol-0.1.674 → agentenv_framework_protocol-0.1.676}/tests/test_website_readiness.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: agentenv-framework-protocol
3
- Version: 0.1.674
3
+ Version: 0.1.676
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
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "agentenv-framework-protocol"
3
- version = "0.1.674"
3
+ version = "0.1.676"
4
4
  description = "Open data-plane protocol and server SDK for agent environments."
5
5
  readme = "README.md"
6
6
  license = "Apache-2.0"
@@ -135,12 +135,17 @@ from .tasks.v1 import (
135
135
  ModelUsage,
136
136
  Usage,
137
137
  WriteOnly,
138
+ MIXED_SERVICE_LEVEL,
139
+ SERVICE_LEVEL_FIELDS,
140
+ STANDARD_SERVICE_LEVELS,
138
141
  TOKEN_COUNTS,
139
142
  TTL_UNIT_PATTERN,
140
143
  TTL_UNITS,
141
144
  ttl_counts_in_seconds,
142
145
  ttl_label,
143
146
  ttl_seconds,
147
+ agreed_service_level,
148
+ is_standard_service_level,
144
149
  ttl_sum,
145
150
  )
146
151
  from ..transfers import (
@@ -284,6 +289,9 @@ __all__ = [
284
289
  "Uploaded",
285
290
  "ModelUsage",
286
291
  "Usage",
292
+ "MIXED_SERVICE_LEVEL",
293
+ "SERVICE_LEVEL_FIELDS",
294
+ "STANDARD_SERVICE_LEVELS",
287
295
  "TOKEN_COUNTS",
288
296
  "TTL_UNIT_PATTERN",
289
297
  "TTL_UNITS",
@@ -291,6 +299,8 @@ __all__ = [
291
299
  "ttl_label",
292
300
  "ttl_seconds",
293
301
  "ttl_sum",
302
+ "agreed_service_level",
303
+ "is_standard_service_level",
294
304
  "WriteNamespaceGrant",
295
305
  "WriteObject",
296
306
  "WriteOnly",
@@ -59,7 +59,8 @@ from .extensions import (
59
59
  )
60
60
  from .framework import AgentEnvAgent, AgentIdentity, a2a_agent
61
61
  from .tasks.v1 import (
62
- TOKEN_COUNTS, AgentConfig, ModelUsage, TaskRequest, TaskResult, TextPart, TrajectoryLog, Usage, ttl_sum,
62
+ SERVICE_LEVEL_FIELDS, TOKEN_COUNTS, AgentConfig, ModelUsage, TaskRequest, TaskResult, TextPart, TrajectoryLog,
63
+ Usage, agreed_service_level, ttl_sum,
63
64
  )
64
65
  from ..tool_client import ToolResult, ToolSession, ToolSessionError
65
66
  from ..transfers import download
@@ -563,7 +564,8 @@ def _turn_usage(turn: _Turn) -> Usage:
563
564
  (``cache_unsettled``), which leaves the turn's flag unknown; how many usages were in a shape none of the readers
564
565
  know (``unrecognized``); and each provider's split of the cache writes, summed, a reported ``Usage``'s split
565
566
  counted only where it holds counts, as its ``provider_details`` may hold anything. Its writes by how long they
566
- were kept are the calls' summed."""
567
+ were kept are the calls' summed, and its service tier and speed the ones the calls agree on
568
+ (``agreed_service_level``)."""
567
569
  calls = [usage for _, usage in turn.model_calls]
568
570
  sums, unreported = {}, {}
569
571
  for name in _USAGE_SUMS:
@@ -586,6 +588,7 @@ def _turn_usage(turn: _Turn) -> Usage:
586
588
  return Usage(tool_call_count=len(turn.actions), **sums,
587
589
  cache_write_ttl_tokens=ttl_sum(call.cache_write_ttl_tokens for call in calls),
588
590
  input_includes_cache=True if sums["input_tokens"] is not None and not unsettled else None,
591
+ **{name: agreed_service_level(getattr(call, name) for call in calls) for name in SERVICE_LEVEL_FIELDS},
589
592
  models=_by_model(turn), provider_details=details if calls else {})
590
593
 
591
594
 
@@ -381,6 +381,32 @@ def _count(value: Any) -> int | None:
381
381
  return value if isinstance(value, int) and not isinstance(value, bool) and value >= 0 else None
382
382
 
383
383
 
384
+ #: ``Usage``'s service level fields: the service tier and the speed a provider ran a call at, each as it names them.
385
+ SERVICE_LEVEL_FIELDS = ("service_tier", "speed")
386
+ #: The names providers give their standard service tier and speed, compared in lower case.
387
+ STANDARD_SERVICE_LEVELS = frozenset({"standard", "default", "on_demand"})
388
+ #: The service tier or speed of calls that ran at different ones.
389
+ MIXED_SERVICE_LEVEL = "mixed"
390
+
391
+
392
+ def is_standard_service_level(name: str | None) -> bool:
393
+ """Whether a service tier or speed is the standard one: unrecorded, or one of ``STANDARD_SERVICE_LEVELS`` in any
394
+ case."""
395
+ return name is None or name.lower() in STANDARD_SERVICE_LEVELS
396
+
397
+
398
+ def agreed_service_level(names: Iterable[str | None]) -> str | None:
399
+ """The service tier, or speed, calls agree on, the standard names counting as one: the first one given,
400
+ ``MIXED_SERVICE_LEVEL`` when they disagree, and None when none gives one."""
401
+ given = [name for name in names if name is not None]
402
+ kinds = {"standard" if is_standard_service_level(name) else name.lower() for name in given}
403
+ return given[0] if len(kinds) == 1 else MIXED_SERVICE_LEVEL if given else None
404
+
405
+
406
+ def _tier_name(value: Any) -> str | None:
407
+ return value if isinstance(value, str) and value else None
408
+
409
+
384
410
  #: The seconds in each unit a time a cache write was kept may be written in, however it's spelled.
385
411
  TTL_UNITS = {"s": 1, "sec": 1, "m": 60, "min": 60, "h": 3600, "hr": 3600, "hour": 3600, "d": 86400, "day": 86400}
386
412
  #: A pattern for any of ``TTL_UNITS``' spellings, the longest first so a pattern that ends there matches it whole.
@@ -539,7 +565,9 @@ class Usage:
539
565
  ``cache_write_ttl_tokens`` is the cache writes by how long they were kept (``ttl_label``'s ``5m``, ``1h``, ``12h``),
540
566
  which a price charges at each time's rate; left out, it's what a provider's split in ``provider_details``
541
567
  (``CACHE_WRITE_SPLITS``) counts, else the rows' sum when every row gives one. Writes it doesn't count weren't
542
- said how long they were kept."""
568
+ said how long they were kept. ``service_tier`` and ``speed`` are the ones the provider ran the calls at, as it
569
+ names them (``agreed_service_level`` over several calls), None when nothing reported them, which reads as standard
570
+ (``is_standard_service_level``)."""
543
571
 
544
572
  tool_call_count: int | None = None
545
573
  input_tokens: int | None = None
@@ -550,11 +578,16 @@ class Usage:
550
578
  cache_write_ttl_tokens: Mapping[str, int] | None = None
551
579
  input_includes_cache: bool | None = None
552
580
  cost_usd: float | None = None
581
+ service_tier: str | None = None
582
+ speed: str | None = None
553
583
  models: tuple[ModelUsage, ...] = ()
554
584
  provider_details: Mapping[str, Any] = field(default_factory=dict)
555
585
 
556
586
  def __post_init__(self) -> None:
557
587
  _check_counts(self, _USAGE_COUNTERS)
588
+ for name in SERVICE_LEVEL_FIELDS:
589
+ if getattr(self, name) is not None and not isinstance(getattr(self, name), str):
590
+ raise ValueError(f"{name} must be a string")
558
591
  if isinstance(self.models, (str, bytes, Mapping)) or not isinstance(self.models, Iterable):
559
592
  raise TypeError("models must be a list of each model's usage")
560
593
  object.__setattr__(self, "models", tuple(
@@ -596,7 +629,7 @@ class Usage:
596
629
  return cls(**known, provider_details={} if details is None else details)
597
630
 
598
631
  @classmethod
599
- def from_model_response(cls, usage: Mapping[str, Any]) -> "Usage":
632
+ def from_model_response(cls, usage: Mapping[str, Any], *, service_tier: str | None = None) -> "Usage":
600
633
  """A model call's usage as its response carried it, with ``input_tokens`` counting the cache: OpenAI's Chat
601
634
  Completions (``prompt_tokens``) and Responses (``input_tokens``) shapes, and Anthropic's. An OpenAI count,
602
635
  or a LiteLLM client's, says what it holds in its ``prompt_tokens_details`` or ``input_tokens_details``, whose
@@ -606,7 +639,9 @@ class Usage:
606
639
  provider's split of its cache writes by how long they're kept (Anthropic's ``cache_creation``, which a LiteLLM
607
640
  client's ``cache_creation_token_details`` is kept as, and OpenAI's ``cache_write_tokens_details``) is kept in
608
641
  ``provider_details``, and read into ``cache_write_ttl_tokens``; so are the keys of a usage in none of these
609
- shapes, as ``unrecognized``. A value that isn't a count is left out."""
642
+ shapes, as ``unrecognized``. A value that isn't a count is left out. The service tier and speed are
643
+ Anthropic's, which its usage carries; a reader that holds a whole OpenAI response passes its top-level
644
+ ``service_tier``, which the usage's own comes before."""
610
645
  key = "prompt_tokens" if "prompt_tokens" in usage else "input_tokens"
611
646
  details = usage.get(f"{key}_details")
612
647
  details = details if isinstance(details, Mapping) else {}
@@ -634,7 +669,8 @@ class Usage:
634
669
  provider_details["unrecognized"] = sorted(map(str, usage))
635
670
  return cls(input_tokens=input_tokens, output_tokens=output, total_tokens=total, cache_read_tokens=read,
636
671
  cache_write_tokens=write, input_includes_cache=True if input_tokens is not None else None,
637
- provider_details=provider_details)
672
+ service_tier=_tier_name(usage.get("service_tier")) or _tier_name(service_tier),
673
+ speed=_tier_name(usage.get("speed")), provider_details=provider_details)
638
674
 
639
675
  @property
640
676
  def is_empty(self) -> bool:
@@ -623,6 +623,19 @@ def test_a_turns_recorded_calls_are_given_by_the_model_each_named(client):
623
623
  {"model": "gpt-4o-mini", "calls": 2, "input_tokens": 300, "output_tokens": 5, "input_includes_cache": True}]
624
624
 
625
625
 
626
+ @pytest.mark.parametrize("tiers, expected", [
627
+ ([("standard", "standard"), ("default", None)], {"service_tier": "standard", "speed": "standard"}),
628
+ ([("priority", None), ("standard", "fast")], {"service_tier": "mixed", "speed": "fast"}),
629
+ ([(None, None), (None, None)], {}),
630
+ ], ids=["agree", "disagree", "none"])
631
+ def test_a_turns_service_tier_and_speed_are_the_ones_its_calls_agree_on(client, tiers, expected):
632
+ usage = _recorded_turn(client, [(None, {"input_tokens": 10, "output_tokens": 1,
633
+ **({"service_tier": tier} if tier else {}),
634
+ **({"speed": speed} if speed else {})}) for tier, speed in tiers])
635
+
636
+ assert {key: usage[key] for key in ("service_tier", "speed") if key in usage} == expected
637
+
638
+
626
639
  def test_a_turn_with_a_call_that_named_no_model_gives_no_rows(client):
627
640
  usage = _recorded_turn(client, [("gpt-4.1-mini", {"prompt_tokens": 1000, "completion_tokens": 10}),
628
641
  (None, {"prompt_tokens": 200, "completion_tokens": 2})])
@@ -3,7 +3,9 @@ set, read back by ``from_dict`` from any protocol version, and carried by a fail
3
3
 
4
4
  import pytest
5
5
 
6
- from agentenv_protocol.a2a_agent import ttl_counts_in_seconds, ttl_label, ttl_seconds, ttl_sum
6
+ from agentenv_protocol.a2a_agent import (
7
+ MIXED_SERVICE_LEVEL, agreed_service_level, is_standard_service_level, ttl_counts_in_seconds, ttl_label, ttl_seconds, ttl_sum,
8
+ )
7
9
  from agentenv_protocol.a2a_agent.tasks.v1 import ModelUsage, TaskResult, Usage
8
10
 
9
11
  FULL = Usage(tool_call_count=2, input_tokens=120, output_tokens=7, total_tokens=127, cache_read_tokens=100,
@@ -95,7 +97,7 @@ RESPONSES = {
95
97
  {"input_tokens": 9, "output_tokens": 5, "cache_creation_input_tokens": 7813, "cache_read_input_tokens": 0,
96
98
  "cache_creation": {"ephemeral_1h_input_tokens": 7813, "ephemeral_5m_input_tokens": 0}, "speed": "standard"},
97
99
  Usage(input_tokens=7822, output_tokens=5, total_tokens=7827, cache_read_tokens=0, cache_write_tokens=7813,
98
- input_includes_cache=True,
100
+ input_includes_cache=True, speed="standard",
99
101
  provider_details={"cache_creation": {"ephemeral_1h_input_tokens": 7813, "ephemeral_5m_input_tokens": 0}})),
100
102
  "openai-responses-gpt": (
101
103
  {"input_tokens": 7823, "output_tokens": 3, "total_tokens": 7826, "cost": None,
@@ -190,3 +192,52 @@ def test_writes_by_time_as_stored_are_read_by_seconds_leaving_out_what_cant_be_r
190
192
  assert ttl_counts_in_seconds(stored) == {3600: 7, 43200: 4}
191
193
  assert ttl_counts_in_seconds(["1h"]) == {} == ttl_counts_in_seconds(None)
192
194
  assert ttl_sum([{3600: 1}, None, {3600: 2, 300: 1}]) == {3600: 3, 300: 1} and ttl_sum([None]) is None
195
+
196
+
197
+ def test_an_anthropic_usage_keeps_its_service_tier_and_speed():
198
+ usage = Usage.from_model_response({"input_tokens": 9, "output_tokens": 5, "service_tier": "priority",
199
+ "speed": "fast"})
200
+ assert (usage.service_tier, usage.speed) == ("priority", "fast")
201
+
202
+
203
+ def test_a_whole_responses_top_level_tier_is_passed_and_the_usages_own_comes_before_it():
204
+ openai = {"prompt_tokens": 10, "completion_tokens": 2}
205
+ assert Usage.from_model_response(openai, service_tier="flex").service_tier == "flex"
206
+ assert Usage.from_model_response({**openai, "service_tier": "standard"}, service_tier="flex").service_tier == (
207
+ "standard")
208
+ assert Usage.from_model_response(openai).service_tier is None
209
+
210
+
211
+ @pytest.mark.parametrize("value", [None, "", 2, {"tier": "priority"}])
212
+ def test_a_tier_or_speed_that_isnt_a_name_is_left_out(value):
213
+ usage = Usage.from_model_response({"input_tokens": 9, "output_tokens": 5, "service_tier": value, "speed": value},
214
+ service_tier=value if isinstance(value, str) else None)
215
+ assert (usage.service_tier, usage.speed) == (None, None)
216
+
217
+
218
+ def test_a_tier_and_speed_round_trip_and_an_older_reader_takes_none():
219
+ usage = Usage(input_tokens=9, output_tokens=5, service_tier="priority", speed="fast")
220
+ assert usage.to_dict()["service_tier"] == "priority" and usage.to_dict()["speed"] == "fast"
221
+ assert Usage.from_dict(usage.to_dict()) == usage
222
+ assert "service_tier" not in Usage(input_tokens=9).to_dict()
223
+ assert not Usage(service_tier="priority").is_empty
224
+
225
+
226
+ @pytest.mark.parametrize("field", ["service_tier", "speed"])
227
+ def test_a_tier_or_speed_that_isnt_a_string_is_refused(field):
228
+ with pytest.raises(ValueError, match=field):
229
+ Usage(**{field: 2})
230
+
231
+
232
+ @pytest.mark.parametrize("names, agreed", [
233
+ ([], None), ([None, None], None), (["priority"], "priority"), ([None, "flex", None], "flex"),
234
+ (["standard", "default", "ON_DEMAND"], "standard"), (["default", "standard"], "default"),
235
+ (["standard", "priority"], MIXED_SERVICE_LEVEL), (["priority", "Priority"], "priority"), (["fast", "flex"], MIXED_SERVICE_LEVEL),
236
+ ])
237
+ def test_calls_agree_on_a_tier_when_they_give_one_the_standard_names_counting_as_one(names, agreed):
238
+ assert agreed_service_level(names) == agreed
239
+
240
+
241
+ def test_standard_is_unrecorded_or_a_standard_name_in_any_case():
242
+ assert all(map(is_standard_service_level, [None, "standard", "Default", "on_demand", "ON_DEMAND"]))
243
+ assert not any(map(is_standard_service_level, ["priority", "flex", "fast", "ultrafast", MIXED_SERVICE_LEVEL]))