agentenv-framework-protocol 0.1.586__tar.gz → 0.1.588__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 (239) hide show
  1. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/PKG-INFO +42 -6
  2. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/README.md +41 -5
  3. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/pyproject.toml +1 -1
  4. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/a2a_agent/_trajectory_log.py +35 -13
  5. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/a2a_agent/extensions.py +25 -5
  6. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/a2a_agent/framework.py +46 -12
  7. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/a2a_agent/proxy.py +1 -2
  8. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/a2a_agent/tasks/v1.py +18 -5
  9. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_a2a_agent.py +7 -5
  10. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_a2a_object_transfers.py +3 -2
  11. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_a2a_proxy.py +4 -0
  12. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_a2a_trajectory_log.py +269 -21
  13. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/.gitignore +0 -0
  14. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/LICENSE +0 -0
  15. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/NOTICE +0 -0
  16. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/THIRD_PARTY_NOTICES.md +0 -0
  17. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/examples/__init__.py +0 -0
  18. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/examples/advanced_agent.py +0 -0
  19. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/examples/basic_agent.py +0 -0
  20. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/examples/custom_extensions_agent.py +0 -0
  21. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/examples/multimodal_agent.py +0 -0
  22. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/examples/reference_model.py +0 -0
  23. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/examples/streaming_agent.py +0 -0
  24. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/examples/website/notes/.gitignore +0 -0
  25. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/examples/website/notes/Dockerfile +0 -0
  26. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/examples/website/notes/Dockerfile.dockerignore +0 -0
  27. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/examples/website/notes/README.md +0 -0
  28. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/examples/website/notes/data/seed.json +0 -0
  29. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/examples/website/notes/env.toml +0 -0
  30. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/examples/website/notes/site.py +0 -0
  31. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/examples/website/notes/web/index.html +0 -0
  32. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/examples/website/notes/web/package-lock.json +0 -0
  33. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/examples/website/notes/web/package.json +0 -0
  34. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/examples/website/notes/web/src/main.js +0 -0
  35. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/examples/website/notes/web/src/style.css +0 -0
  36. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/examples/website/notes/web/vite.config.js +0 -0
  37. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/__init__.py +0 -0
  38. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/a2a_agent/__init__.py +0 -0
  39. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/a2a_agent/_triggers.py +0 -0
  40. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/a2a_agent/clock.py +0 -0
  41. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/a2a_agent/control_token.py +0 -0
  42. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/a2a_agent/peer_agents.py +0 -0
  43. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/a2a_agent/registry.py +0 -0
  44. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/a2a_agent/staging.py +0 -0
  45. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/a2a_agent/tasks/__init__.py +0 -0
  46. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/agent_env_environment.py +0 -0
  47. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/atif/PROFILE.md +0 -0
  48. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/atif/__init__.py +0 -0
  49. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/atif/adapter.py +0 -0
  50. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/atif/builder.py +0 -0
  51. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/atif/fixtures/coding.json +0 -0
  52. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/atif/fixtures/coding.stripped.json +0 -0
  53. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/atif/fixtures/computer_use.json +0 -0
  54. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/atif/fixtures/late_result.json +0 -0
  55. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/atif/fixtures/media/482405b002a62efa8516c36709a7a100637507670576fa73a20ad5420d55c66f.png +0 -0
  56. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/atif/fixtures/media/55c64d0fcd6f9d5f7c828093857e3fdfda68478bb4e9bd24d481ef391c7804e8.heic +0 -0
  57. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/atif/fixtures/media/67905ad3cc2dd52b1f5f6a6d2814de0396618b29b4238b9af5207aeb69936e6d.mp4 +0 -0
  58. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/atif/fixtures/media/69a8aa01fe5537076d023dd5e9cc4275b39fc0434aa6483a9f58b66ef2f3c896.png +0 -0
  59. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/atif/fixtures/media/82e60066a2de261b6653bcdda90d1cb9a7af2f474cecd82e8d371e8384d72315.png +0 -0
  60. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/atif/fixtures/media/845e91831319e89c4d656bdb80c278ac09a7230d61e5dfd2e1b1fbb436ac8917.pdf +0 -0
  61. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/atif/fixtures/multi_agent.json +0 -0
  62. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/atif/fixtures/odd_parts.json +0 -0
  63. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/atif/fixtures/subagent.json +0 -0
  64. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/atif/fixtures/two_turns.json +0 -0
  65. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/atif/models/LICENSE +0 -0
  66. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/atif/models/VENDORED.md +0 -0
  67. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/atif/models/__init__.py +0 -0
  68. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/atif/models/agent.py +0 -0
  69. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/atif/models/content.py +0 -0
  70. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/atif/models/final_metrics.py +0 -0
  71. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/atif/models/metrics.py +0 -0
  72. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/atif/models/observation.py +0 -0
  73. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/atif/models/observation_result.py +0 -0
  74. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/atif/models/step.py +0 -0
  75. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/atif/models/subagent_trajectory_ref.py +0 -0
  76. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/atif/models/tool_call.py +0 -0
  77. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/atif/models/trajectory.py +0 -0
  78. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/atif/profile.py +0 -0
  79. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/atif/reader.py +0 -0
  80. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/atif/runner.py +0 -0
  81. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/client.py +0 -0
  82. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/computer/__init__.py +0 -0
  83. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/computer/_declare.py +0 -0
  84. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/computer/_desktop.py +0 -0
  85. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/computer/_job.py +0 -0
  86. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/computer/_linux.py +0 -0
  87. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/computer/_load.py +0 -0
  88. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/computer/_macos.py +0 -0
  89. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/computer/_reaping.py +0 -0
  90. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/computer/_session_posix.py +0 -0
  91. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/computer/_session_windows.py +0 -0
  92. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/computer/_windows.py +0 -0
  93. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/computer/_with_fds.py +0 -0
  94. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/computer/_x11.py +0 -0
  95. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/computer/app.py +0 -0
  96. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/computer/app_data.py +0 -0
  97. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/computer/app_runtime.py +0 -0
  98. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/computer/apps.py +0 -0
  99. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/computer/card.py +0 -0
  100. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/computer/checks.py +0 -0
  101. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/computer/clock.py +0 -0
  102. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/computer/conformance/__init__.py +0 -0
  103. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/computer/conformance/__main__.py +0 -0
  104. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/computer/conformance/checks.py +0 -0
  105. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/computer/conformance/client.py +0 -0
  106. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/computer/conformance/desk.py +0 -0
  107. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/computer/conformance/fixture.py +0 -0
  108. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/computer/conformance/mp4.py +0 -0
  109. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/computer/conformance/page_fixture.py +0 -0
  110. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/computer/conformance/report.py +0 -0
  111. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/computer/conformance/wayland_fixture.py +0 -0
  112. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/computer/dataplane.py +0 -0
  113. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/computer/driver.py +0 -0
  114. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/computer/errors.py +0 -0
  115. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/computer/extensions.py +0 -0
  116. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/computer/frames.py +0 -0
  117. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/computer/keys.py +0 -0
  118. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/computer/launch.py +0 -0
  119. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/computer/manifest.py +0 -0
  120. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/computer/operations.py +0 -0
  121. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/computer/platform.py +0 -0
  122. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/computer/prefix.py +0 -0
  123. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/computer/queue.py +0 -0
  124. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/computer/recording.py +0 -0
  125. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/computer/results.py +0 -0
  126. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/computer/run_install_step.py +0 -0
  127. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/computer/runtime.py +0 -0
  128. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/computer/seed.py +0 -0
  129. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/computer/serve.py +0 -0
  130. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/computer/serve_app.py +0 -0
  131. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/computer/served.py +0 -0
  132. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/computer/session.py +0 -0
  133. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/computer/settings.py +0 -0
  134. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/computer/skill.py +0 -0
  135. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/computer/spaces.py +0 -0
  136. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/computer/svc.py +0 -0
  137. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/computer/tools.py +0 -0
  138. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/errors.py +0 -0
  139. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/manifest.py +0 -0
  140. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/passthrough.py +0 -0
  141. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/preflight.py +0 -0
  142. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/tool_access.py +0 -0
  143. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/tool_client.py +0 -0
  144. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/tool_context.py +0 -0
  145. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/transfers.py +0 -0
  146. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/types.py +0 -0
  147. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/website/__init__.py +0 -0
  148. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/website/clock.py +0 -0
  149. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/website/conformance.py +0 -0
  150. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/website/environment.py +0 -0
  151. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/website/errors.py +0 -0
  152. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/website/forwarding.py +0 -0
  153. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/website/readiness.py +0 -0
  154. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/website/routes.py +0 -0
  155. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/website/session.py +0 -0
  156. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/website_browser/__init__.py +0 -0
  157. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/website_browser/cdp.py +0 -0
  158. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/website_browser/contexts.py +0 -0
  159. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/website_browser/control.py +0 -0
  160. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/website_browser/data.py +0 -0
  161. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/website_browser/devtools.py +0 -0
  162. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/website_browser/environment.py +0 -0
  163. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/website_browser/log.py +0 -0
  164. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/website_browser/network.py +0 -0
  165. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/website_browser/recording.py +0 -0
  166. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/website_browser/scope.py +0 -0
  167. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/website_browser/shapes.py +0 -0
  168. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/src/agentenv_protocol/website_browser/stream.py +0 -0
  169. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/atif_cases.py +0 -0
  170. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/computer_fake.py +0 -0
  171. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/probe_fake.py +0 -0
  172. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_a2a_agent_clock.py +0 -0
  173. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_a2a_agent_examples.py +0 -0
  174. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_a2a_cdp_config.py +0 -0
  175. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_a2a_peer_agents.py +0 -0
  176. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_a2a_staging.py +0 -0
  177. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_agent_env_environment.py +0 -0
  178. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_atif_builder.py +0 -0
  179. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_atif_fixtures.py +0 -0
  180. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_atif_profile.py +0 -0
  181. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_atif_reader.py +0 -0
  182. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_atif_vendored.py +0 -0
  183. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_browser_cdp.py +0 -0
  184. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_browser_contexts.py +0 -0
  185. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_browser_data.py +0 -0
  186. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_browser_log.py +0 -0
  187. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_browser_network.py +0 -0
  188. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_browser_recording.py +0 -0
  189. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_browser_state.py +0 -0
  190. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_client.py +0 -0
  191. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_computer_app_data.py +0 -0
  192. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_computer_app_server.py +0 -0
  193. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_computer_clock.py +0 -0
  194. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_computer_conformance.py +0 -0
  195. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_computer_conformance_attempts.py +0 -0
  196. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_computer_conformance_checks.py +0 -0
  197. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_computer_conformance_page.py +0 -0
  198. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_computer_conformance_recording.py +0 -0
  199. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_computer_dataplane.py +0 -0
  200. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_computer_declare.py +0 -0
  201. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_computer_driver.py +0 -0
  202. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_computer_driver_keys.py +0 -0
  203. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_computer_extensions.py +0 -0
  204. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_computer_frames.py +0 -0
  205. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_computer_macos.py +0 -0
  206. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_computer_page.py +0 -0
  207. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_computer_queue.py +0 -0
  208. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_computer_recording.py +0 -0
  209. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_computer_seed.py +0 -0
  210. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_computer_serve.py +0 -0
  211. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_computer_served.py +0 -0
  212. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_computer_session_windows.py +0 -0
  213. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_computer_spaces.py +0 -0
  214. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_computer_svc_forward.py +0 -0
  215. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_computer_tool_prefix.py +0 -0
  216. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_computer_windows_driver.py +0 -0
  217. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_control_token.py +0 -0
  218. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_data_objects.py +0 -0
  219. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_devtools_pipe.py +0 -0
  220. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_errors.py +0 -0
  221. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_extension_methods.py +0 -0
  222. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_intake.py +0 -0
  223. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_manifest.py +0 -0
  224. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_preflight.py +0 -0
  225. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_tool_access.py +0 -0
  226. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_tool_annotations.py +0 -0
  227. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_tool_client.py +0 -0
  228. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_tool_context.py +0 -0
  229. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_tool_context_fastmcp.py +0 -0
  230. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_tool_context_injection.py +0 -0
  231. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_website_api.py +0 -0
  232. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_website_browser.py +0 -0
  233. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_website_conformance.py +0 -0
  234. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_website_environment.py +0 -0
  235. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_website_forwarding.py +0 -0
  236. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_website_live.py +0 -0
  237. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_website_mcp.py +0 -0
  238. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/tests/test_website_notes_example.py +0 -0
  239. {agentenv_framework_protocol-0.1.586 → agentenv_framework_protocol-0.1.588}/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.586
