agentenv-framework-protocol 0.1.582__tar.gz → 0.1.584__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.582 → agentenv_framework_protocol-0.1.584}/PKG-INFO +41 -1
  2. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/README.md +40 -0
  3. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/THIRD_PARTY_NOTICES.md +14 -2
  4. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/pyproject.toml +1 -1
  5. agentenv_framework_protocol-0.1.584/src/agentenv_protocol/atif/PROFILE.md +153 -0
  6. agentenv_framework_protocol-0.1.584/src/agentenv_protocol/atif/__init__.py +59 -0
  7. agentenv_framework_protocol-0.1.584/src/agentenv_protocol/atif/adapter.py +178 -0
  8. agentenv_framework_protocol-0.1.584/src/agentenv_protocol/atif/builder.py +825 -0
  9. agentenv_framework_protocol-0.1.584/src/agentenv_protocol/atif/fixtures/coding.json +229 -0
  10. agentenv_framework_protocol-0.1.584/src/agentenv_protocol/atif/fixtures/coding.stripped.json +155 -0
  11. agentenv_framework_protocol-0.1.584/src/agentenv_protocol/atif/fixtures/computer_use.json +246 -0
  12. agentenv_framework_protocol-0.1.584/src/agentenv_protocol/atif/fixtures/late_result.json +145 -0
  13. agentenv_framework_protocol-0.1.584/src/agentenv_protocol/atif/fixtures/media/482405b002a62efa8516c36709a7a100637507670576fa73a20ad5420d55c66f.png +1 -0
  14. agentenv_framework_protocol-0.1.584/src/agentenv_protocol/atif/fixtures/media/55c64d0fcd6f9d5f7c828093857e3fdfda68478bb4e9bd24d481ef391c7804e8.heic +1 -0
  15. agentenv_framework_protocol-0.1.584/src/agentenv_protocol/atif/fixtures/media/67905ad3cc2dd52b1f5f6a6d2814de0396618b29b4238b9af5207aeb69936e6d.mp4 +1 -0
  16. agentenv_framework_protocol-0.1.584/src/agentenv_protocol/atif/fixtures/media/69a8aa01fe5537076d023dd5e9cc4275b39fc0434aa6483a9f58b66ef2f3c896.png +1 -0
  17. agentenv_framework_protocol-0.1.584/src/agentenv_protocol/atif/fixtures/media/82e60066a2de261b6653bcdda90d1cb9a7af2f474cecd82e8d371e8384d72315.png +1 -0
  18. agentenv_framework_protocol-0.1.584/src/agentenv_protocol/atif/fixtures/media/845e91831319e89c4d656bdb80c278ac09a7230d61e5dfd2e1b1fbb436ac8917.pdf +1 -0
  19. agentenv_framework_protocol-0.1.584/src/agentenv_protocol/atif/fixtures/multi_agent.json +118 -0
  20. agentenv_framework_protocol-0.1.584/src/agentenv_protocol/atif/fixtures/odd_parts.json +182 -0
  21. agentenv_framework_protocol-0.1.584/src/agentenv_protocol/atif/fixtures/subagent.json +171 -0
  22. agentenv_framework_protocol-0.1.584/src/agentenv_protocol/atif/fixtures/two_turns.json +301 -0
  23. agentenv_framework_protocol-0.1.584/src/agentenv_protocol/atif/models/LICENSE +201 -0
  24. agentenv_framework_protocol-0.1.584/src/agentenv_protocol/atif/models/VENDORED.md +24 -0
  25. agentenv_framework_protocol-0.1.584/src/agentenv_protocol/atif/models/__init__.py +36 -0
  26. agentenv_framework_protocol-0.1.584/src/agentenv_protocol/atif/models/agent.py +33 -0
  27. agentenv_framework_protocol-0.1.584/src/agentenv_protocol/atif/models/content.py +157 -0
  28. agentenv_framework_protocol-0.1.584/src/agentenv_protocol/atif/models/final_metrics.py +41 -0
  29. agentenv_framework_protocol-0.1.584/src/agentenv_protocol/atif/models/metrics.py +45 -0
  30. agentenv_framework_protocol-0.1.584/src/agentenv_protocol/atif/models/observation.py +17 -0
  31. agentenv_framework_protocol-0.1.584/src/agentenv_protocol/atif/models/observation_result.py +43 -0
  32. agentenv_framework_protocol-0.1.584/src/agentenv_protocol/atif/models/step.py +140 -0
  33. agentenv_framework_protocol-0.1.584/src/agentenv_protocol/atif/models/subagent_trajectory_ref.py +86 -0
  34. agentenv_framework_protocol-0.1.584/src/agentenv_protocol/atif/models/tool_call.py +32 -0
  35. agentenv_framework_protocol-0.1.584/src/agentenv_protocol/atif/models/trajectory.py +207 -0
  36. agentenv_framework_protocol-0.1.584/src/agentenv_protocol/atif/profile.py +167 -0
  37. agentenv_framework_protocol-0.1.584/src/agentenv_protocol/atif/reader.py +158 -0
  38. agentenv_framework_protocol-0.1.584/src/agentenv_protocol/atif/runner.py +122 -0
  39. agentenv_framework_protocol-0.1.584/tests/atif_cases.py +265 -0
  40. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/tests/test_a2a_agent_clock.py +12 -1
  41. agentenv_framework_protocol-0.1.584/tests/test_atif_builder.py +572 -0
  42. agentenv_framework_protocol-0.1.584/tests/test_atif_fixtures.py +46 -0
  43. agentenv_framework_protocol-0.1.584/tests/test_atif_profile.py +51 -0
  44. agentenv_framework_protocol-0.1.584/tests/test_atif_reader.py +76 -0
  45. agentenv_framework_protocol-0.1.584/tests/test_atif_vendored.py +54 -0
  46. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/.gitignore +0 -0
  47. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/LICENSE +0 -0
  48. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/NOTICE +0 -0
  49. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/examples/__init__.py +0 -0
  50. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/examples/advanced_agent.py +0 -0
  51. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/examples/basic_agent.py +0 -0
  52. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/examples/custom_extensions_agent.py +0 -0
  53. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/examples/multimodal_agent.py +0 -0
  54. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/examples/reference_model.py +0 -0
  55. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/examples/streaming_agent.py +0 -0
  56. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/examples/website/notes/.gitignore +0 -0
  57. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/examples/website/notes/Dockerfile +0 -0
  58. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/examples/website/notes/Dockerfile.dockerignore +0 -0
  59. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/examples/website/notes/README.md +0 -0
  60. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/examples/website/notes/data/seed.json +0 -0
  61. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/examples/website/notes/env.toml +0 -0
  62. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/examples/website/notes/site.py +0 -0
  63. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/examples/website/notes/web/index.html +0 -0
  64. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/examples/website/notes/web/package-lock.json +0 -0
  65. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/examples/website/notes/web/package.json +0 -0
  66. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/examples/website/notes/web/src/main.js +0 -0
  67. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/examples/website/notes/web/src/style.css +0 -0
  68. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/examples/website/notes/web/vite.config.js +0 -0
  69. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/__init__.py +0 -0
  70. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/a2a_agent/__init__.py +0 -0
  71. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/a2a_agent/_trajectory_log.py +0 -0
  72. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/a2a_agent/_triggers.py +0 -0
  73. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/a2a_agent/clock.py +0 -0
  74. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/a2a_agent/control_token.py +0 -0
  75. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/a2a_agent/extensions.py +0 -0
  76. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/a2a_agent/framework.py +0 -0
  77. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/a2a_agent/peer_agents.py +0 -0
  78. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/a2a_agent/proxy.py +0 -0
  79. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/a2a_agent/registry.py +0 -0
  80. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/a2a_agent/staging.py +0 -0
  81. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/a2a_agent/tasks/__init__.py +0 -0
  82. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/a2a_agent/tasks/v1.py +0 -0
  83. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/agent_env_environment.py +0 -0
  84. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/client.py +0 -0
  85. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/computer/__init__.py +0 -0
  86. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/computer/_declare.py +0 -0
  87. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/computer/_desktop.py +0 -0
  88. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/computer/_job.py +0 -0
  89. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/computer/_linux.py +0 -0
  90. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/computer/_load.py +0 -0
  91. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/computer/_macos.py +0 -0
  92. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/computer/_reaping.py +0 -0
  93. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/computer/_session_posix.py +0 -0
  94. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/computer/_session_windows.py +0 -0
  95. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/computer/_windows.py +0 -0
  96. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/computer/_with_fds.py +0 -0
  97. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/computer/_x11.py +0 -0
  98. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/computer/app.py +0 -0
  99. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/computer/app_data.py +0 -0
  100. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/computer/app_runtime.py +0 -0
  101. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/computer/apps.py +0 -0
  102. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/computer/card.py +0 -0
  103. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/computer/checks.py +0 -0
  104. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/computer/clock.py +0 -0
  105. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/computer/conformance/__init__.py +0 -0
  106. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/computer/conformance/__main__.py +0 -0
  107. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/computer/conformance/checks.py +0 -0
  108. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/computer/conformance/client.py +0 -0
  109. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/computer/conformance/desk.py +0 -0
  110. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/computer/conformance/fixture.py +0 -0
  111. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/computer/conformance/mp4.py +0 -0
  112. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/computer/conformance/page_fixture.py +0 -0
  113. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/computer/conformance/report.py +0 -0
  114. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/computer/conformance/wayland_fixture.py +0 -0
  115. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/computer/dataplane.py +0 -0
  116. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/computer/driver.py +0 -0
  117. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/computer/errors.py +0 -0
  118. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/computer/extensions.py +0 -0
  119. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/computer/frames.py +0 -0
  120. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/computer/keys.py +0 -0
  121. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/computer/launch.py +0 -0
  122. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/computer/manifest.py +0 -0
  123. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/computer/operations.py +0 -0
  124. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/computer/platform.py +0 -0
  125. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/computer/prefix.py +0 -0
  126. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/computer/queue.py +0 -0
  127. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/computer/recording.py +0 -0
  128. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/computer/results.py +0 -0
  129. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/computer/run_install_step.py +0 -0
  130. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/computer/runtime.py +0 -0
  131. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/computer/seed.py +0 -0
  132. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/computer/serve.py +0 -0
  133. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/computer/serve_app.py +0 -0
  134. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/computer/served.py +0 -0
  135. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/computer/session.py +0 -0
  136. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/computer/settings.py +0 -0
  137. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/computer/skill.py +0 -0
  138. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/computer/spaces.py +0 -0
  139. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/computer/svc.py +0 -0
  140. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/computer/tools.py +0 -0
  141. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/errors.py +0 -0
  142. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/manifest.py +0 -0
  143. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/passthrough.py +0 -0
  144. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/preflight.py +0 -0
  145. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/tool_access.py +0 -0
  146. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/tool_client.py +0 -0
  147. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/tool_context.py +0 -0
  148. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/transfers.py +0 -0
  149. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/types.py +0 -0
  150. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/website/__init__.py +0 -0
  151. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/website/clock.py +0 -0
  152. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/website/conformance.py +0 -0
  153. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/website/environment.py +0 -0
  154. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/website/errors.py +0 -0
  155. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/website/forwarding.py +0 -0
  156. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/website/readiness.py +0 -0
  157. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/website/routes.py +0 -0
  158. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/website/session.py +0 -0
  159. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/website_browser/__init__.py +0 -0
  160. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/website_browser/cdp.py +0 -0
  161. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/website_browser/contexts.py +0 -0
  162. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/website_browser/control.py +0 -0
  163. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/website_browser/data.py +0 -0
  164. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/website_browser/devtools.py +0 -0
  165. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/website_browser/environment.py +0 -0
  166. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/website_browser/log.py +0 -0
  167. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/website_browser/network.py +0 -0
  168. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/website_browser/recording.py +0 -0
  169. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/website_browser/scope.py +0 -0
  170. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/website_browser/shapes.py +0 -0
  171. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/src/agentenv_protocol/website_browser/stream.py +0 -0
  172. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/tests/computer_fake.py +0 -0
  173. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/tests/probe_fake.py +0 -0
  174. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/tests/test_a2a_agent.py +0 -0
  175. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/tests/test_a2a_agent_examples.py +0 -0
  176. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/tests/test_a2a_cdp_config.py +0 -0
  177. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/tests/test_a2a_object_transfers.py +0 -0
  178. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/tests/test_a2a_peer_agents.py +0 -0
  179. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/tests/test_a2a_proxy.py +0 -0
  180. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/tests/test_a2a_staging.py +0 -0
  181. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/tests/test_a2a_trajectory_log.py +0 -0
  182. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/tests/test_agent_env_environment.py +0 -0
  183. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/tests/test_browser_cdp.py +0 -0
  184. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/tests/test_browser_contexts.py +0 -0
  185. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/tests/test_browser_data.py +0 -0
  186. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/tests/test_browser_log.py +0 -0
  187. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/tests/test_browser_network.py +0 -0
  188. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/tests/test_browser_recording.py +0 -0
  189. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/tests/test_browser_state.py +0 -0
  190. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/tests/test_client.py +0 -0
  191. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/tests/test_computer_app_data.py +0 -0
  192. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/tests/test_computer_app_server.py +0 -0
  193. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/tests/test_computer_clock.py +0 -0
  194. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/tests/test_computer_conformance.py +0 -0
  195. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/tests/test_computer_conformance_attempts.py +0 -0
  196. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/tests/test_computer_conformance_checks.py +0 -0
  197. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/tests/test_computer_conformance_page.py +0 -0
  198. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/tests/test_computer_conformance_recording.py +0 -0
  199. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/tests/test_computer_dataplane.py +0 -0
  200. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/tests/test_computer_declare.py +0 -0
  201. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/tests/test_computer_driver.py +0 -0
  202. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/tests/test_computer_driver_keys.py +0 -0
  203. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/tests/test_computer_extensions.py +0 -0
  204. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/tests/test_computer_frames.py +0 -0
  205. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/tests/test_computer_macos.py +0 -0
  206. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/tests/test_computer_page.py +0 -0
  207. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/tests/test_computer_queue.py +0 -0
  208. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/tests/test_computer_recording.py +0 -0
  209. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/tests/test_computer_seed.py +0 -0
  210. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/tests/test_computer_serve.py +0 -0
  211. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/tests/test_computer_served.py +0 -0
  212. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/tests/test_computer_session_windows.py +0 -0
  213. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/tests/test_computer_spaces.py +0 -0
  214. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/tests/test_computer_svc_forward.py +0 -0
  215. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/tests/test_computer_tool_prefix.py +0 -0
  216. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/tests/test_computer_windows_driver.py +0 -0
  217. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/tests/test_control_token.py +0 -0
  218. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/tests/test_data_objects.py +0 -0
  219. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/tests/test_devtools_pipe.py +0 -0
  220. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/tests/test_errors.py +0 -0
  221. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/tests/test_extension_methods.py +0 -0
  222. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/tests/test_intake.py +0 -0
  223. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/tests/test_manifest.py +0 -0
  224. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/tests/test_preflight.py +0 -0
  225. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/tests/test_tool_access.py +0 -0
  226. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/tests/test_tool_annotations.py +0 -0
  227. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/tests/test_tool_client.py +0 -0
  228. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/tests/test_tool_context.py +0 -0
  229. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/tests/test_tool_context_fastmcp.py +0 -0
  230. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/tests/test_tool_context_injection.py +0 -0
  231. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/tests/test_website_api.py +0 -0
  232. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/tests/test_website_browser.py +0 -0
  233. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/tests/test_website_conformance.py +0 -0
  234. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/tests/test_website_environment.py +0 -0
  235. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/tests/test_website_forwarding.py +0 -0
  236. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/tests/test_website_live.py +0 -0
  237. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/tests/test_website_mcp.py +0 -0
  238. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/tests/test_website_notes_example.py +0 -0
  239. {agentenv_framework_protocol-0.1.582 → agentenv_framework_protocol-0.1.584}/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.582
