agentenv-framework-protocol 0.1.592__tar.gz → 0.1.593__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 (244) hide show
  1. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/PKG-INFO +1 -1
  2. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/pyproject.toml +1 -1
  3. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/atif/PROFILE.md +43 -0
  4. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/atif/__init__.py +11 -8
  5. agentenv_framework_protocol-0.1.593/src/agentenv_protocol/atif/__main__.py +41 -0
  6. agentenv_framework_protocol-0.1.593/src/agentenv_protocol/atif/kit.py +106 -0
  7. agentenv_framework_protocol-0.1.593/src/agentenv_protocol/atif/validator.py +529 -0
  8. agentenv_framework_protocol-0.1.593/tests/test_atif_kit.py +106 -0
  9. agentenv_framework_protocol-0.1.593/tests/test_atif_validator.py +281 -0
  10. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/.gitignore +0 -0
  11. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/LICENSE +0 -0
  12. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/NOTICE +0 -0
  13. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/README.md +0 -0
  14. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/THIRD_PARTY_NOTICES.md +0 -0
  15. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/examples/__init__.py +0 -0
  16. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/examples/advanced_agent.py +0 -0
  17. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/examples/basic_agent.py +0 -0
  18. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/examples/custom_extensions_agent.py +0 -0
  19. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/examples/multimodal_agent.py +0 -0
  20. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/examples/reference_model.py +0 -0
  21. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/examples/streaming_agent.py +0 -0
  22. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/examples/website/notes/.gitignore +0 -0
  23. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/examples/website/notes/Dockerfile +0 -0
  24. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/examples/website/notes/Dockerfile.dockerignore +0 -0
  25. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/examples/website/notes/README.md +0 -0
  26. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/examples/website/notes/data/seed.json +0 -0
  27. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/examples/website/notes/env.toml +0 -0
  28. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/examples/website/notes/site.py +0 -0
  29. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/examples/website/notes/web/index.html +0 -0
  30. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/examples/website/notes/web/package-lock.json +0 -0
  31. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/examples/website/notes/web/package.json +0 -0
  32. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/examples/website/notes/web/src/main.js +0 -0
  33. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/examples/website/notes/web/src/style.css +0 -0
  34. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/examples/website/notes/web/vite.config.js +0 -0
  35. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/__init__.py +0 -0
  36. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/a2a_agent/__init__.py +0 -0
  37. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/a2a_agent/_trajectory_log.py +0 -0
  38. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/a2a_agent/_triggers.py +0 -0
  39. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/a2a_agent/clock.py +0 -0
  40. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/a2a_agent/control_token.py +0 -0
  41. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/a2a_agent/extensions.py +0 -0
  42. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/a2a_agent/framework.py +0 -0
  43. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/a2a_agent/peer_agents.py +0 -0
  44. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/a2a_agent/proxy.py +0 -0
  45. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/a2a_agent/registry.py +0 -0
  46. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/a2a_agent/staging.py +0 -0
  47. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/a2a_agent/tasks/__init__.py +0 -0
  48. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/a2a_agent/tasks/v1.py +0 -0
  49. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/agent_env_environment.py +0 -0
  50. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/atif/adapter.py +0 -0
  51. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/atif/builder.py +0 -0
  52. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/atif/fixtures/coding.json +0 -0
  53. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/atif/fixtures/coding.stripped.json +0 -0
  54. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/atif/fixtures/computer_use.json +0 -0
  55. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/atif/fixtures/late_result.json +0 -0
  56. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/atif/fixtures/media/482405b002a62efa8516c36709a7a100637507670576fa73a20ad5420d55c66f.png +0 -0
  57. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/atif/fixtures/media/55c64d0fcd6f9d5f7c828093857e3fdfda68478bb4e9bd24d481ef391c7804e8.heic +0 -0
  58. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/atif/fixtures/media/67905ad3cc2dd52b1f5f6a6d2814de0396618b29b4238b9af5207aeb69936e6d.mp4 +0 -0
  59. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/atif/fixtures/media/69a8aa01fe5537076d023dd5e9cc4275b39fc0434aa6483a9f58b66ef2f3c896.png +0 -0
  60. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/atif/fixtures/media/82e60066a2de261b6653bcdda90d1cb9a7af2f474cecd82e8d371e8384d72315.png +0 -0
  61. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/atif/fixtures/media/845e91831319e89c4d656bdb80c278ac09a7230d61e5dfd2e1b1fbb436ac8917.pdf +0 -0
  62. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/atif/fixtures/multi_agent.json +0 -0
  63. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/atif/fixtures/odd_parts.json +0 -0
  64. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/atif/fixtures/subagent.json +0 -0
  65. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/atif/fixtures/two_turns.json +0 -0
  66. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/atif/models/LICENSE +0 -0
  67. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/atif/models/VENDORED.md +0 -0
  68. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/atif/models/__init__.py +0 -0
  69. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/atif/models/agent.py +0 -0
  70. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/atif/models/content.py +0 -0
  71. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/atif/models/final_metrics.py +0 -0
  72. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/atif/models/metrics.py +0 -0
  73. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/atif/models/observation.py +0 -0
  74. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/atif/models/observation_result.py +0 -0
  75. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/atif/models/step.py +0 -0
  76. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/atif/models/subagent_trajectory_ref.py +0 -0
  77. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/atif/models/tool_call.py +0 -0
  78. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/atif/models/trajectory.py +0 -0
  79. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/atif/profile.py +0 -0
  80. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/atif/reader.py +0 -0
  81. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/atif/runner.py +0 -0
  82. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/client.py +0 -0
  83. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/computer/__init__.py +0 -0
  84. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/computer/_declare.py +0 -0
  85. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/computer/_desktop.py +0 -0
  86. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/computer/_job.py +0 -0
  87. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/computer/_linux.py +0 -0
  88. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/computer/_load.py +0 -0
  89. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/computer/_macos.py +0 -0
  90. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/computer/_reaping.py +0 -0
  91. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/computer/_session_posix.py +0 -0
  92. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/computer/_session_windows.py +0 -0
  93. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/computer/_windows.py +0 -0
  94. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/computer/_with_fds.py +0 -0
  95. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/computer/_x11.py +0 -0
  96. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/computer/app.py +0 -0
  97. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/computer/app_data.py +0 -0
  98. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/computer/app_runtime.py +0 -0
  99. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/computer/apps.py +0 -0
  100. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/computer/card.py +0 -0
  101. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/computer/checks.py +0 -0
  102. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/computer/clock.py +0 -0
  103. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/computer/conformance/__init__.py +0 -0
  104. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/computer/conformance/__main__.py +0 -0
  105. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/computer/conformance/checks.py +0 -0
  106. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/computer/conformance/client.py +0 -0
  107. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/computer/conformance/desk.py +0 -0
  108. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/computer/conformance/fixture.py +0 -0
  109. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/computer/conformance/mp4.py +0 -0
  110. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/computer/conformance/page_fixture.py +0 -0
  111. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/computer/conformance/report.py +0 -0
  112. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/computer/conformance/wayland_fixture.py +0 -0
  113. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/computer/dataplane.py +0 -0
  114. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/computer/driver.py +0 -0
  115. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/computer/errors.py +0 -0
  116. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/computer/extensions.py +0 -0
  117. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/computer/frames.py +0 -0
  118. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/computer/keys.py +0 -0
  119. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/computer/launch.py +0 -0
  120. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/computer/manifest.py +0 -0
  121. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/computer/operations.py +0 -0
  122. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/computer/platform.py +0 -0
  123. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/computer/prefix.py +0 -0
  124. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/computer/queue.py +0 -0
  125. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/computer/recording.py +0 -0
  126. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/computer/results.py +0 -0
  127. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/computer/run_install_step.py +0 -0
  128. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/computer/runtime.py +0 -0
  129. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/computer/seed.py +0 -0
  130. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/computer/serve.py +0 -0
  131. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/computer/serve_app.py +0 -0
  132. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/computer/served.py +0 -0
  133. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/computer/session.py +0 -0
  134. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/computer/settings.py +0 -0
  135. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/computer/skill.py +0 -0
  136. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/computer/spaces.py +0 -0
  137. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/computer/svc.py +0 -0
  138. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/computer/tools.py +0 -0
  139. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/errors.py +0 -0
  140. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/manifest.py +0 -0
  141. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/passthrough.py +0 -0
  142. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/preflight.py +0 -0
  143. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/tool_access.py +0 -0
  144. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/tool_client.py +0 -0
  145. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/tool_context.py +0 -0
  146. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/transfers.py +0 -0
  147. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/types.py +0 -0
  148. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/website/__init__.py +0 -0
  149. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/website/clock.py +0 -0
  150. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/website/conformance.py +0 -0
  151. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/website/environment.py +0 -0
  152. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/website/errors.py +0 -0
  153. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/website/forwarding.py +0 -0
  154. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/website/readiness.py +0 -0
  155. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/website/routes.py +0 -0
  156. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/website/session.py +0 -0
  157. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/website_browser/__init__.py +0 -0
  158. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/website_browser/cdp.py +0 -0
  159. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/website_browser/contexts.py +0 -0
  160. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/website_browser/control.py +0 -0
  161. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/website_browser/data.py +0 -0
  162. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/website_browser/devtools.py +0 -0
  163. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/website_browser/environment.py +0 -0
  164. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/website_browser/log.py +0 -0
  165. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/website_browser/network.py +0 -0
  166. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/website_browser/recording.py +0 -0
  167. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/website_browser/scope.py +0 -0
  168. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/website_browser/shapes.py +0 -0
  169. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/src/agentenv_protocol/website_browser/stream.py +0 -0
  170. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/atif_cases.py +0 -0
  171. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/computer_fake.py +0 -0
  172. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/probe_fake.py +0 -0
  173. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_a2a_agent.py +0 -0
  174. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_a2a_agent_clock.py +0 -0
  175. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_a2a_agent_examples.py +0 -0
  176. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_a2a_cdp_config.py +0 -0
  177. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_a2a_object_transfers.py +0 -0
  178. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_a2a_peer_agents.py +0 -0
  179. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_a2a_proxy.py +0 -0
  180. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_a2a_staging.py +0 -0
  181. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_a2a_trajectory_log.py +0 -0
  182. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_agent_env_environment.py +0 -0
  183. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_atif_builder.py +0 -0
  184. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_atif_fixtures.py +0 -0
  185. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_atif_profile.py +0 -0
  186. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_atif_reader.py +0 -0
  187. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_atif_vendored.py +0 -0
  188. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_browser_cdp.py +0 -0
  189. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_browser_contexts.py +0 -0
  190. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_browser_data.py +0 -0
  191. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_browser_log.py +0 -0
  192. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_browser_network.py +0 -0
  193. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_browser_recording.py +0 -0
  194. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_browser_state.py +0 -0
  195. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_client.py +0 -0
  196. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_computer_app_data.py +0 -0
  197. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_computer_app_server.py +0 -0
  198. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_computer_clock.py +0 -0
  199. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_computer_conformance.py +0 -0
  200. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_computer_conformance_attempts.py +0 -0
  201. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_computer_conformance_checks.py +0 -0
  202. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_computer_conformance_page.py +0 -0
  203. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_computer_conformance_recording.py +0 -0
  204. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_computer_dataplane.py +0 -0
  205. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_computer_declare.py +0 -0
  206. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_computer_driver.py +0 -0
  207. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_computer_driver_keys.py +0 -0
  208. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_computer_extensions.py +0 -0
  209. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_computer_frames.py +0 -0
  210. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_computer_macos.py +0 -0
  211. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_computer_page.py +0 -0
  212. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_computer_queue.py +0 -0
  213. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_computer_recording.py +0 -0
  214. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_computer_seed.py +0 -0
  215. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_computer_serve.py +0 -0
  216. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_computer_served.py +0 -0
  217. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_computer_session_windows.py +0 -0
  218. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_computer_spaces.py +0 -0
  219. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_computer_svc_forward.py +0 -0
  220. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_computer_tool_prefix.py +0 -0
  221. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_computer_windows_driver.py +0 -0
  222. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_control_token.py +0 -0
  223. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_data_objects.py +0 -0
  224. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_devtools_pipe.py +0 -0
  225. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_errors.py +0 -0
  226. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_extension_methods.py +0 -0
  227. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_intake.py +0 -0
  228. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_manifest.py +0 -0
  229. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_preflight.py +0 -0
  230. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_tool_access.py +0 -0
  231. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_tool_annotations.py +0 -0
  232. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_tool_client.py +0 -0
  233. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_tool_context.py +0 -0
  234. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_tool_context_fastmcp.py +0 -0
  235. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_tool_context_injection.py +0 -0
  236. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_website_api.py +0 -0
  237. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_website_browser.py +0 -0
  238. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_website_conformance.py +0 -0
  239. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_website_environment.py +0 -0
  240. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_website_forwarding.py +0 -0
  241. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_website_live.py +0 -0
  242. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_website_mcp.py +0 -0
  243. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/tests/test_website_notes_example.py +0 -0
  244. {agentenv_framework_protocol-0.1.592 → agentenv_framework_protocol-0.1.593}/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.592