3
+ Version: 0.1.588
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
@@ -1603,6 +1603,39 @@ are dropped, least recently used first; a context with a task still pending or
1603
1603
  running is never dropped, nor is the one whose task has just ended. A running
1604
1604
  task's log is logged as a warning once it passes 100 MiB.
1605
1605
 
1606
+ #### Trajectory formats
1607
+
1608
+ `native` declares the format of the agent's native trajectory:
1609
+
1610
+ ```python
1611
+ enable(TRAJECTORY_V1, live=True, native="my-cli-events/1")
1612
+ ```
1613
+
1614
+ The card then lists three fields in the trajectory extension's `params`, beside
1615
+ `methods`:
1616
+
1617
+ - `formats`: the formats a read may name.
1618
+ - `native`: the native trajectory's format, which never changes.
1619
+ - `default`: the format a read that names none gets; for now it is `native`.
1620
+
1621
+ A card without `formats` predates them, so send its reads no `format`. With
1622
+ `native` declared, the log starts in that format and `set_format` is optional.
1623
+ A `set_format` or a returned `native_trajectory` in another format fails the
1624
+ turn as an `agent_error` with code `framework.trajectory_format_mismatch`, whose
1625
+ message names both formats.
1626
+
1627
+ Every trajectory read takes an optional `format`. A read naming none gets the
1628
+ default. A read naming a format the card doesn't list is HTTP 400 with the error
1629
+ code `format_not_offered`, and its message lists the formats the card offers.
1630
+ That check comes before any handler runs, the agent's own included.
1631
+
1632
+ Every read the framework answers names the format it served: `{trajectory, format}`,
1633
+ `{objects, format}`, and the cursor reads' `format`. A task whose result carries a
1634
+ `native_trajectory` is served in that trajectory's `format`. A context read names
1635
+ the most recent format its tasks set. Readers trust a response's `format` over
1636
+ the card. An agent that binds its own context reads should name, in their
1637
+ responses, the format it serves.
1638
+
1606
1639
  `enable(..., description="...")` is reserved for declarations carrying