3
+ Version: 0.1.584
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
@@ -1325,6 +1325,46 @@ are the profile's template. The base class adds:
1325
1325
  - **Its skill**: sites by their real names, files to upload in `~/Uploads` and downloads in
1326
1326
  `~/Downloads`, folders it makes.
1327
1327
 
1328
+ ## Agent trajectories: ATIF
1329
+
1330
+ `agentenv_protocol.atif` is the record every agent serves beside its native log, as format `atif/1`:
1331
+ [ATIF v1.8](https://github.com/harbor-framework/harbor/blob/main/rfcs/0001-trajectory-format.md), Harbor's Agent
1332
+ Trajectory Interchange Format, plus agentenv's optional `extra.agentenv` profile. A document without the profile is
1333
+ still correct ATIF that means the same, so Harbor's tools read every document as is. `PROFILE.md` beside the module is
1334
+ the profile's spec, and `fixtures/` holds its canonical examples. The package needs only the base dependencies.
1335
+
1336
+ - **The models** are Harbor 0.26.0's own, vendored in `atif.models` and changed only in import paths (Harbor is
1337
+ Apache-2.0; its license is beside them). `python scripts/vendor_atif.py <version>` refreshes them.
1338
+ - **An adapter** turns an agent's native records into ATIF steps. It's a class declared with `@atif_adapter`, whose
1339
+ `@native`, `@aux` and `@finish` methods write through the typed step builder they're handed:
1340
+
1341
+ ```python
1342
+ from agentenv_protocol.atif import Adapter, atif_adapter, native
1343
+
1344
+ @atif_adapter(native_format="my-cli-events/1", version="0.1.0", input_includes_cache=False)
1345
+ class MyCliAtif(Adapter):
1346
+ @native(type="assistant")
1347
+ def assistant(self, record, turn):
1348
+ turn.message(step=record["id"], text=record["text"])
1349
+ turn.step(key=record["id"], model_name=record["model"], input_tokens=record["in"],
1350
+ cache_read_tokens=record["cache_read"], output_tokens=record["out"])
1351
+
1352
+ @native(type="tool_result")
1353
+ def result(self, record, turn):
1354
+ turn.tool_result(source_call_id=record["call_id"], text=record["output"])
1355
+ ```
1356
+
1357
+ The builder closes a step when the next one starts, puts every result in its call's step, writes `prompt_tokens`
1358
+ with the cache included, stores media at `media/<sha256>.<ext>`, embeds sub-agents and normalizes timestamps. A
1359
+ record no method takes is counted in the root profile.
1360
+ - **The runner** (`AdapterRun`, `replay`) feeds one A2A context's records through one adapter instance, a task at a
1361
+ time. It writes each task's user step from its `TurnContext`, and the final response once, with the task's
1362
+ terminal state on its last step. Its `page()` is the live view, built when it's read: closed steps only, so a
1363
+ reader's earlier page is always a prefix of a later one. A step is rendered once a page serves it and kept, so a
1364
+ read costs one parse of the document, not a render of every step.
1365
+ - **Readers** (`load`, `tasks`, `media_paths`, `strip_profile`, `is_prefix`) take any valid ATIF document, with or
1366
+ without the profile, such as a Harbor task's trajectory.json.
1367
+
1328
1368
  ## A2A agent framework