3
+ Version: 0.1.593
4
4
  Summary: Open data-plane protocol and server SDK for agent environments.
5
5
  Project-URL: Homepage, https://www.agentenvframework.com
6
6
  Project-URL: Documentation, https://www.agentenvframework.com/docs
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "agentenv-framework-protocol"
3
- version = "0.1.592"
3
+ version = "0.1.593"
4
4
  description = "Open data-plane protocol and server SDK for agent environments."
5
5
  readme = "README.md"
6
6
  license = "Apache-2.0"
@@ -146,6 +146,49 @@ field added in a later minor names the version it arrived in. Proposed for a lat
146
146
  `input_includes_cache` on the root and `cost_status` (`reported`, `priced` or `unpriced`), with the usage
147
147
  cross-check that reads them; per-part origins, when a reader needs them; and an always-on harness's fields.
148
148
 
149
+ ## Validator
150
+
151
+ `validate(document)` returns findings, each with a rule id below, a severity and where in the document it is. It holds a
152
+ producer's output to profile 1.0. `reader=True` checks someone else's document for reading instead: what a producer
153
+ must not write only warns, and the document fails only where agentenv couldn't read it. `media` is the folder the
154
+ document's media paths are relative to, the one holding `media/`, or the files by path; without it only the paths' form
155
+ is checked. `validate_live(pages, final)` checks what a live reader was served, page by page, with the final read. A sub-agent's task is its spawning call's, found through the references, so an embedded sub-agent that no served step references isn't held to `live-unanswered`. On
156
+ the command line: `python -m agentenv_protocol.atif validate FILE [--media DIR] [--reader]`, which prints each finding
157
+ and exits 1 when one is an error.
158
+
159
+ | Rule | Holds | Producer | Reader |
160
+ | --- | --- | --- | --- |
161
+ | `json` | The document is a JSON object: UTF-8, with no NaN or infinity | error | error |
162
+ | `atif` | ATIF's own models, vendored from Harbor, accept it | error | error |
163
+ | `profile` | Each `extra.agentenv` parses with its profile model | error | error |
164
+ | `profile-key` | Each `extra.agentenv` holds only the fields profile 1.0 defines | error | warning |
165
+ | `profile-version` | The root's `extra.agentenv.version`, when given, is `1.0` | error | warning |
166
+ | `vocabulary` | A vocabulary field holds one of its values | error | warning |
167
+ | `outside-key` | No `extra` holds a key outside `agentenv` but `ToolCall.extra.raw_arguments` | error | warning |
168
+ | `call-id` | Each `tool_call_id` is unique across the document and its sub-agents | error | warning |
169
+ | `reference` | Each `subagent_trajectory_ref` names an embedded sub-agent by `trajectory_id` | error | warning |
170
+ | `totals` | A `final_metrics` total equals the sum over the model steps of the root and its embedded sub-agents, when every one has the count | error | warning |
171
+ | `total-steps` | `final_metrics.total_steps` counts the root's steps, or the root's `notes` explain the difference | error | warning |
172
+ | `usage` | A step's cache reads and writes fit within its `prompt_tokens` | error | warning |
173
+ | `media-path` | A media path is `media/<sha256>.<ext>` | error | warning |
174
+ | `media-bytes` | Given the media, each file the document names exists, with the sha256 its name and profile give and the profile's size | error | error |
175
+ | `timestamp` | A timestamp is UTC in the builder's form: `YYYY-MM-DDTHH:MM:SSZ`, with no, 3 or 6 fractional digits | error | not checked |
176
+ | `harbor-save` | Harbor's `to_json_dict` gives the document back unchanged | error | warning |
177
+ | `text-message` | A step message whose parts are all text is one string | error | warning |
178
+ | `live-prefix` | Every live page is a prefix of the next page and of the final read | error | not checked |
179
+ | `live-unanswered` | No live page serves a step with an unanswered call before its task ends | error | not checked |
180
+
181
+ The adapter kit, `check_adapter(adapter, recorded, expected=, from_atif=)`, is for an agent's CI. It runs an adapter
182
+ over a context's recorded tasks as the SDK runs it live, applies the live rule after every record and the validator to
183
+ the final document, and adds its own rules. `kit-from-atif` only warns when the adapter has no `from_atif`.
184
+
185
+ | Rule | Holds | Severity |
186
+ | --- | --- | --- |
187
+ | `kit-run` | The adapter takes every recorded record without raising | error |
188
+ | `kit-expected` | The document equals the checked-in expected document | error |
189
+ | `kit-unmatched` | Every native record has a handler; one that none takes is only counted | warning |
190
+ | `kit-from-atif` | `from_atif` turns a document without the profile into a native log | error |
191
+
149
192
  ## Fixtures