1607
1640
  configuration or metadata. It preserves the agent-specific extension prose
1608
1641
  published in the Agent Card. The versioned SDK definition provides a generic
@@ -1623,8 +1656,11 @@ configuration keywords, and third-party definitions use the same public API as
1623
1656
  the built-ins.
1624
1657
 
1625
1658
  Extension request parsing and schema validation failures return HTTP 400.
1626
- Unhandled exceptions raised by an implementation handler return HTTP 500;
1627
- handlers use `HTTPException` when they intentionally need another status.
1659
+ An `AgentEnvError` raised by a handler answers with its `status` and the body
1660
+ `{"ok": false, "error": {code, message, retryable, applied, hint?}}`, as it does
1661
+ from an env (see [Errors](#errors)). Other unhandled exceptions raised by an
1662
+ implementation handler return HTTP 500 with a correlation ID; handlers use
1663
+ `HTTPException` when they intentionally need another status.
1628
1664
 
1629
1665
  Passing `config=MyAgentConfig` automatically enables `AGENT_CONFIG_V1`; direct
1630
1666
  `enable(AGENT_CONFIG_V1, ...)` declarations are rejected. The model's fields become the Agent Card's
@@ -1953,9 +1989,9 @@ optional field, `|` an alternative request):
1953
1989
  | Operation | Request | Response |
1954
1990
  | --- | --- | --- |
1955
1991
  | skill `add` | `{name, description, skill_md}` \| `{name, description, skill_bundle: {max_total_bytes, files: [{path, object: ReadObject}]}}` | `{name}` |
1956
- | trajectory `get` | `{task_id}` \| `{context_id}` | `{trajectory}` |
1957
- | | `{task_id \| context_id, objects: {trajectory: WriteObject}}` | `{objects: {trajectory: Uploaded}}` |
1958
- | | `{task_id \| context_id, after, limit?}` | `{context_id, task_id, state, format, events, next, has_more}` |
1992
+ | trajectory `get` | `{task_id, format?}` \| `{context_id, format?}` | `{trajectory, format}` |
1993
+ | | `{task_id \| context_id, objects: {trajectory: WriteObject}, format?}` | `{objects: {trajectory: Uploaded}, format}` |
1994
+ | | `{task_id \| context_id, after, limit?, format?}` | `{context_id, task_id, state, format, events, next, has_more}` |
1959
1995
  | snapshot `save` | `{context_id, objects: {trajectory: WriteObject, workspace?: WriteObject}}` | `{context_id, objects: {trajectory: Uploaded, workspace?: Uploaded}}` |
1960
1996
  | snapshot `load` | `{objects: {trajectory: ReadObject, workspace?: ReadObject}, target_context_id?}` | `{context_id}` |
1961
1997
  | `enable-changelog` | `{write_namespace: WriteNamespaceGrant, roots?}` | `{roots}` |
@@ -1532,6 +1532,39 @@ are dropped, least recently used first; a context with a task still pending or
1532
1532
  running is never dropped, nor is the one whose task has just ended. A running
1533
1533
  task's log is logged as a warning once it passes 100 MiB.
1534
1534
 
1535
+ #### Trajectory formats
1536
+
1537
+ `native` declares the format of the agent's native trajectory:
1538
+
1539
+ ```python
1540
+ enable(TRAJECTORY_V1, live=True, native="my-cli-events/1")
1541
+ ```
1542
+
1543
+ The card then lists three fields in the trajectory extension's `params`, beside
1544
+ `methods`:
1545
+
1546
+ - `formats`: the formats a read may name.
1547
+ - `native`: the native trajectory's format, which never changes.
1548
+ - `default`: the format a read that names none gets; for now it is `native`.
1549
+
1550
+ A card without `formats` predates them, so send its reads no `format`. With
1551
+ `native` declared, the log starts in that format and `set_format` is optional.
1552
+ A `set_format` or a returned `native_trajectory` in another format fails the
1553
+ turn as an `agent_error` with code `framework.trajectory_format_mismatch`, whose
1554
+ message names both formats.
1555
+
1556
+ Every trajectory read takes an optional `format`. A read naming none gets the
1557
+ default. A read naming a format the card doesn't list is HTTP 400 with the error
1558
+ code `format_not_offered`, and its message lists the formats the card offers.
1559
+ That check comes before any handler runs, the agent's own included.
1560
+
1561
+ Every read the framework answers names the format it served: `{trajectory, format}`,
1562
+ `{objects, format}`, and the cursor reads' `format`. A task whose result carries a
1563
+ `native_trajectory` is served in that trajectory's `format`. A context read names
1564
+ the most recent format its tasks set. Readers trust a response's `format` over
1565
+ the card. An agent that binds its own context reads should name, in their
1566
+ responses, the format it serves.
1567
+
1535
1568
  `enable(..., description="...")` is reserved for declarations carrying
1536
1569
  configuration or metadata. It preserves the agent-specific extension prose
1537
1570
  published in the Agent Card. The versioned SDK definition provides a generic
@@ -1552,8 +1585,11 @@ configuration keywords, and third-party definitions use the same public API as
1552
1585
  the built-ins.
1553
1586
 
1554
1587
  Extension request parsing and schema validation failures return HTTP 400.
1555
- Unhandled exceptions raised by an implementation handler return HTTP 500;
1556
- handlers use `HTTPException` when they intentionally need another status.
1588
+ An `AgentEnvError` raised by a handler answers with its `status` and the body
1589
+ `{"ok": false, "error": {code, message, retryable, applied, hint?}}`, as it does
1590
+ from an env (see [Errors](#errors)). Other unhandled exceptions raised by an
1591
+ implementation handler return HTTP 500 with a correlation ID; handlers use
1592
+ `HTTPException` when they intentionally need another status.
1557
1593
 
1558
1594
  Passing `config=MyAgentConfig` automatically enables `AGENT_CONFIG_V1`; direct
1559
1595
  `enable(AGENT_CONFIG_V1, ...)` declarations are rejected. The model's fields become the Agent Card's
@@ -1882,9 +1918,9 @@ optional field, `|` an alternative request):
1882
1918
  | Operation | Request | Response |
1883
1919
  | --- | --- | --- |
1884
1920
  | skill `add` | `{name, description, skill_md}` \| `{name, description, skill_bundle: {max_total_bytes, files: [{path, object: ReadObject}]}}` | `{name}` |
1885
- | trajectory `get` | `{task_id}` \| `{context_id}` | `{trajectory}` |
1886
- | | `{task_id \| context_id, objects: {trajectory: WriteObject}}` | `{objects: {trajectory: Uploaded}}` |
1887
- | | `{task_id \| context_id, after, limit?}` | `{context_id, task_id, state, format, events, next, has_more}` |
1921
+ | trajectory `get` | `{task_id, format?}` \| `{context_id, format?}` | `{trajectory, format}` |
1922
+ | | `{task_id \| context_id, objects: {trajectory: WriteObject}, format?}` | `{objects: {trajectory: Uploaded}, format}` |
1923
+ | | `{task_id \| context_id, after, limit?, format?}` | `{context_id, task_id, state, format, events, next, has_more}` |
1888
1924
  | snapshot `save` | `{context_id, objects: {trajectory: WriteObject, workspace?: WriteObject}}` | `{context_id, objects: {trajectory: Uploaded, workspace?: Uploaded}}` |
1889
1925
  | snapshot `load` | `{objects: {trajectory: ReadObject, workspace?: ReadObject}, target_context_id?}` | `{context_id}` |
1890
1926
  | `enable-changelog` | `{write_namespace: WriteNamespaceGrant, roots?}` | `{roots}` |
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "agentenv-framework-protocol"
3
- version = "0.1.586"
3
+ version = "0.1.588"
4
4
  description = "Open data-plane protocol and server SDK for agent environments."
5
5
  readme = "README.md"
6
6
  license = "Apache-2.0"
@@ -23,6 +23,7 @@ class _TaskRecord:
23
23
  cancel_requested: bool = False
24
24
  final_state: TrajectoryState | None = None
25
25
  native: bytes | None = None
26
+ native_format: str | None = None
26
27
 
27
28
  @property
28
29
  def state(self) -> TrajectoryState:
@@ -31,6 +32,14 @@ class _TaskRecord:
31
32
  return TrajectoryState.RUNNING if len(self.log) else TrajectoryState.PENDING
32
33
 
33
34
 
35
+ @dataclass(frozen=True, slots=True)
36
+ class TrajectoryBody:
37
+ """A whole trajectory as a JSON value's bytes, and the format it is in."""
38
+
39
+ body: bytes
40
+ format: str | None
41
+
42
+
34
43
  @dataclass(frozen=True, slots=True)
35
44
  class TrajectoryPage:
36
45
  context_id: str
@@ -48,10 +57,11 @@ class TaskTrajectories:
48
57
  positions in a context read never shift. A context with a task pending or running is
49
58
  never evicted, nor is the one whose task just ended, so its final record is readable."""
50
59
 
51
- def __init__(self, max_contexts: int = MAX_CACHED_CONTEXTS) -> None:
60
+ def __init__(self, max_contexts: int = MAX_CACHED_CONTEXTS, *, native: str | None = None) -> None:
52
61
  if max_contexts < 1:
53
62
  raise ValueError("max_contexts must be positive")
54
63
  self._max_contexts = max_contexts
64
+ self._native = native
55
65
  self._tasks: dict[str, _TaskRecord] = {}
56
66
  self._contexts: OrderedDict[str, list[str]] = OrderedDict()
57
67
 
@@ -59,7 +69,7 @@ class TaskTrajectories:
59
69
  """The task's log, created ``pending`` the first time the task is seen."""
60
70
  record = self._tasks.get(task_id)
61
71
  if record is None:
62
- log = TrajectoryLog()
72
+ log = TrajectoryLog(native=self._native)
63
73
  log._task_id = task_id
64
74
  record = self._tasks[task_id] = _TaskRecord(context_id=context_id, log=log)
65
75
  self._contexts.setdefault(context_id, []).append(task_id)
@@ -87,7 +97,12 @@ class TaskTrajectories:
87
97
  record.cancel_requested = True
88
98
 
89
99
  def seal(
90
- self, task_id: str, state: TrajectoryState, *, native: bytes | None = None
100
+ self,
101
+ task_id: str,
102
+ state: TrajectoryState,
103
+ *,
104
+ native: bytes | None = None,
105
+ native_format: str | None = None,
91
106
  ) -> None:
92
107
  """End the task's trajectory; the first seal wins."""
93
108
  record = self._tasks[task_id]
@@ -101,29 +116,34 @@ class TaskTrajectories:
101
116
  task_id,
102
117
  )
103
118
  record.native = native
119
+ record.native_format = native_format
104
120
  record.log._sealed = True
105
121
  record.final_state = TrajectoryState.CANCELED if record.cancel_requested else state
106
122
  self._touch(record.context_id)
107
123
  self._evict(keep=record.context_id)
108
124
 
109
- def final(self, task_id: str) -> bytes | None:
110
- """The ended task's final trajectory as a JSON array, or None if there is none yet."""
125
+ def final(self, task_id: str) -> TrajectoryBody | None:
126
+ """The ended task's final trajectory, a returned native one or else its log as a JSON
127
+ array, or None if there is none yet."""
111
128
  record = self._tasks.get(task_id)
112
129
  if record is None or record.final_state is None:
113
130
  return None
114
131
  self._touch(record.context_id)
115
132
  if record.native is not None:
116
- return record.native
133
+ return TrajectoryBody(record.native, record.native_format)
117
134
  if not len(record.log):
118
135
  return None
119
- return _json_array(record.log._events)
136
+ return TrajectoryBody(_json_array(record.log._events), record.log.format)
120
137
 
121
- def context_events(self, context_id: str) -> bytes | None:
138
+ def context_events(self, context_id: str) -> TrajectoryBody | None:
122
139
  """Every event of the context's tasks in order, as a JSON array."""
123
140
  records = self._context_records(context_id)
124
141
  if records is None:
125
142
  return None
126
- return _json_array([event for record in records for event in record.log._events])
143
+ return TrajectoryBody(
144
+ _json_array([event for record in records for event in record.log._events]),
145
+ _context_format(records),
146
+ )
127
147
 
128
148
  def task_page(
129
149
  self, task_id: str, after: int, max_events: int, max_bytes: int
@@ -186,10 +206,7 @@ class TaskTrajectories:
186
206
  context_id=context_id,
187
207
  task_id=task_ids[current],
188
208
  state=state,
189
- format=next(
190
- (record.log.format for record in reversed(records) if record.log.format),
191
- None,
192
- ),
209
+ format=_context_format(records),
193
210
  events=page,
194
211
  total=sum(lengths),
195
212
  )
@@ -219,6 +236,11 @@ class TaskTrajectories:
219
236
  del self._tasks[task_id]
220
237
 
221
238
 
239
+ def _context_format(records: list[_TaskRecord]) -> str | None:
240
+ """The most recent format any of the context's tasks set."""
241
+ return next((record.log.format for record in reversed(records) if record.log.format), None)
242
+
243
+
222
244
  def _page(
223
245
  events: list[bytes],
224
246
  start: int,
@@ -150,12 +150,19 @@ class SkillAddResponse(ExtensionResponse):
150
150
  name: str
151
151
 
152
152
 
153
+ MAX_TRAJECTORY_FORMAT_LENGTH = 128
154
+ #: A trajectory format id a read may name, such as ``my-cli-events/1``; the card's trajectory ``formats`` lists them.
155
+ TrajectoryFormat = Annotated[str, Field(min_length=1, max_length=MAX_TRAJECTORY_FORMAT_LENGTH, pattern=r"\S")]
156
+
157
+
153
158
  class TaskTrajectoryRequest(ExtensionRequest):
154
159
  task_id: str
160
+ format: TrajectoryFormat | None = None
155
161
 
156
162
 
157
163
  class ContextTrajectoryRequest(ExtensionRequest):
158
164
  context_id: str
165
+ format: TrajectoryFormat | None = None
159
166
 
160
167
 
161
168
  class TrajectoryWriteObjects(ExtensionRequest):
@@ -171,11 +178,13 @@ class TrajectoryWriteObjects(ExtensionRequest):
171
178
  class TaskObjectTrajectoryRequest(ExtensionRequest):
172
179
  task_id: str
173
180
  objects: TrajectoryWriteObjects
181
+ format: TrajectoryFormat | None = None
174
182
 
175
183
 
176
184
  class ContextObjectTrajectoryRequest(ExtensionRequest):
177
185
  context_id: str
178
186
  objects: TrajectoryWriteObjects
187
+ format: TrajectoryFormat | None = None
179
188
 
180
189
 
181
190
  class TrajectoryUploadedObjects(ExtensionResponse):
@@ -184,6 +193,7 @@ class TrajectoryUploadedObjects(ExtensionResponse):
184
193
 
185
194
  class TrajectoryObjectsResponse(ExtensionResponse):
186
195
  objects: TrajectoryUploadedObjects
196
+ format: str | None = None
187
197
 
188
198
 
189
199
  class TrajectoryState(str, Enum):
@@ -204,12 +214,14 @@ class TaskEventsTrajectoryRequest(ExtensionRequest):
204
214
  task_id: str
205
215
  after: StrictInt = Field(ge=0)
206
216
  limit: StrictInt | None = Field(default=None, ge=1, le=MAX_TRAJECTORY_READ_EVENTS)
217
+ format: TrajectoryFormat | None = None
207
218
 
208
219
 
209
220
  class ContextEventsTrajectoryRequest(ExtensionRequest):
210
221
  context_id: str
211
222
  after: StrictInt = Field(ge=0)
212
223
  limit: StrictInt | None = Field(default=None, ge=1, le=MAX_TRAJECTORY_READ_EVENTS)
224
+ format: TrajectoryFormat | None = None
213
225
 
214
226
 
215
227
  class TrajectoryEventsResponse(ExtensionResponse):
@@ -1092,15 +1104,23 @@ def _configure_install(**declaration: Any) -> ExtensionConfiguration:
1092
1104
  return ExtensionConfiguration(wire_params=declaration)
1093
1105
 
1094
1106
 
1095
- def _configure_trajectory(*, live: bool = False) -> ExtensionConfiguration:
1107
+ def _configure_trajectory(*, live: bool = False, native: str | None = None) -> ExtensionConfiguration:
1096
1108
  """``live=True`` advertises the cursor reads, which serve the framework's log while a
1097
- task runs, and the context reads the framework answers when the agent binds none."""
1109
+ task runs, and the context reads the framework answers when the agent binds none.
1110
+ ``native`` names the native log's format: the card offers it as ``formats``, ``native`` and
1111
+ ``default``, and the log, a returned native trajectory and every read hold to it."""
1098
1112
  if not isinstance(live, bool):
1099
1113
  raise TypeError("live must be a boolean")
1100
- if not live:
1101
- return ExtensionConfiguration()
1114
+ if native is not None and not isinstance(native, str):
1115
+ raise TypeError("native must be a format id string")
1116
+ if native is not None and (not native.strip() or len(native) > MAX_TRAJECTORY_FORMAT_LENGTH):
1117
+ raise ValueError(f"native must be a format id of 1 to {MAX_TRAJECTORY_FORMAT_LENGTH} characters")
1102
1118
  return ExtensionConfiguration(
1103
- variants={"get": {"task_events", "context_events", "context", "context_objects"}}
1119
+ wire_params={"formats": [native], "native": native, "default": native} if native else {},
1120
+ options={"native": native} if native else {},
1121
+ variants=(
1122
+ {"get": {"task_events", "context_events", "context", "context_objects"}} if live else {}
1123
+ ),
1104
1124
  )
1105
1125
 
1106
1126
 
@@ -57,12 +57,16 @@ from .extensions import (
57
57
  TaskObjectTrajectoryRequest,
58
58
  TaskTrajectoryRequest,
59
59
  TrajectoryEventsResponse,
60
+ TrajectoryObjectsResponse,
60
61
  TrajectoryState,
62
+ TrajectoryUploadedObjects,
61
63
  TriggerDecideRequest,
62
64
  TriggerRegisterRequest,
63
65
  enable,
64
66
  )
65
67
  from ..computer.errors import ComputerError
68
+ from ..errors import AgentEnvError
69
+ from ..types import error_body
66
70
  from . import clock as agent_clock
67
71
  from .control_token import REFUSAL, carries_control_token, log_guard, log_refusal, take_control_token
68
72
  from .peer_agents import PEER_MCP_PATH, PEER_MCP_SERVER_NAME, PeerAgents
@@ -518,6 +522,11 @@ def _unwrap_bound_handler(handler: Callable) -> Callable:
518
522
  return resolved
519
523
 
520
524
 
525
+ def _agent_env_error_response(error: AgentEnvError) -> JSONResponse:
526
+ """An extension's ``AgentEnvError`` as its status and the body env servers answer with."""
527
+ return JSONResponse(error_body(**error.fields()), status_code=error.status)
528
+
529
+
521
530
  def _opaque_extension_error(stage: str) -> HTTPException:
522
531
  """Log an extension failure while keeping implementation details off the wire."""
523
532
  correlation_id = uuid.uuid4().hex
@@ -552,7 +561,11 @@ class _SdkServices:
552
561
  )
553
562
  self.mcp_servers: dict[str, dict[str, Any]] = {}
554
563
  self.cdp_endpoints: dict[str, dict[str, Any]] = {}
555
- self.task_trajectories = TaskTrajectories()
564
+ trajectory = self._activations.get(TRAJECTORY_V1.uri)
565
+ native = trajectory.options.get("native") if trajectory is not None else None
566
+ #: What a trajectory read may name, as the card's trajectory ``formats`` lists them.
567
+ self.trajectory_formats: tuple[str, ...] = (native,) if native else ()
568
+ self.task_trajectories = TaskTrajectories(native=native)
556
569
  self._context_sessions = _BoundedContextSessions()
557
570
  self.skills: list[Mapping[str, Any]] = []
558
571
  self.identity_skills: dict[str, str] = {}
@@ -811,8 +824,8 @@ class _SdkServices:
811
824
  ):