1329
1369
 
1330
1370
  The distribution exposes two unrelated decorators named `extension`:
@@ -1254,6 +1254,46 @@ are the profile's template. The base class adds:
1254
1254
  - **Its skill**: sites by their real names, files to upload in `~/Uploads` and downloads in
1255
1255
  `~/Downloads`, folders it makes.
1256
1256
 
1257
+ ## Agent trajectories: ATIF
1258
+
1259
+ `agentenv_protocol.atif` is the record every agent serves beside its native log, as format `atif/1`:
1260
+ [ATIF v1.8](https://github.com/harbor-framework/harbor/blob/main/rfcs/0001-trajectory-format.md), Harbor's Agent
1261
+ Trajectory Interchange Format, plus agentenv's optional `extra.agentenv` profile. A document without the profile is
1262
+ still correct ATIF that means the same, so Harbor's tools read every document as is. `PROFILE.md` beside the module is
1263
+ the profile's spec, and `fixtures/` holds its canonical examples. The package needs only the base dependencies.
1264
+
1265
+ - **The models** are Harbor 0.26.0's own, vendored in `atif.models` and changed only in import paths (Harbor is
1266
+ Apache-2.0; its license is beside them). `python scripts/vendor_atif.py <version>` refreshes them.
1267
+ - **An adapter** turns an agent's native records into ATIF steps. It's a class declared with `@atif_adapter`, whose
1268
+ `@native`, `@aux` and `@finish` methods write through the typed step builder they're handed:
1269
+
1270
+ ```python
1271
+ from agentenv_protocol.atif import Adapter, atif_adapter, native
1272
+
1273
+ @atif_adapter(native_format="my-cli-events/1", version="0.1.0", input_includes_cache=False)
1274
+ class MyCliAtif(Adapter):
1275
+ @native(type="assistant")
1276
+ def assistant(self, record, turn):
1277
+ turn.message(step=record["id"], text=record["text"])
1278
+ turn.step(key=record["id"], model_name=record["model"], input_tokens=record["in"],
1279
+ cache_read_tokens=record["cache_read"], output_tokens=record["out"])
1280
+
1281
+ @native(type="tool_result")
1282
+ def result(self, record, turn):
1283
+ turn.tool_result(source_call_id=record["call_id"], text=record["output"])
1284
+ ```
1285
+
1286
+ The builder closes a step when the next one starts, puts every result in its call's step, writes `prompt_tokens`
1287
+ with the cache included, stores media at `media/<sha256>.<ext>`, embeds sub-agents and normalizes timestamps. A
1288
+ record no method takes is counted in the root profile.
1289
+ - **The runner** (`AdapterRun`, `replay`) feeds one A2A context's records through one adapter instance, a task at a
1290
+ time. It writes each task's user step from its `TurnContext`, and the final response once, with the task's
1291
+ terminal state on its last step. Its `page()` is the live view, built when it's read: closed steps only, so a
1292
+ reader's earlier page is always a prefix of a later one. A step is rendered once a page serves it and kept, so a
1293
+ read costs one parse of the document, not a render of every step.
1294
+ - **Readers** (`load`, `tasks`, `media_paths`, `strip_profile`, `is_prefix`) take any valid ATIF document, with or
1295
+ without the profile, such as a Harbor task's trajectory.json.
1296
+
1257
1297
  ## A2A agent framework