150
193
 
151
194
  `fixtures/` holds the profile's canonical examples, built through the adapter framework from a toy format's records:
@@ -44,16 +44,19 @@ from .profile import (
44
44
  profile_of,
45
45
  read_profile,
46
46
  )
47
+ from .kit import KIT_RULES, KitResult, check_adapter
47
48
  from .reader import Task, check, is_prefix, load, media_paths, strip_profile, tasks
48
49
  from .runner import AdapterRun, Fed, RecordedTask, replay
50
+ from .validator import RULES, Finding, Rule, errors_in, validate, validate_live
49
51
 
50
52
  __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",
53
+ "Adapter", "AdapterRef", "AdapterRun", "AdapterSpec", "Agent", "AgentProfile", "Arrival", "atif_adapter",
54
+ "AtifError", "AtifTurn", "AudioSource", "aux", "check", "check_adapter", "ContentPart", "Document", "dump_profile",
55
+ "errors_in", "Fed", "FinalMetrics", "FinalMetricsProfile", "Finding", "finish", "FORMAT", "ImageSource",
56
+ "is_prefix", "KIT_RULES", "KitResult", "load", "Media", "media_paths", "MediaInfo", "Metrics", "MetricsProfile",
57
+ "Native", "native", "Observation", "ObservationResult", "ObservationResultProfile", "PROFILE_KEY", "profile_of",
58
+ "PROFILE_VERSION", "PROFILES", "RAW_ARGUMENTS", "read_profile", "ReasoningBlock", "RecordedTask", "replay", "Rule",
59
+ "RULES", "SCHEMA_VERSION", "Selector", "Step", "StepError", "StepProfile", "strip_profile", "SubagentTrajectoryRef",
60
+ "SubagentTrajectoryRefProfile", "Task", "tasks", "timestamp", "ToolCall", "ToolCallProfile", "Trajectory",
61
+ "TrajectoryProfile", "TurnContext", "validate", "validate_live", "VOCABULARIES",
59
62
  ]