812
825
  return self._trajectory_events(request)
813
826
  if isinstance(request, (TaskTrajectoryRequest, TaskObjectTrajectoryRequest)):
814
- body = self.task_trajectories.final(request.task_id)
815
- if body is None:
827
+ trajectory = self.task_trajectories.final(request.task_id)
828
+ if trajectory is None:
816
829
  raise HTTPException(
817
830
  status_code=404,
818
831
  detail=(
@@ -820,19 +833,31 @@ class _SdkServices:
820
833
  ),
821
834
  )
822
835
  else:
823
- body = self.task_trajectories.context_events(request.context_id)
824
- if body is None:
836
+ trajectory = self.task_trajectories.context_events(request.context_id)
837
+ if trajectory is None:
825
838
  raise HTTPException(
826
839
  status_code=404, detail=f"Unknown context '{request.context_id}'"
827
840
  )
828
841
  if isinstance(request, (TaskTrajectoryRequest, ContextTrajectoryRequest)):
829
- return {"trajectory": json.loads(body)}
830
- uploaded = await upload(request.objects.trajectory, body)
831
- return {
832
- "objects": {
833
- "trajectory": uploaded.model_dump(mode="json"),
834
- }
835
- }
842
+ return {"trajectory": json.loads(trajectory.body), "format": trajectory.format}
843
+ uploaded = await upload(request.objects.trajectory, trajectory.body)
844
+ return TrajectoryObjectsResponse(
845
+ objects=TrajectoryUploadedObjects(trajectory=uploaded), format=trajectory.format
846
+ )
847
+
848
+ def check_trajectory_format(self, format: str | None) -> None:
849
+ """Refuse a trajectory read naming a format the card doesn't offer, before any handler
850
+ runs, the agent's own included."""
851
+ if format is None or format in self.trajectory_formats:
852
+ return
853
+ offered = ", ".join(self.trajectory_formats)
854
+ raise AgentEnvError(
855
+ "format_not_offered",
856
+ f"the trajectory format {format!r} is not offered; this agent offers {offered}"
857
+ if offered
858
+ else f"the trajectory format {format!r} is not offered; this agent's card lists no formats, "
859
+ "so its reads take none",
860
+ )
836
861
 