1258
1298
 
1259
1299
  The distribution exposes two unrelated decorators named `extension`:
@@ -2,8 +2,8 @@
2
2
 
3
3
  This project is licensed under the Apache License, Version 2.0, but depends on third-party
4
4
  software identified below. These dependencies are installed separately from the Python Package
5
- Index and imported at runtime. Third-party source code is not incorporated into or statically
6
- linked with the source repository.
5
+ Index and imported at runtime. Apart from Harbor's ATIF models, described below, third-party source
6
+ code is not incorporated into or statically linked with the source repository.
7
7
 
8
8
  Each third-party component remains subject to its applicable license. Copyright notices, license
9
9
  files, source-code offers, and other materials accompanying each component form part of its
@@ -254,6 +254,18 @@ The runtime dependencies of `agentenv-protocol` and its `agent` extra, at the ve
254
254
  - Source: <https://github.com/Kludex/uvicorn>
255
255
  - [License text 11](#license-text-11)
256
256
 
257
+ ## Harbor's ATIF models
258
+
259
+ `src/agentenv_protocol/atif/models/` holds the trajectory models of [Harbor](https://github.com/harbor-framework/harbor) 0.26.0, the 11 modules
260
+ of its `harbor/models/trajectories/`, copied from Harbor's wheel on PyPI. Each copy's first line says where it's from
261
+ and that it was changed; the only change is its import paths. They are licensed as Harbor is, under the Apache License,
262
+ Version 2.0: the folder's `LICENSE` is the license file Harbor's wheel ships, which has no NOTICE file. The folder's
263
+ `VENDORED.md` records the wheel's sha256 and each upstream file's.
264
+
265
+ - Source: <https://github.com/harbor-framework/harbor> (`harbor` 0.26.0 on PyPI)
266
+ - Author: Alex Shaw
267
+ - License: Apache-2.0
268
+
257
269
  ## License texts
258
270
 
259
271
  License and notice files as shipped by each package, with copyright lines removed: they are listed with each package above. Packages whose files differ only in those lines share a text.
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "agentenv-framework-protocol"
3
- version = "0.1.582"
3
+ version = "0.1.584"
4
4
  description = "Open data-plane protocol and server SDK for agent environments."
5
5
  readme = "README.md"
6
6
  license = "Apache-2.0"
@@ -0,0 +1,153 @@
1
+ # The agentenv profile of ATIF
2
+
3
+ Profile 1.0. agentenv records what an agent did as an ATIF v1.8 document: Harbor's
4
+ [Agent Trajectory Interchange Format](https://github.com/harbor-framework/harbor/blob/main/rfcs/0001-trajectory-format.md),
5
+ whose models are vendored in `models/`. An agent serves it as format `atif/1`, beside its native log. What ATIF has no
6
+ typed field for, agentenv adds under `extra.agentenv` on the objects that have an `extra`. This file is the profile's spec.
7
+
8
+ ## The rule
9
+
10
+ - Typed fields mean exactly what ATIF says they mean. A document with `extra.agentenv` removed, or with any part of it
11
+ missing, is still correct ATIF and means the same.
12
+ - Every profile field is optional, for readers and for producers. A producer that can't fill one leaves it out.
13
+ - No typed field holds a placeholder or a value whose meaning needs the profile.
14
+ - Readers keep profile keys they don't know and write them back unchanged. Producers write only fields this version
15
+ defines; the validator holds them to it.
16
+ - An adapter writes nothing in an `extra` outside `extra.agentenv`, except the one key this file names:
17
+ `ToolCall.extra.raw_arguments`.
18
+
19
+ The native log is stored beside every ATIF copy, so a copy may leave things out. Nothing needs the copy to convert back
20
+ to native exactly.
21
+
22
+ ## Documents
23
+
24
+ - One document per agent per A2A context. Each A2A task starts at a `source: user` step that holds the inbound
25
+ message, with the task's ids in that step's profile. Steps number from 1 across the whole document.
26
+ - A context's record may span several documents: after an agent instance restarts, after a snapshot restore, and when
27
+ long runs are sealed into segments. They share `session_id`, the first user step of each carries the continuing turn
28
+ index, and each earlier document names the next in `continued_trajectory_ref`. The worker that stores the earlier
29
+ document sets that link, since the agent that wrote it may be gone.
30
+ - A sub-agent is an embedded trajectory in `subagent_trajectories`, with its own steps, referenced from the spawning
31
+ call's result by `subagent_trajectory_ref`. It belongs to the task of the call that spawned it. A sub-agent that
32
+ wrote no step is left out, and so is the reference to it.
33
+ - `schema_version` is the oldest ATIF version that holds the document's fields: `ATIF-v1.8` for profile 1.0.
34
+ - Format id: `atif/1`. The profile's own version is the root's `extra.agentenv.version`.
35
+
36
+ ## Steps
37
+
38
+ - A step is one model response, keyed by its native id (a message id), or a step with no model call
39
+ (`llm_call_count` 0, no metrics or reasoning). A step closes when the next step of its trajectory starts, or when its
40
+ task ends.
41
+ - A result always sits in the step that made its call, as ATIF requires. One that arrives after that step closed records
42
+ when, in `arrived`.
43
+ - A live reader is served closed steps only, each trajectory up to its first step still waiting on a result or
44
+ referencing a sub-agent the reader isn't served a step of yet. Steps are ordered, so such a step holds back the steps
45
+ after it until the result or the sub-agent's step comes, or the task ends. Everything a reader is served is a prefix
46
+ of every later read, and every reference it is served resolves.
47
+ - The final response is written once. When the task's last agent step already holds the same text, nothing is added;
48
+ otherwise one step is appended, `source: agent` and `llm_call_count` 0. The task's terminal state goes on the task's
49
+ last step, which closes only when the task ends, so it is never served before the state is known.
50
+ - An agent message whose parts are all text is one string, the parts joined by a blank line; Harbor's tools read only
51
+ strings there. Text output always goes in whole: there is no reference part and no cap.
52
+ - `reasoning_content` joins a step's reasoning blocks' texts with a blank line. The profile's `reasoning` lists every
53
+ block, in native order, with its share of that text, so a reader that knows the profile can rebuild exact blocks.
54
+ - Timestamps are UTC, written `YYYY-MM-DDTHH:MM:SS(.fff|.ffffff)Z`. Other precisions are normalized: ATIF's Step
55
+ validator on Python 3.10 reads no other.
56
+ - Usage follows ATIF: `prompt_tokens` includes cache reads and writes, and `cached_tokens` is the cache reads. Each
57
+ adapter's `input_includes_cache` constant says whether its native input count already includes the cache.
58
+ Cache writes go in `Metrics.extra.agentenv.cache_write_tokens`. An adapter may give a step's counts over several
59
+ records: each count is the latest given, and `prompt_tokens` is written once the input count is known.
60
+ - `final_metrics` totals a count only when every model step, every agent step but those with `llm_call_count` 0, has
61
+ it; otherwise the total is left out, which ATIF readers read as unknown.
62
+ - A tool call whose input isn't a JSON object is wrapped as Harbor wraps it: a string as `{"input": ...}`, a missing
63
+ input as `{}`, any other value as `{"value": ...}`. The native input is kept in `ToolCall.extra.raw_arguments`, only
64
+ when wrapping changed it. Harbor's ATIF-to-Codex resume reads that key back.
65
+ - A native record no adapter method takes is counted by its type in the root's `unmatched`; it stays in the native copy.
66
+
67
+ ## Cost
68
+
69
+ ATIF defines a step's `cost_usd` as the cost "based on current provider pricing for this step", and says the cost fields
70
+ "store the calculated cost at the time of execution".
71
+
72
+ - A cost the harness calculated from its own price table, or the endpoint's billed figure (the provider's, or a
73
+ proxy's such as LiteLLM's `x-litellm-response-cost`), goes in `Metrics.cost_usd` or `FinalMetrics.total_cost_usd`.
74
+ Its `cost_source` in the profile says which: `harness` or `provider`. These are the framework's reported costs.
75
+ - A cost agentenv computes itself, from its own price table after the run, never goes in a typed field. The framework
76
+ records that one with the run's usage instead, as a `priced` cost whose `cost_source` names the price table's
77
+ version; `harness` and `provider` mean the same there as here.
78
+ - `total_cost_usd` is the sum of the tasks' reported costs when every task has one, else of the steps' costs when
79
+ every model step has one. When nothing reports a cost, the typed fields stay empty, which ATIF readers read as
80
+ unknown.
81
+
82
+ ## Errors
83
+
84
+ One vocabulary, in three places:
85
+
86
+ - A tool result's `status` and `exit_code` go on its ObservationResult's profile. No status means `ok`.
87
+ - A step-level error, such as a refused or failed model call or a harness error, goes on its Step's profile as `error`.
88
+ - A task's terminal state goes on its last step's profile as `state`.
89
+
90
+ ## Media
91
+
92
+ - Media are files beside the trajectory, at `media/<sha256>.<ext>`, relative to the trajectory file.
93
+ - An image or audio part of a type ATIF has names that path.
94
+ - Media ATIF has no part type for is stored the same way, with a plain note in the typed content, such as
95
+ `[video: media/<sha256>.mp4, 4.4 MB, 31 s]`. That covers video, documents, images other than JPEG, PNG, GIF and WebP
96
+ (such as HEIC or SVG), audio outside ATIF's eight types, and other files.
97
+ - Each file's details go in the `media` map of the profile of the object that holds the part (Step for a message,
98
+ ObservationResult for a result), keyed by its path.
99
+
100
+ ## Fields
101
+
102
+ | Object | Field | Meaning | Read by |
103
+ | --- | --- | --- | --- |
104
+ | Trajectory | `version` | The profile version: `1.0` | every reader |
105
+ | Trajectory | `native_format` | The native format id the copy was built from | the worker that stores copies; renormalizing |
106
+ | Trajectory | `adapter` | The adapter's `name` and `version` | the worker that stores copies; renormalizing |
107
+ | Trajectory | `unmatched` | Native records no method took, counted by type | the adapter kit |
108
+ | Step | `context_id`, `task_id`, `message_id`, `turn` | On a task's user step: its A2A ids and turn index | the SDK, the worker, the hub's turns view |
109
+ | Step | `state` | On a task's last step: its terminal state | the explorer, the hub's turns view |
110
+ | Step | `attempt` | The harness attempt the step belongs to; absent means 1 | the explorer |
111
+ | Step | `error` | A step-level error: `kind`, `message`, `code` | the explorer |
112
+ | Step | `reasoning` | Each reasoning block: `chars`, `visibility`, `signature`, `data` | resuming a session; RL replay |
113
+ | Step | `media` | Details of the media the message names, by path | media transfer; the explorer |
114
+ | ObservationResult | `status` | The result's status; absent means `ok` | the explorer, judges' turn events |
115
+ | ObservationResult | `exit_code` | The command's exit code | the explorer, judges' turn events |
116
+ | ObservationResult | `arrived` | A late result's arrival: `at`, and the `step_id` open when it came | live readers, the explorer |
117
+ | ObservationResult | `media` | Details of the media the result names, by path | media transfer; the explorer |
118
+ | Metrics | `cost_source` | Where `cost_usd` came from | the run's usage and cost result |
119
+ | Metrics | `cache_write_tokens` | Cache writes, beside ATIF's `cached_tokens` | the run's usage and cost result |
120
+ | FinalMetrics | `cost_source` | Where `total_cost_usd` came from | the run's usage and cost result |
121
+ | FinalMetrics | `total_cache_write_tokens` | Cache writes summed over the steps | the run's usage and cost result |
122
+
123
+ A media entry (MediaInfo) holds `sha256`, `bytes`, and, where they apply, `width`, `height`, `duration_ms`, `pages`
124
+ and `name`, plus `media_type` for media ATIF has no part type for. A reasoning block (ReasoningBlock) holds `chars`,
125
+ its share of `reasoning_content` (0 when the provider withheld the text), its `visibility`, the provider's `signature`,
126
+ and a redacted block's ciphertext as `data`, byte for byte. A step error (StepError) holds `kind`, `message` and `code`.
127
+ An arrival (Arrival) holds `at` and `step_id`. The Agent, ToolCall and SubagentTrajectoryRef profiles define no fields
128
+ in 1.0.
129
+
130
+ ## Vocabularies
131
+
132
+ A reader keeps a value it doesn't know.
133
+
134
+ | Field | Values |
135
+ | --- | --- |
136
+ | `StepProfile.state` | `completed`, `failed`, `canceled`, `rejected` (A2A's terminal task states) |
137
+ | `ObservationResultProfile.status` | `ok`, `error`, `canceled`, `timeout` |
138
+ | `StepError.kind` | `agent_error`, `infra_error` |
139
+ | `ReasoningBlock.visibility` | `raw`, `summary`, `omitted`, `redacted` |
140
+ | `MetricsProfile.cost_source`, `FinalMetricsProfile.cost_source` | `harness`, `provider` |
141
+
142
+ ## Versions
143
+
144
+ A minor version only adds optional fields and vocabulary values, each with the reader or producer that needs it. A
145
+ field added in a later minor names the version it arrived in. Proposed for a later minor, with their first producer:
146
+ `input_includes_cache` on the root and `cost_status` (`reported`, `priced` or `unpriced`), with the usage
147
+ cross-check that reads them; per-part origins, when a reader needs them; and an always-on harness's fields.
148
+
149
+ ## Fixtures
150
+
151
+ `fixtures/` holds the profile's canonical examples, built through the adapter framework from a toy format's records:
152
+ `coding`, `computer_use`, `late_result`, `multi_agent`, `odd_parts`, `subagent` and `two_turns`, with their media in
153
+ `fixtures/media/`, and `coding.stripped.json`, the coding case without its profile.
@@ -0,0 +1,59 @@
1
+ """ATIF in agentenv: Harbor's Agent Trajectory Interchange Format (v1.8), the record every agent serves beside its
2
+ native log as ``atif/1``, plus agentenv's optional ``extra.agentenv`` profile. ``models`` holds Harbor's own models,
3
+ vendored; ``PROFILE.md`` beside this module is the profile's spec. The package needs only the protocol's base
4
+ dependencies, so anything can read a document or write an adapter."""
5
+ from .adapter import Adapter, AdapterSpec, Native, Selector, atif_adapter, aux, finish, native
6
+ from .builder import AtifTurn, Document, Media, TurnContext, timestamp
7
+ from .models import (
8
+ Agent,
9
+ AudioSource,
10
+ ContentPart,
11
+ FinalMetrics,
12
+ ImageSource,
13
+ Metrics,
14
+ Observation,
15
+ ObservationResult,
16
+ Step,
17
+ SubagentTrajectoryRef,
18
+ ToolCall,
19
+ Trajectory,
20
+ )
21
+ from .profile import (
22
+ FORMAT,
23
+ PROFILE_KEY,
24
+ PROFILE_VERSION,
25
+ PROFILES,
26
+ RAW_ARGUMENTS,
27
+ SCHEMA_VERSION,
28
+ VOCABULARIES,
29
+ AdapterRef,
30
+ AgentProfile,
31
+ Arrival,
32
+ AtifError,
33
+ FinalMetricsProfile,
34
+ MediaInfo,
35
+ MetricsProfile,
36
+ ObservationResultProfile,
37
+ ReasoningBlock,
38
+ StepError,
39
+ StepProfile,
40
+ SubagentTrajectoryRefProfile,
41
+ ToolCallProfile,
42
+ TrajectoryProfile,
43
+ dump_profile,
44
+ profile_of,
45
+ read_profile,
46
+ )
47
+ from .reader import Task, check, is_prefix, load, media_paths, strip_profile, tasks
48
+ from .runner import AdapterRun, Fed, RecordedTask, replay
49
+
50
+ __all__ = [
51
+ "Adapter", "AdapterRef", "AdapterRun", "AdapterSpec", "Agent", "AgentProfile", "Arrival", "AtifError", "AtifTurn",
52
+ "AudioSource", "ContentPart", "Document", "FORMAT", "Fed", "FinalMetrics", "FinalMetricsProfile", "ImageSource",
53
+ "Media", "MediaInfo", "Metrics", "MetricsProfile", "Native", "Observation", "ObservationResult",
54
+ "ObservationResultProfile", "PROFILES", "PROFILE_KEY", "PROFILE_VERSION", "RAW_ARGUMENTS", "ReasoningBlock",
55
+ "RecordedTask", "SCHEMA_VERSION", "Selector", "Step", "StepError", "StepProfile", "SubagentTrajectoryRef",
56
+ "SubagentTrajectoryRefProfile", "Task", "ToolCall", "ToolCallProfile", "Trajectory", "TrajectoryProfile",
57
+ "TurnContext", "VOCABULARIES", "atif_adapter", "aux", "check", "dump_profile", "finish", "is_prefix", "load",
58
+ "media_paths", "native", "profile_of", "read_profile", "replay", "strip_profile", "tasks", "timestamp",
59
+ ]
@@ -0,0 +1,178 @@
1
+ """Writing an ATIF adapter: a class, declared with ``@atif_adapter``, whose ``@native``, ``@aux`` and ``@finish``
2
+ methods turn an agent's native records into ATIF steps through the AtifTurn each one is handed. It reads only what the
3
+ run stores, so an offline replay builds the document the agent served live."""
4
+ from __future__ import annotations
5
+
6
+ import re
7
+ from dataclasses import dataclass, field
8
+ from typing import TYPE_CHECKING, Any, Callable, ClassVar, Mapping, Sequence, TypeVar
9
+
10
+ from .profile import AtifError
11
+
12
+ if TYPE_CHECKING:
13
+ from .builder import AtifTurn
14
+
15
+ #: A native format id: ``<name>/<version>``, as ``claude-code-stream-json/1``.
16
+ NATIVE_FORMAT = re.compile(r"^[a-z0-9][a-z0-9._-]*/[A-Za-z0-9._-]+$")
17
+ _MISSING = object()
18
+
19
+ A = TypeVar("A", bound="Adapter")
20
+
21
+
22
+ @dataclass(frozen=True)
23
+ class Native:
24
+ """What ``from_atif`` gives back, on a best-effort basis: the native log, and the files the CLI resumes from, by
25
+ name, or None when this adapter can't seed a session."""
26
+
27
+ log: list[Any]
28
+ session: dict[str, bytes] | None = None
29
+
30
+
31
+ @dataclass(frozen=True)
32
+ class Selector:
33
+ """The records a handler takes: native ones when ``aux`` is None, else aux file ``aux``'s, whose fields at each
34
+ dotted path in ``conditions`` hold one of the listed values."""
35
+
36
+ aux: str | None
37
+ conditions: tuple[tuple[str, tuple[Any, ...]], ...]
38
+ media_type: str | None = field(default=None, compare=False)
39
+
40
+ def matches(self, record: Any) -> bool:
41
+ return all(_lookup(record, path) in allowed for path, allowed in self.conditions)
42
+
43
+
44
+ def _lookup(record: Any, path: str) -> Any:
45
+ value = record
46
+ for key in path.split("."):
47
+ if not isinstance(value, Mapping) or key not in value:
48
+ return _MISSING
49
+ value = value[key]
50
+ return value
51
+
52
+
53
+ def _values(value: Any) -> tuple[Any, ...]:
54
+ return tuple(value) if isinstance(value, (tuple, list, set, frozenset)) else (value,)
55
+
56
+
57
+ def _handler(aux_name: str | None, kind: Any, where: Mapping[str, Any] | None,
58
+ media_type: str | None) -> Callable[[Callable], Callable]:
59
+ conditions = ([("type", _values(kind))] if kind is not None else []) + [
60
+ (path, _values(value)) for path, value in (where or {}).items()]
61
+ selector = Selector(aux_name, tuple(conditions), media_type)
62
+
63
+ def mark(method: Callable) -> Callable:
64
+ method.__dict__.setdefault("__atif_selectors__", []).append(selector)
65
+ return method
66
+ return mark
67
+
68
+
69
+ def native(*, type: Any = None, where: Mapping[str, Any] | None = None) -> Callable[[Callable], Callable]:
70
+ """Handle native records whose ``type`` is ``type`` (one value or several) and whose fields at the dotted ``where``
71
+ paths hold the given values. Of the handlers that match a record, the one with the most conditions takes it."""
72
+ return _handler(None, type, where, None)
73
+
74
+
75
+ def aux(name: str, *, media_type: str = "application/jsonl", type: Any = None,
76
+ where: Mapping[str, Any] | None = None) -> Callable[[Callable], Callable]:
77
+ """Handle records of the aux file ``name``, matched as ``native`` matches; this also declares the file. Aux
78
+ records no handler takes are dropped, since the run stores them anyway."""
79
+ return _handler(name, type, where, media_type)
80
+
81
+
82
+ def finish(method: Callable) -> Callable:
83
+ """Run at task end, after the task's last record: write what's held and reset per-task state."""
84
+ method.__atif_finish__ = True
85
+ return method
86
+
87
+
88
+ @dataclass(frozen=True)
89
+ class AdapterSpec:
90
+ """What ``@atif_adapter`` declares, and its handlers by selector."""
91
+
92
+ name: str
93
+ native_format: str
94
+ version: str
95
+ input_includes_cache: bool | None
96
+ tested_with: tuple[str, ...]
97
+ aux: Mapping[str, str]
98
+ handlers: tuple[tuple[Selector, str], ...]
99
+ finish: str | None
100
+
101
+ def handler(self, aux_name: str | None, record: Any) -> str | None:
102
+ """The method that takes ``record``: the most specific matching handler, None when none matches."""
103
+ matches = [(len(sel.conditions), method) for sel, method in self.handlers
104
+ if sel.aux == aux_name and sel.matches(record)]
105
+ if not matches:
106
+ return None
107
+ best = max(count for count, _ in matches)
108
+ methods = sorted({method for count, method in matches if count == best})
109
+ if len(methods) > 1:
110
+ raise AtifError(f"a record matches {', '.join(methods)} equally; make one of them more specific")
111
+ return methods[0]
112
+
113
+
114
+ def atif_adapter(*, native_format: str, version: str, input_includes_cache: bool | None,
115
+ tested_with: Sequence[str] = (), name: str | None = None) -> Callable[[type[A]], type[A]]:
116
+ """Declare an Adapter subclass for ``native_format``.
117
+
118
+ ``input_includes_cache`` says whether the native input token count already includes cache reads and writes
119
+ (None when the native reports no usage); the builder uses it to write ATIF's ``prompt_tokens``, which include them.
120
+ ``tested_with`` names the native producer versions its recorded fixtures come from."""
121
+ if not isinstance(native_format, str) or not NATIVE_FORMAT.match(native_format):
122
+ raise AtifError(f"native_format {native_format!r} isn't <name>/<version>")
123
+ if native_format.startswith("atif/"):
124
+ raise AtifError(f"native_format {native_format!r}: atif is the format adapters produce, not a native one")
125
+ if not isinstance(version, str) or not version:
126
+ raise AtifError("version is the adapter's own version string")
127
+ if input_includes_cache not in (True, False, None):
128
+ raise AtifError("input_includes_cache is true, false or None")
129
+
130
+ def declare(cls: type[A]) -> type[A]:
131
+ if not (isinstance(cls, type) and issubclass(cls, Adapter)):
132
+ raise TypeError("@atif_adapter decorates an Adapter subclass")
133
+ members: dict[str, Any] = {}
134
+ for klass in reversed(cls.__mro__):
135
+ members.update(vars(klass))
136
+ owners: dict[Selector, str] = {}
137
+ aux_types: dict[str, str] = {}
138
+ finishes = []
139
+ for attr, member in members.items():
140
+ if getattr(member, "__atif_finish__", False):
141
+ finishes.append(attr)
142
+ for selector in getattr(member, "__atif_selectors__", ()):
143
+ if selector in owners and owners[selector] != attr:
144
+ raise AtifError(f"{cls.__name__}.{owners[selector]} and .{attr} take the same records")
145
+ owners[selector] = attr
146
+ if selector.aux is not None:
147
+ known = aux_types.setdefault(selector.aux, selector.media_type)
148
+ if known != selector.media_type:
149
+ raise AtifError(f"aux file {selector.aux!r} is declared as both {known} and "
150
+ f"{selector.media_type}")
151
+ if len(finishes) > 1:
152
+ raise AtifError(f"{cls.__name__} has more than one @finish method: {', '.join(finishes)}")
153
+ cls.spec = AdapterSpec(
154
+ name=name or f"{native_format.split('/', 1)[0]}-atif", native_format=native_format, version=version,
155
+ input_includes_cache=input_includes_cache, tested_with=tuple(tested_with),
156
+ aux=dict(aux_types), handlers=tuple((selector, attr) for selector, attr in owners.items()),
157
+ finish=finishes[0] if finishes else None)
158
+ return cls
159
+ return declare
160
+
161
+
162
+ class Adapter:
163
+ """Base of an ATIF adapter. One instance serves an A2A context across its tasks; per-task state resets in
164
+ ``@finish``."""
165
+
166
+ spec: ClassVar[AdapterSpec]
167
+
168
+ def __init__(self, turn: AtifTurn) -> None:
169
+ """Set up for the context whose first task here is ``turn``."""
170
+
171
+ def unmatched(self, record: Any, turn: AtifTurn) -> None:
172
+ """A native record no handler takes: counted by its type in the root profile, and left to the native copy."""
173
+ turn.unmatched(record)
174
+
175
+ @classmethod
176
+ def from_atif(cls, document: Mapping[str, Any]) -> Native:
177
+ """Any valid ATIF document, with or without ``extra.agentenv``, back to native, on a best-effort basis."""
178
+ raise NotImplementedError(f"{cls.__name__} doesn't convert ATIF back to its native format")