@@ -0,0 +1,41 @@
1
+ """``python -m agentenv_protocol.atif validate FILE [--media DIR] [--reader]``: check an ATIF document, printing each
2
+ finding; exit 1 when any is an error, 2 when the file can't be read."""
3
+ from __future__ import annotations
4
+
5
+ import argparse
6
+ import sys
7
+ from pathlib import Path
8
+ from typing import Sequence
9
+
10
+ from .validator import errors_in, parse, validate
11
+
12
+
13
+ def main(argv: Sequence[str] | None = None) -> int:
14
+ parser = argparse.ArgumentParser(prog="python -m agentenv_protocol.atif",
15
+ description="Check ATIF documents against ATIF and the agentenv profile.")
16
+ commands = parser.add_subparsers(dest="command", required=True)
17
+ check = commands.add_parser("validate", help="check one document; exit 1 when it has an error")
18
+ check.add_argument("file", type=Path, help="the trajectory.json to check")
19
+ check.add_argument("--media", type=Path, metavar="DIR",
20
+ help="the folder the document's media paths are relative to, which holds media/; "
21
+ "given, each file is checked against its name and profile")
22
+ check.add_argument("--reader", action="store_true",
23
+ help="check someone else's document for reading: what a producer must not write warns")
24
+ args = parser.parse_args(argv)
25
+ try:
26
+ document, findings = parse(args.file)
27
+ except OSError as exc:
28
+ print(f"can't read {args.file}: {exc.strerror or exc}", file=sys.stderr)
29
+ return 2
30
+ if not findings:
31
+ findings = validate(document, reader=args.reader, media=args.media)
32
+ for finding in findings:
33
+ print(finding)
34
+ failed = errors_in(findings)
35
+ print(f"{args.file}: {'invalid' if failed else 'valid'}, {len(failed)} errors, "
36
+ f"{len(findings) - len(failed)} warnings")
37
+ return 1 if failed else 0
38
+
39
+
40
+ if __name__ == "__main__":
41
+ sys.exit(main())
@@ -0,0 +1,106 @@
1
+ """The adapter kit, for an agent's CI: run an adapter over recorded tasks, as the SDK runs it live, and check what it
2
+ writes. The live rule holds after every record, the final document passes the validator as a producer's, it equals
3
+ the checked-in document when one is given, and ``from_atif`` turns ATIF without the profile back into a native log."""
4
+ from __future__ import annotations
5
+
6
+ import json
7
+ from dataclasses import dataclass, field
8
+ from pathlib import Path
9
+ from typing import Any, Mapping, Sequence
10
+
11
+ from .adapter import Adapter, Native
12
+ from .profile import profile_of
13
+ from .reader import strip_profile
14
+ from .runner import AdapterRun, RecordedTask
15
+ from .validator import ERROR, WARNING, Finding, Rule, _difference, errors_in, validate_live
16
+
17
+ KIT_RULES: dict[str, Rule] = {rule.id: rule for rule in (
18
+ Rule("kit-run", ERROR, None, "The adapter takes every recorded record without raising"),
19
+ Rule("kit-expected", ERROR, None, "The document equals the checked-in expected document"),
20
+ Rule("kit-unmatched", WARNING, None, "Every native record has a handler; one that none takes is only counted"),
21
+ Rule("kit-from-atif", ERROR, None, "`from_atif` turns a document without the profile into a native log"),
22
+ )}
23
+
24
+
25
+ @dataclass
26
+ class KitResult:
27
+ """What the kit found, with the document and every live page the adapter's run served."""
28
+
29
+ document: dict[str, Any] | None
30
+ pages: list[dict[str, Any] | None] = field(default_factory=list)
31
+ media: dict[str, bytes] = field(default_factory=dict)
32
+ findings: list[Finding] = field(default_factory=list)
33
+
34
+ @property
35
+ def errors(self) -> list[Finding]:
36
+ return errors_in(self.findings)
37
+
38
+ def raise_for_errors(self) -> None:
39
+ """Raise AssertionError listing every finding when any is an error."""
40
+ if self.errors:
41
+ raise AssertionError("the adapter kit found:\n" + "\n".join(str(f) for f in self.findings))
42
+
43
+
44
+ def check_adapter(adapter: type[Adapter], recorded: Sequence[RecordedTask], *,
45
+ expected: Mapping[str, Any] | Path | None = None,
46
+ from_atif: Sequence[Mapping[str, Any]] | None = None,
47
+ media: Mapping[str, bytes] | None = None) -> KitResult:
48
+ """Run ``adapter`` over ``recorded``, one A2A context's tasks in order, and check it. ``expected`` is the document
49
+ the run should write, or the file holding it. ``from_atif`` are the documents its ``from_atif`` is tried on; by
50
+ default, the run's own document with the profile stripped. ``media`` holds, by path, the files of any Media in the
51
+ recorded tasks' inbound or final content; the adapter's own media come from the run."""
52
+ run = AdapterRun(adapter)
53
+ result = KitResult(document=None)
54
+ where = ""
55
+ try:
56
+ for t, task in enumerate(recorded):
57
+ where = f"task {t}, its start"
58
+ run.start_task(task.context)
59
+ result.pages.append(run.page())
60
+ for r, fed in enumerate(task.records):
61
+ where = f"task {t}, record {r}" + (f" of aux {fed.aux!r}" if fed.aux is not None else "")
62
+ if fed.aux is None:
63
+ run.native(fed.record)
64
+ else:
65
+ run.aux(fed.aux, fed.record)
66
+ result.pages.append(run.page())
67
+ where = f"task {t}, its end"
68
+ run.end_task(state=task.state, final=task.final, ended_at=task.ended_at)
69
+ result.pages.append(run.page())
70
+ except Exception as exc:
71
+ result.findings.append(Finding("kit-run", ERROR, where, f"{type(exc).__name__}: {exc}"))
72
+ return result
73
+ result.document = run.document()
74
+ result.media = {**(media or {}), **run.media_files}
75
+ if result.document is None:
76
+ result.findings.append(Finding("kit-run", ERROR, "", "the run wrote no step"))
77
+ return result
78
+ result.findings.extend(validate_live(result.pages, result.document, media=result.media))
79
+ unmatched = profile_of(result.document).get("unmatched")
80
+ if unmatched:
81
+ counts = ", ".join(f"{kind} ({count})" for kind, count in sorted(unmatched.items()))
82
+ result.findings.append(Finding("kit-unmatched", WARNING, "extra.agentenv.unmatched",
83
+ f"no handler takes these native records: {counts}"))
84
+ if expected is not None:
85
+ want = json.loads(expected.read_text(encoding="utf-8")) if isinstance(expected, Path) else expected
86
+ if result.document != want:
87
+ result.findings.append(Finding("kit-expected", ERROR, _difference(want, result.document),
88
+ "the document differs from the expected one here"))
89
+ for index, document in enumerate(from_atif if from_atif is not None else [strip_profile(result.document)]):
90
+ _from_atif(adapter, document, index, result)
91
+ return result
92
+
93
+
94
+ def _from_atif(adapter: type[Adapter], document: Mapping[str, Any], index: int, result: KitResult) -> None:
95
+ where = f"from_atif document {index}"
96
+ try:
97
+ native = adapter.from_atif(document)
98
+ except NotImplementedError as exc:
99
+ result.findings.append(Finding("kit-from-atif", WARNING, where, str(exc)))
100
+ return
101
+ except Exception as exc:
102
+ result.findings.append(Finding("kit-from-atif", ERROR, where, f"raised {type(exc).__name__}: {exc}"))
103
+ return
104
+ if not isinstance(native, Native) or not isinstance(native.log, list):
105
+ result.findings.append(Finding("kit-from-atif", ERROR, where,
106
+ f"returned {type(native).__name__}, not a Native holding a list log"))