837
862
  def _trajectory_events(
838
863
  self, request: TaskEventsTrajectoryRequest | ContextEventsTrajectoryRequest
@@ -1205,8 +1230,12 @@ class A2AAgentApplication:
1205
1230
  extension_request = None
1206
1231
  else:
1207
1232
  extension_request = request_model.model_validate(payload)
1233
+ if extension_uri == TRAJECTORY_V1.uri:
1234
+ self.services.check_trajectory_format(extension_request.format)
1208
1235
  except HTTPException:
1209
1236
  raise
1237
+ except AgentEnvError as exc:
1238
+ return _agent_env_error_response(exc)
1210
1239
  except ValidationError as exc:
1211
1240
  raise HTTPException(
1212
1241
  status_code=400, detail=_validation_error_detail(exc)
@@ -1257,6 +1286,8 @@ class A2AAgentApplication:
1257
1286
  return JSONResponse(result)
1258
1287
  except HTTPException:
1259
1288
  raise
1289
+ except AgentEnvError as exc:
1290
+ return _agent_env_error_response(exc)
1260
1291
  except TriggerError as exc:
1261
1292
  raise HTTPException(
1262
1293
  status_code=exc.status_code, detail=str(exc)
@@ -1333,6 +1364,8 @@ class _StandardExecutor:
1333
1364
  result = await self._run_streaming(request, updater, event_queue)
1334
1365
  else:
1335
1366
  result = await self._handler(request)
1367
+ if isinstance(result, TaskResult) and result.native_trajectory is not None:
1368
+ trajectory._hold_to_native(result.native_trajectory.format)
1336
1369
  except _TaskFailed as failed:
1337
1370
  result = TaskResult.failure(
1338
1371
  failed.error.code, failed.error.message, error_type=failed.error.error_type
@@ -1353,6 +1386,7 @@ class _StandardExecutor:
1353
1386
  if result.outcome is TaskOutcome.FAILED
1354
1387
  else TrajectoryState.COMPLETED,
1355
1388
  native=None if native is None else _encode_trajectory(native.payload),
1389
+ native_format=None if native is None else native.format,
1356
1390
  )
1357
1391
  message = updater.new_agent_message(parts=parts)
1358
1392
  if result.outcome is TaskOutcome.FAILED:
@@ -128,7 +128,7 @@ IDENTITY = AgentIdentity(
128
128
  description="An agent played from outside AgentEnv: a driver answers its turns.",
129
129
  version="1.0.0",
130
130
  )
131
- EXTENSIONS = (MCP_CONFIG_V1, enable(TRAJECTORY_V1, live=True), PROXY_V1)
131
+ EXTENSIONS = (MCP_CONFIG_V1, enable(TRAJECTORY_V1, live=True, native=TRAJECTORY_FORMAT), PROXY_V1)
132
132
 
133
133
 
134
134
  @a2a_agent(identity=IDENTITY, config=ProxyConfig, extensions=EXTENSIONS, lifespan=stopping_actions)
@@ -151,7 +151,6 @@ class ProxyAgent(AgentEnvAgent):
151
151
  async def run(self, request: TaskRequest[ProxyConfig]) -> TaskResult:
152
152
  if any(not isinstance(part, TextPart) for part in request.parts):
153
153
  return TaskResult.failure("proxy.unsupported_part", "the proxy passes on text parts only")
154
- request.trajectory.set_format(TRAJECTORY_FORMAT)
155
154
  turn = _Turn(
156
155
  task_id=request.task_id,
157
156
  context_id=request.context_id,
@@ -155,14 +155,16 @@ class TrajectoryLog:
155
155
 
156
156
  Each event is serialized as it is appended, so an event once read never changes; append
157
157
  from one thread at a time. Unless the result carries a ``native_trajectory``, the log is
158
- the task's final trajectory."""
158
+ the task's final trajectory. An agent whose card declares a ``native`` format starts with
159
+ that format, and setting or returning another fails the turn."""
159
160
 
160
- __slots__ = ("_events", "_size_bytes", "_format", "_sealed", "_task_id", "_warned")
161
+ __slots__ = ("_events", "_size_bytes", "_format", "_native", "_sealed", "_task_id", "_warned")
161
162
 
162
- def __init__(self) -> None:
163
+ def __init__(self, *, native: str | None = None) -> None:
163
164
  self._events: list[bytes] = []
164
165
  self._size_bytes = 0
165
- self._format: str | None = None
166
+ self._format: str | None = native
167
+ self._native = native
166
168
  self._sealed = False
167
169
  self._task_id: str | None = None
168
170
  self._warned = False
@@ -176,13 +178,15 @@ class TrajectoryLog:
176
178
  appended, it stays."""
177
179
  if not isinstance(format, str) or not format.strip():
178
180
  raise ValueError("trajectory format must be a non-empty string")
181
+ self._hold_to_native(format)
179
182
  self._ensure_open()
180
183
  if self._events and format != self._format:
181
184
  raise RuntimeError("the trajectory's format cannot change once events are appended")
182
185
  self._format = format
183
186
 
184
187
  def append(self, event: Mapping[str, Any]) -> None:
185
- """Record one complete event, a JSON object, after ``set_format`` has named its format."""
188
+ """Record one complete event, a JSON object, once the log has a format: the card's
189
+ ``native``, or one ``set_format`` names."""
186
190
  if not isinstance(event, Mapping):
187
191
  raise TypeError("a trajectory event must be a JSON object")
188
192
  self._ensure_open()
@@ -202,6 +206,15 @@ class TrajectoryLog:
202
206
  def __len__(self) -> int:
203
207
  return len(self._events)
204
208
 
209
+ def _hold_to_native(self, format: str) -> None:
210
+ """Fail the turn as the agent's error when ``format``, set or returned, isn't the native
211
+ format the card declares; a retry would fail the same way."""
212
+ if self._native is not None and format != self._native:
213
+ raise _TaskFailed(
214
+ "framework.trajectory_format_mismatch",
215
+ f"the trajectory format {format!r} is not {self._native!r}, the native format the card declares",
216
+ )
217
+
205
218
  def _ensure_open(self) -> None:
206
219
  if self._sealed:
207
220
  raise RuntimeError("the task has ended; its trajectory can no longer change")
@@ -257,14 +257,14 @@ def test_trajectory_cache_evicts_least_recently_used_context() -> None:
257
257
  trajectories.seal(
258
258
  f"task-{number}", TrajectoryState.COMPLETED, native=f"[{number}]".encode()
259
259
  )
260
- assert trajectories.final("task-1") == b"[1]"
260
+ assert trajectories.final("task-1").body == b"[1]"
261
261
 
262
262
  trajectories.register("task-3", "context-3")
263
263
  trajectories.seal("task-3", TrajectoryState.COMPLETED, native=b"[3]")
264
264
 
265
- assert trajectories.final("task-1") == b"[1]"
265
+ assert trajectories.final("task-1").body == b"[1]"
266
266
  assert trajectories.final("task-2") is None
267
- assert trajectories.final("task-3") == b"[3]"
267
+ assert trajectories.final("task-3").body == b"[3]"
268
268
 
269
269
 
270
270
  @pytest.mark.asyncio
@@ -2066,6 +2066,7 @@ def test_trajectory_context_variant_is_advertised_only_with_handler() -> None:
2066
2066
  request = task_only.card_extensions()[0]["params"]["methods"]["get"]["request"]
2067
2067
  assert request == {
2068
2068
  "required": ["task_id"],
2069
+ "optional": ["format"],
2069
2070
  "oneOf": [{}, {"required": ["objects"]}],
2070
2071
  }
2071
2072
 
@@ -2085,6 +2086,7 @@ def test_trajectory_context_variant_is_advertised_only_with_handler() -> None:
2085
2086
  )
2086
2087
  request = with_context.card_extensions()[0]["params"]["methods"]["get"]["request"]
2087
2088
  assert request == {
2089
+ "optional": ["format"],
2088
2090
  "oneOf": [
2089
2091
  {"required": ["task_id"]},
2090
2092
  {"required": ["task_id", "objects"]},
@@ -2110,7 +2112,7 @@ async def test_default_handler_delegation_accepts_sdk_request_variant() -> None:
2110
2112
  TaskTrajectoryRequest(task_id="task-1"),
2111
2113
  )
2112
2114
 
2113
- assert result == {"trajectory": [{"type": "result"}]}
2115
+ assert result == {"trajectory": [{"type": "result"}], "format": None}
2114
2116
 
2115
2117
 
2116
2118
  def test_trajectory_override_annotates_every_sdk_variant() -> None:
@@ -2899,7 +2901,7 @@ def test_generated_app_serves_sdk_extensions_and_a2a_lifecycle() -> None:
2899
2901
  "get",
2900
2902
  {"task_id": task["id"]},
2901
2903
  )
2902
- assert trajectory_response.json() == {"trajectory": [{"type": "result"}]}
2904
+ assert trajectory_response.json() == {"trajectory": [{"type": "result"}], "format": "test-events/v1"}
2903
2905
 
2904
2906
 
2905
2907
  def test_run_is_required() -> None:
@@ -566,13 +566,14 @@ async def test_sdk_trajectory_handler_uploads_portable_object(
566
566
  )
567
567
  )
568
568
 
569
- assert result == {
569
+ assert result.model_dump(mode="json") == {
570
570
  "objects": {
571
571
  "trajectory": {
572
572
  "size_bytes": 19,
573
573
  "sha256": hashlib.sha256(b'[{"type":"result"}]').hexdigest(),
574
574
  }
575
- }
575
+ },
576
+ "format": None,
576
577
  }
577
578
  assert services.task_trajectories.final("task-1") is not None
578
579
 
@@ -170,6 +170,9 @@ def test_the_card_offers_the_proxy_env_servers_and_a_system_prompt():
170
170
  assert sorted(extensions["urn:agentenv:proxy/v1"]["params"]["methods"]) == [
171
171
  "act", "claim", "next", "record", "reply", "result", "tools"]
172
172
  assert "urn:agentenv:mcp-config/v1" in extensions
173
+ trajectory = extensions["urn:agentenv:trajectory/v1"]["params"]
174
+ assert (trajectory["formats"], trajectory["native"], trajectory["default"]) == (
175
+ ["agentenv-proxy/v1"], "agentenv-proxy/v1", "agentenv-proxy/v1")
173
176
  assert "system_prompt" in extensions["urn:agentenv:agent-config/v1"]["params"]["methods"]["set"]["request"][
174
177
  "supported"]
175
178
 
@@ -202,6 +205,7 @@ def test_a_message_is_an_open_turn_until_the_driver_replies(client):
202
205
  assert (turn["name"], _attrs(turn, "gen_ai.prompt"), _attrs(turn, "gen_ai.completion")) == (
203
206
  "turn", {"prompt": "fix the build", "system_prompt": "be brief"},
204
207
  {"content": [{"type": "text", "text": "fixed"}]})
208
+ assert client.post("/ext/trajectory", json={"task_id": task_id}).json()["format"] == "agentenv-proxy/v1"
205
209
  assert _turns(client, after=seen["version"])["turns"] == []
206
210
 
207
211