agentenv-framework-protocol 0.1.652__tar.gz → 0.1.655__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 (263) hide show
  1. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/PKG-INFO +6 -2
  2. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/README.md +5 -1
  3. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/pyproject.toml +1 -1
  4. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/atif/PROFILE.md +33 -15
  5. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/atif/__init__.py +6 -2
  6. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/atif/builder.py +29 -0
  7. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/atif/fixtures/coding.json +1 -1
  8. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/atif/fixtures/computer_use.json +1 -1
  9. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/atif/fixtures/late_result.json +1 -1
  10. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/atif/fixtures/multi_agent.json +1 -1
  11. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/atif/fixtures/odd_parts.json +1 -1
  12. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/atif/fixtures/subagent.json +1 -1
  13. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/atif/fixtures/two_turns.json +1 -1
  14. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/atif/profile.py +16 -1
  15. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/atif/validator.py +30 -6
  16. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/client.py +22 -3
  17. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_atif_builder.py +43 -0
  18. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_atif_validator.py +24 -0
  19. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_control_token.py +18 -0
  20. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/.gitignore +0 -0
  21. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/LICENSE +0 -0
  22. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/NOTICE +0 -0
  23. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/THIRD_PARTY_NOTICES.md +0 -0
  24. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/examples/__init__.py +0 -0
  25. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/examples/advanced_agent.py +0 -0
  26. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/examples/basic_agent.py +0 -0
  27. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/examples/custom_extensions_agent.py +0 -0
  28. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/examples/multimodal_agent.py +0 -0
  29. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/examples/reference_model.py +0 -0
  30. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/examples/streaming_agent.py +0 -0
  31. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/examples/website/notes/.gitignore +0 -0
  32. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/examples/website/notes/Dockerfile +0 -0
  33. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/examples/website/notes/Dockerfile.dockerignore +0 -0
  34. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/examples/website/notes/README.md +0 -0
  35. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/examples/website/notes/data/seed.json +0 -0
  36. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/examples/website/notes/env.toml +0 -0
  37. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/examples/website/notes/site.py +0 -0
  38. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/examples/website/notes/web/index.html +0 -0
  39. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/examples/website/notes/web/package-lock.json +0 -0
  40. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/examples/website/notes/web/package.json +0 -0
  41. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/examples/website/notes/web/src/main.js +0 -0
  42. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/examples/website/notes/web/src/style.css +0 -0
  43. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/examples/website/notes/web/vite.config.js +0 -0
  44. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/__init__.py +0 -0
  45. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/a2a_agent/__init__.py +0 -0
  46. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/a2a_agent/_atif_copy.py +0 -0
  47. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/a2a_agent/_media_spool.py +0 -0
  48. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/a2a_agent/_secrets.py +0 -0
  49. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/a2a_agent/_snapshot_state.py +0 -0
  50. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/a2a_agent/_trajectory_log.py +0 -0
  51. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/a2a_agent/_triggers.py +0 -0
  52. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/a2a_agent/_turn_index.py +0 -0
  53. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/a2a_agent/clock.py +0 -0
  54. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/a2a_agent/control_token.py +0 -0
  55. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/a2a_agent/extensions.py +0 -0
  56. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/a2a_agent/framework.py +0 -0
  57. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/a2a_agent/peer_agents.py +0 -0
  58. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/a2a_agent/proxy.py +0 -0
  59. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/a2a_agent/registry.py +0 -0
  60. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/a2a_agent/staging.py +0 -0
  61. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/a2a_agent/tasks/__init__.py +0 -0
  62. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/a2a_agent/tasks/v1.py +0 -0
  63. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/agent_env_environment.py +0 -0
  64. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/atif/__main__.py +0 -0
  65. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/atif/_image_size.py +0 -0
  66. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/atif/adapter.py +0 -0
  67. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/atif/fixtures/coding.stripped.json +0 -0
  68. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/atif/fixtures/media/482405b002a62efa8516c36709a7a100637507670576fa73a20ad5420d55c66f.png +0 -0
  69. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/atif/fixtures/media/55c64d0fcd6f9d5f7c828093857e3fdfda68478bb4e9bd24d481ef391c7804e8.heic +0 -0
  70. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/atif/fixtures/media/67905ad3cc2dd52b1f5f6a6d2814de0396618b29b4238b9af5207aeb69936e6d.mp4 +0 -0
  71. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/atif/fixtures/media/69a8aa01fe5537076d023dd5e9cc4275b39fc0434aa6483a9f58b66ef2f3c896.png +0 -0
  72. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/atif/fixtures/media/82e60066a2de261b6653bcdda90d1cb9a7af2f474cecd82e8d371e8384d72315.png +0 -0
  73. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/atif/fixtures/media/845e91831319e89c4d656bdb80c278ac09a7230d61e5dfd2e1b1fbb436ac8917.pdf +0 -0
  74. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/atif/kit.py +0 -0
  75. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/atif/models/LICENSE +0 -0
  76. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/atif/models/VENDORED.md +0 -0
  77. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/atif/models/__init__.py +0 -0
  78. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/atif/models/agent.py +0 -0
  79. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/atif/models/content.py +0 -0
  80. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/atif/models/final_metrics.py +0 -0
  81. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/atif/models/metrics.py +0 -0
  82. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/atif/models/observation.py +0 -0
  83. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/atif/models/observation_result.py +0 -0
  84. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/atif/models/step.py +0 -0
  85. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/atif/models/subagent_trajectory_ref.py +0 -0
  86. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/atif/models/tool_call.py +0 -0
  87. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/atif/models/trajectory.py +0 -0
  88. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/atif/reader.py +0 -0
  89. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/atif/runner.py +0 -0
  90. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/atif/served.py +0 -0
  91. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/computer/__init__.py +0 -0
  92. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/computer/_declare.py +0 -0
  93. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/computer/_desktop.py +0 -0
  94. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/computer/_job.py +0 -0
  95. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/computer/_linux.py +0 -0
  96. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/computer/_load.py +0 -0
  97. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/computer/_macos.py +0 -0
  98. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/computer/_reaping.py +0 -0
  99. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/computer/_session_posix.py +0 -0
  100. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/computer/_session_windows.py +0 -0
  101. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/computer/_windows.py +0 -0
  102. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/computer/_with_fds.py +0 -0
  103. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/computer/_x11.py +0 -0
  104. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/computer/annotate.py +0 -0
  105. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/computer/app.py +0 -0
  106. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/computer/app_data.py +0 -0
  107. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/computer/app_runtime.py +0 -0
  108. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/computer/apps.py +0 -0
  109. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/computer/card.py +0 -0
  110. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/computer/checks.py +0 -0
  111. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/computer/clock.py +0 -0
  112. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/computer/conformance/__init__.py +0 -0
  113. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/computer/conformance/__main__.py +0 -0
  114. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/computer/conformance/checks.py +0 -0
  115. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/computer/conformance/client.py +0 -0
  116. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/computer/conformance/desk.py +0 -0
  117. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/computer/conformance/fixture.py +0 -0
  118. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/computer/conformance/mp4.py +0 -0
  119. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/computer/conformance/page_fixture.py +0 -0
  120. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/computer/conformance/report.py +0 -0
  121. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/computer/conformance/wayland_fixture.py +0 -0
  122. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/computer/dataplane.py +0 -0
  123. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/computer/driver.py +0 -0
  124. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/computer/errors.py +0 -0
  125. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/computer/extensions.py +0 -0
  126. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/computer/frames.py +0 -0
  127. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/computer/keys.py +0 -0
  128. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/computer/launch.py +0 -0
  129. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/computer/manifest.py +0 -0
  130. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/computer/operations.py +0 -0
  131. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/computer/platform.py +0 -0
  132. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/computer/prefix.py +0 -0
  133. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/computer/queue.py +0 -0
  134. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/computer/recording.py +0 -0
  135. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/computer/results.py +0 -0
  136. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/computer/run_install_step.py +0 -0
  137. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/computer/runtime.py +0 -0
  138. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/computer/seed.py +0 -0
  139. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/computer/serve.py +0 -0
  140. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/computer/serve_app.py +0 -0
  141. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/computer/served.py +0 -0
  142. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/computer/session.py +0 -0
  143. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/computer/settings.py +0 -0
  144. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/computer/skill.py +0 -0
  145. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/computer/spaces.py +0 -0
  146. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/computer/svc.py +0 -0
  147. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/computer/tools.py +0 -0
  148. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/errors.py +0 -0
  149. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/manifest.py +0 -0
  150. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/passthrough.py +0 -0
  151. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/preflight.py +0 -0
  152. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/tool_access.py +0 -0
  153. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/tool_client.py +0 -0
  154. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/tool_context.py +0 -0
  155. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/transfers.py +0 -0
  156. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/types.py +0 -0
  157. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/website/__init__.py +0 -0
  158. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/website/clock.py +0 -0
  159. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/website/conformance.py +0 -0
  160. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/website/environment.py +0 -0
  161. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/website/errors.py +0 -0
  162. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/website/forwarding.py +0 -0
  163. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/website/readiness.py +0 -0
  164. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/website/routes.py +0 -0
  165. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/website/session.py +0 -0
  166. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/website_browser/__init__.py +0 -0
  167. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/website_browser/cdp.py +0 -0
  168. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/website_browser/contexts.py +0 -0
  169. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/website_browser/control.py +0 -0
  170. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/website_browser/data.py +0 -0
  171. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/website_browser/devtools.py +0 -0
  172. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/website_browser/environment.py +0 -0
  173. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/website_browser/log.py +0 -0
  174. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/website_browser/network.py +0 -0
  175. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/website_browser/recording.py +0 -0
  176. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/website_browser/scope.py +0 -0
  177. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/website_browser/shapes.py +0 -0
  178. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/src/agentenv_protocol/website_browser/stream.py +0 -0
  179. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/atif_cases.py +0 -0
  180. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/computer_fake.py +0 -0
  181. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/conftest.py +0 -0
  182. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/probe_fake.py +0 -0
  183. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_a2a_agent.py +0 -0
  184. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_a2a_agent_clock.py +0 -0
  185. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_a2a_agent_examples.py +0 -0
  186. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_a2a_atif_media.py +0 -0
  187. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_a2a_atif_prescribe.py +0 -0
  188. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_a2a_atif_scrubbing.py +0 -0
  189. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_a2a_atif_serving.py +0 -0
  190. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_a2a_atif_turns.py +0 -0
  191. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_a2a_cdp_config.py +0 -0
  192. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_a2a_object_transfers.py +0 -0
  193. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_a2a_peer_agents.py +0 -0
  194. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_a2a_proxy.py +0 -0
  195. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_a2a_staging.py +0 -0
  196. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_a2a_trajectory_log.py +0 -0
  197. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_agent_env_environment.py +0 -0
  198. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_atif_fixtures.py +0 -0
  199. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_atif_kit.py +0 -0
  200. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_atif_profile.py +0 -0
  201. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_atif_reader.py +0 -0
  202. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_atif_vendored.py +0 -0
  203. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_browser_cdp.py +0 -0
  204. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_browser_contexts.py +0 -0
  205. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_browser_data.py +0 -0
  206. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_browser_log.py +0 -0
  207. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_browser_network.py +0 -0
  208. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_browser_recording.py +0 -0
  209. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_browser_state.py +0 -0
  210. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_client.py +0 -0
  211. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_computer_app_data.py +0 -0
  212. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_computer_app_server.py +0 -0
  213. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_computer_clock.py +0 -0
  214. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_computer_conformance.py +0 -0
  215. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_computer_conformance_attempts.py +0 -0
  216. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_computer_conformance_checks.py +0 -0
  217. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_computer_conformance_page.py +0 -0
  218. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_computer_conformance_recording.py +0 -0
  219. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_computer_dataplane.py +0 -0
  220. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_computer_declare.py +0 -0
  221. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_computer_driver.py +0 -0
  222. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_computer_driver_keys.py +0 -0
  223. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_computer_extensions.py +0 -0
  224. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_computer_frames.py +0 -0
  225. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_computer_macos.py +0 -0
  226. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_computer_page.py +0 -0
  227. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_computer_queue.py +0 -0
  228. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_computer_recording.py +0 -0
  229. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_computer_recording_annotate.py +0 -0
  230. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_computer_screenshot_delay.py +0 -0
  231. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_computer_seed.py +0 -0
  232. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_computer_serve.py +0 -0
  233. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_computer_served.py +0 -0
  234. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_computer_session_windows.py +0 -0
  235. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_computer_spaces.py +0 -0
  236. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_computer_svc_forward.py +0 -0
  237. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_computer_tool_prefix.py +0 -0
  238. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_computer_windows_driver.py +0 -0
  239. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_data_objects.py +0 -0
  240. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_devtools_pipe.py +0 -0
  241. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_errors.py +0 -0
  242. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_extension_methods.py +0 -0
  243. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_intake.py +0 -0
  244. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_manifest.py +0 -0
  245. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_preflight.py +0 -0
  246. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_tool_access.py +0 -0
  247. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_tool_annotations.py +0 -0
  248. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_tool_client.py +0 -0
  249. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_tool_context.py +0 -0
  250. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_tool_context_fastmcp.py +0 -0
  251. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_tool_context_injection.py +0 -0
  252. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_tool_defers.py +0 -0
  253. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_usage.py +0 -0
  254. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_usage_models.py +0 -0
  255. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_website_api.py +0 -0
  256. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_website_browser.py +0 -0
  257. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_website_conformance.py +0 -0
  258. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_website_environment.py +0 -0
  259. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_website_forwarding.py +0 -0
  260. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_website_live.py +0 -0
  261. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_website_mcp.py +0 -0
  262. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/tests/test_website_notes_example.py +0 -0
  263. {agentenv_framework_protocol-0.1.652 → agentenv_framework_protocol-0.1.655}/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.652
3
+ Version: 0.1.655
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
@@ -1437,7 +1437,11 @@ the profile's spec, and `fixtures/` holds its canonical examples. The package ne
1437
1437
  with the cache included, stores media at `media/<sha256>.<ext>`, embeds sub-agents and normalizes timestamps. A
1438
1438
  record no method takes is counted in the root profile. `turn.tool_definitions([...], agent=None)` writes the tools
1439
1439
  the model was offered, in OpenAI's function form, to a trajectory's `agent.tool_definitions`; a later call adds
1440
- tools and replaces those of the same name.
1440
+ tools and replaces those of the same name. A message the harness itself put in the conversation, such as a
1441
+ command's output, is `turn.system_message(text=...)`, a `source: system` step of its own. A compaction, a summary
1442
+ that replaced the conversation in what the agent sees, is the message of the step of the call that wrote it,
1443
+ marked by `turn.compaction(step=..., written_by="assistant" | "harness", trigger="manual" | "auto")`, its usage
1444
+ that call's (profile 1.1).
1441
1445
  - **The runner** (`AdapterRun`, `replay`) feeds one A2A context's records through one adapter instance, a task at a
1442
1446
  time. It writes each task's user step from its `TurnContext`, and the final response once, with the task's
1443
1447
  terminal state on its last step. Its `page()` is the live view, built when it's read: closed steps only, so a
@@ -1366,7 +1366,11 @@ the profile's spec, and `fixtures/` holds its canonical examples. The package ne
1366
1366
  with the cache included, stores media at `media/<sha256>.<ext>`, embeds sub-agents and normalizes timestamps. A
1367
1367
  record no method takes is counted in the root profile. `turn.tool_definitions([...], agent=None)` writes the tools
1368
1368
  the model was offered, in OpenAI's function form, to a trajectory's `agent.tool_definitions`; a later call adds
1369
- tools and replaces those of the same name.
1369
+ tools and replaces those of the same name. A message the harness itself put in the conversation, such as a
1370
+ command's output, is `turn.system_message(text=...)`, a `source: system` step of its own. A compaction, a summary
1371
+ that replaced the conversation in what the agent sees, is the message of the step of the call that wrote it,
1372
+ marked by `turn.compaction(step=..., written_by="assistant" | "harness", trigger="manual" | "auto")`, its usage
1373
+ that call's (profile 1.1).
1370
1374
  - **The runner** (`AdapterRun`, `replay`) feeds one A2A context's records through one adapter instance, a task at a
1371
1375
  time. It writes each task's user step from its `TurnContext`, and the final response once, with the task's
1372
1376
  terminal state on its last step. Its `page()` is the live view, built when it's read: closed steps only, so a
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "agentenv-framework-protocol"
3
- version = "0.1.652"
3
+ version = "0.1.655"
4
4
  description = "Open data-plane protocol and server SDK for agent environments."
5
5
  readme = "README.md"
6
6
  license = "Apache-2.0"
@@ -1,6 +1,6 @@
1
1
  # The agentenv profile of ATIF
2
2
 
3
- Profile 1.0. agentenv records what an agent did as an ATIF v1.8 document: Harbor's
3
+ Profile 1.1. agentenv records what an agent did as an ATIF v1.8 document: Harbor's
4
4
  [Agent Trajectory Interchange Format](https://github.com/harbor-framework/harbor/blob/main/rfcs/0001-trajectory-format.md),
5
5
  whose models are vendored in `models/`. An agent serves it as format `atif/1`, beside its native log. What ATIF has no
6
6
  typed field for, agentenv adds under `extra.agentenv` on the objects that have an `extra`. This file is the profile's spec.
@@ -36,7 +36,7 @@ to native exactly.
36
36
  call's result by `subagent_trajectory_ref`. It belongs to the task of the call that spawned it. A sub-agent that
37
37
  wrote no step is left out, and so is the reference to it. A spawning call with no result when its task ends gets
38
38
  one, with no content and `status: canceled`, so its sub-agent stays referenced.
39
- - `schema_version` is the oldest ATIF version that holds the document's fields: `ATIF-v1.8` for profile 1.0.
39
+ - `schema_version` is the oldest ATIF version that holds the document's fields: `ATIF-v1.8` for profile 1.1.
40
40
  - Format id: `atif/1`. The profile's own version is the root's `extra.agentenv.version`.
41
41
 
42
42
  ## Steps
@@ -44,6 +44,12 @@ to native exactly.
44
44
  - A step is one model response, keyed by its native id (a message id), or a step with no model call
45
45
  (`llm_call_count` 0, no metrics or reasoning). A step closes when the next step of its trajectory starts, or when its
46
46
  task ends.
47
+ - A `source: system` step is a message the harness itself put in the conversation, such as a command's output: neither
48
+ the agent's words nor the user's. A reader that stages a turn for a judge shows it as a note. (1.1)
49
+ - A compaction is when the harness replaces the conversation so far with a summary, in what the agent sees from then
50
+ on. The summary is the message of the step of the model call that wrote it: a `source: agent` step carrying that
51
+ call's metrics, its profile's `compaction` saying who wrote it and what set it off. A reader that stages a turn for a
52
+ judge shows it as a note, not as the agent speaking. (1.1)
47
53
  - A result always sits in the step that made its call, as ATIF requires. One that arrives after that step closed records
48
54
  when, in `arrived`.
49
55
  - A live reader is served closed steps only, each trajectory up to its first step still waiting on a result or
@@ -117,7 +123,7 @@ One vocabulary, in three places:
117
123
 
118
124
  | Object | Field | Meaning | Read by |
119
125
  | --- | --- | --- | --- |
120
- | Trajectory | `version` | The profile version: `1.0` | every reader |
126
+ | Trajectory | `version` | The profile version: `1.1` | every reader |
121
127
  | Trajectory | `native_format` | The native format id the copy was built from | the worker that stores copies; renormalizing |
122
128
  | Trajectory | `adapter` | The adapter's `name` and `version` | the worker that stores copies; renormalizing |
123
129
  | Trajectory | `unmatched` | Native records no method took, counted by type | the adapter kit |
@@ -126,6 +132,7 @@ One vocabulary, in three places:
126
132
  | Step | `attempt` | The harness attempt the step belongs to; absent means 1 | the explorer |
127
133
  | Step | `error` | A step-level error: `kind`, `message`, `code` | the explorer |
128
134
  | Step | `data` | On a task's last step: its final response's diagnostic DataParts, in order, each `data` and its `metadata` | the explorer |
135
+ | Step | `compaction` | On a compaction's step: who wrote the summary (`written_by`) and what set it off (`trigger`). (1.1) | judges' turn events |
129
136
  | Step | `reasoning` | Each reasoning block: `chars`, `visibility`, `signature`, `data` | resuming a session; RL replay |
130
137
  | Step | `media` | Details of the media the message names, by path | media transfer; the explorer |
131
138
  | ObservationResult | `status` | The result's status; absent means `ok` | the explorer, judges' turn events |
@@ -137,12 +144,13 @@ One vocabulary, in three places:
137
144
  | FinalMetrics | `cost_source` | Where `total_cost_usd` came from | the run's usage and cost result |
138
145
  | FinalMetrics | `total_cache_write_tokens` | Cache writes summed over the steps | the run's usage and cost result |
139
146
 
140
- A media entry (MediaInfo) holds `sha256`, `bytes`, and, where they apply, `width`, `height`, `duration_ms`, `pages`
141
- and `name`, plus `media_type` for media ATIF has no part type for. A reasoning block (ReasoningBlock) holds `chars`,
142
- its share of `reasoning_content` (0 when the provider withheld the text), its `visibility`, the provider's `signature`,
143
- and a redacted block's ciphertext as `data`, byte for byte. A step error (StepError) holds `kind`, `message` and `code`.
144
- An arrival (Arrival) holds `at` and `step_id`. The Agent, ToolCall and SubagentTrajectoryRef profiles define no fields
145
- in 1.0.
147
+ A media entry (MediaInfo) holds `sha256`, `bytes`, and, where they apply, `width`, `height`, `duration_ms`, `pages` and
148
+ `name`, plus `media_type` for media ATIF has no part type for. A reasoning block (ReasoningBlock) holds `chars`, its
149
+ share of `reasoning_content` (0 when the provider withheld the text), its `visibility`, the provider's `signature`, and
150
+ a redacted block's ciphertext as `data`, byte for byte. A step error (StepError) holds `kind`, `message` and `code`. An
151
+ arrival (Arrival) holds `at` and `step_id`. A compaction (Compaction) holds `written_by`, `assistant` for the agent's
152
+ own model or `harness`, and `trigger`, `manual` when something asked for it, such as a command, or `auto` when the
153
+ harness set it off itself. The Agent, ToolCall and SubagentTrajectoryRef profiles define no fields in 1.1.
146
154
 
147
155
  ## Vocabularies
148
156
 
@@ -155,18 +163,27 @@ A reader keeps a value it doesn't know.
155
163
  | `StepError.kind` | `agent_error`, `infra_error` |
156
164
  | `ReasoningBlock.visibility` | `raw`, `summary`, `omitted`, `redacted` |
157
165
  | `MetricsProfile.cost_source`, `FinalMetricsProfile.cost_source` | `harness`, `provider` |
166
+ | `Compaction.written_by` | `assistant`, `harness` |
167
+ | `Compaction.trigger` | `manual`, `auto` |
158
168
 
159
169
  ## Versions
160
170
 
161
171
  A minor version only adds optional fields and vocabulary values, each with the reader or producer that needs it. A
162
- field added in a later minor names the version it arrived in. Proposed for a later minor, with their first producer:
163
- `input_includes_cache` on the root and `cost_status` (`reported`, `priced` or `unpriced`), with the usage
164
- cross-check that reads them; per-part origins, when a reader needs them; and an always-on harness's fields.
172
+ field added in a later minor names the version it arrived in, and a reader of a minor reads every one before it.
173
+
174
+ - 1.1 adds `compaction` and `source: system` steps as the harness's own messages. Their first producer is Claude
175
+ Code's adapter, and their reader the judges' turn events.
176
+ - Proposed for a later minor, with their first producer:
177
+ - `input_includes_cache` on the root and `cost_status` (`reported`, `priced` or `unpriced`), with the usage
178
+ cross-check that reads them;
179
+ - per-part origins, when a reader needs them;
180
+ - the rest of an always-on harness's fields: the facts of its compaction (what it kept), the purpose of its
181
+ messages, and the tools it provides itself.
165
182
 
166
183
  ## Validator
167
184
 
168
185
  `validate(document)` returns findings, each with a rule id below, a severity and where in the document it is. It holds a
169
- producer's output to profile 1.0. `reader=True` checks someone else's document for reading instead: what a producer
186
+ producer's output to this profile. `reader=True` checks someone else's document for reading instead: what a producer
170
187
  must not write only warns, and the document fails only where agentenv couldn't read it. `media` is the folder the
171
188
  document's media paths are relative to, the one holding `media/`, or the files by path; without it only the paths' form
172
189
  is checked. `StoredMedia(sizes)` stands for files stored beside the document whose bytes were checked against their
@@ -182,8 +199,9 @@ and exits 1 when one is an error.
182
199
  | `json` | The document is a JSON object: UTF-8, with no NaN or infinity | error | error |
183
200
  | `atif` | ATIF's own models, vendored from Harbor, accept it | error | error |
184
201
  | `profile` | Each `extra.agentenv` parses with its profile model | error | error |
185
- | `profile-key` | Each `extra.agentenv` holds only the fields profile 1.0 defines | error | warning |
186
- | `profile-version` | The root's `extra.agentenv.version`, when given, is `1.0` | error | warning |
202
+ | `profile-key` | Each `extra.agentenv` holds only the fields this profile defines | error | warning |
203
+ | `profile-version` | The root's `extra.agentenv.version`, when given, is a 1.x this validator knows: 1.0 or 1.1 | error | warning |
204
+ | `compaction` | A step's `compaction` is on a `source: agent` step and names who wrote its summary | error | warning |
187
205
  | `vocabulary` | A vocabulary field holds one of its values | error | warning |
188
206
  | `outside-key` | No `extra` holds a key outside `agentenv` but `ToolCall.extra.raw_arguments` | error | warning |
189
207
  | `call-id` | Each `tool_call_id` is unique across the document and its sub-agents | error | warning |
@@ -19,17 +19,20 @@ from .models import (
19
19
  Trajectory,
20
20
  )
21
21
  from .profile import (
22
+ COMPACTION_TRIGGERS,
22
23
  FORMAT,
23
24
  PROFILE_KEY,
24
25
  PROFILE_VERSION,
25
26
  PROFILES,
26
27
  RAW_ARGUMENTS,
27
28
  SCHEMA_VERSION,
29
+ SUMMARY_WRITERS,
28
30
  VOCABULARIES,
29
31
  AdapterRef,
30
32
  AgentProfile,
31
33
  Arrival,
32
34
  AtifError,
35
+ Compaction,
33
36
  FinalMetricsProfile,
34
37
  MediaInfo,
35
38
  MetricsProfile,
@@ -68,13 +71,14 @@ from .validator import RULES, Finding, Rule, StoredMedia, errors_in, validate, v
68
71
 
69
72
  __all__ = [
70
73
  "Adapter", "AdapterRef", "AdapterRun", "AdapterSpec", "Agent", "AgentProfile", "Arrival", "atif_adapter",
71
- "AtifError", "AtifTurn", "AudioSource", "aux", "AuxEntry", "check", "check_adapter", "check_media", "ContentItem", "ContentPart",
74
+ "AtifError", "AtifTurn", "AudioSource", "aux", "AuxEntry", "check", "check_adapter", "check_media", "Compaction",
75
+ "COMPACTION_TRIGGERS", "ContentItem", "ContentPart",
72
76
  "Document", "dump_profile", "errors_in", "Fed", "FinalMetrics", "FinalMetricsProfile", "Finding", "finish",
73
77
  "FORMAT", "ImageSource", "is_prefix", "KIT_RULES", "KitResult", "load", "Media", "MEDIA_PATH", "media_file", "media_paths", "MediaInfo",
74
78
  "MediaItem", "MediaRef", "media_refs", "Metrics", "MetricsProfile", "Native", "native", "Observation", "ObservationResult",
75
79
  "ObservationResultProfile", "PROFILE_KEY", "profile_of", "PROFILE_VERSION", "PROFILES", "RAW_ARGUMENTS",
76
80
  "read_profile", "ReasoningBlock", "RecordedTask", "replay", "Rule", "RULES", "SCHEMA_VERSION", "Selector",
77
81
  "ServedData", "ServedError", "ServedMedia", "ServedTurn", "Step", "StepData", "StepError", "StepProfile", "StoredMedia",
78
- "strip_profile", "SubagentTrajectoryRef", "SubagentTrajectoryRefProfile", "Task", "task_document", "tasks", "tasks_document", "timestamp", "ToolCall",
82
+ "strip_profile", "SubagentTrajectoryRef", "SUMMARY_WRITERS", "SubagentTrajectoryRefProfile", "Task", "task_document", "tasks", "tasks_document", "timestamp", "ToolCall",
79
83
  "ToolCallProfile", "Trajectory", "TrajectoryProfile", "TurnContext", "validate", "validate_live", "validate_media", "VOCABULARIES",
80
84
  ]
@@ -20,6 +20,7 @@ from ._image_size import image_size
20
20
  from .adapter import AdapterSpec
21
21
  from .models.content import AudioMediaType, ContentPart, ImageSource
22
22
  from .profile import (
23
+ COMPACTION_TRIGGERS,
23
24
  COST_SOURCES,
24
25
  ERROR_KINDS,
25
26
  PROFILE_KEY,
@@ -27,6 +28,7 @@ from .profile import (
27
28
  RAW_ARGUMENTS,
28
29
  RESULT_STATUSES,
29
30
  SCHEMA_VERSION,
31
+ SUMMARY_WRITERS,
30
32
  TASK_STATES,
31
33
  VISIBILITIES,
32
34
  AtifError,
@@ -345,6 +347,9 @@ class Document:
345
347
  def step_for(self, key: str, agent: str | None) -> _Step:
346
348
  return self.peek(key, agent) or self._start(self._traj(agent), "agent", key)
347
349
 
350
+ def system_step(self) -> _Step:
351
+ return self._start(self._traj(None), "system", None)
352
+
348
353
  def open_step(self, agent: str | None) -> _Step:
349
354
  step = self._traj(agent).open
350
355
  if step is None:
@@ -899,6 +904,30 @@ class AtifTurn:
899
904
  target.profile["error"] = {k: v for k, v in (("kind", kind), ("message", message), ("code", code))
900
905
  if v is not None}
901
906
 
907
+ def system_message(self, *, text: str | None = None, content: Sequence[Any] | None = None,
908
+ time: str | datetime | None = None) -> None:
909
+ """A message the harness itself put in the conversation, such as a command's output: a ``source: system`` step
910
+ of its own in the root trajectory, which closes the step before it. Profile 1.1."""
911
+ parts, media = self._doc.parse_parts(content, text)
912
+ when = timestamp(time)
913
+ target = self._doc.system_step()
914
+ target.parts.extend(parts)
915
+ target.media.update(media)
916
+ self._touch(target, when)
917
+
918
+ def compaction(self, *, step: str, written_by: str, trigger: str | None = None, agent: str | None = None) -> None:
919
+ """Mark step ``step`` a compaction: its message a summary that replaced the conversation before it in what the
920
+ agent sees, written by ``written_by`` (``assistant``, the agent's own model, or ``harness``) and set off by
921
+ ``trigger`` (``manual``, something asked for it, or ``auto``). The step is the call that wrote the summary,
922
+ so its usage goes on it with ``step``. Profile 1.1."""
923
+ if written_by not in SUMMARY_WRITERS:
924
+ raise AtifError(f"written_by {written_by!r} isn't one of {', '.join(SUMMARY_WRITERS)}")
925
+ if trigger is not None and trigger not in COMPACTION_TRIGGERS:
926
+ raise AtifError(f"trigger {trigger!r} isn't one of {', '.join(COMPACTION_TRIGGERS)}")
927
+ target = self._doc.step_for(_key(step), agent)
928
+ target.profile["compaction"] = {key: value for key, value in (("written_by", written_by), ("trigger", trigger))
929
+ if value is not None}
930
+
902
931
  def attempt(self, number: int) -> None:
903
932
  """A harness retry: steps from here on carry attempt ``number``."""
904
933
  self._doc.set_attempt(number)
@@ -215,7 +215,7 @@
215
215
  },
216
216
  "extra": {
217
217
  "agentenv": {
218
- "version": "1.0",
218
+ "version": "1.1",
219
219
  "native_format": "toy-events/1",
220
220
  "adapter": {
221
221
  "name": "toy-events-atif",
@@ -235,7 +235,7 @@
235
235
  },
236
236
  "extra": {
237
237
  "agentenv": {
238
- "version": "1.0",
238
+ "version": "1.1",
239
239
  "native_format": "toy-events/1",
240
240
  "adapter": {
241
241
  "name": "toy-events-atif",
@@ -134,7 +134,7 @@
134
134
  },
135
135
  "extra": {
136
136
  "agentenv": {
137
- "version": "1.0",
137
+ "version": "1.1",
138
138
  "native_format": "toy-events/1",
139
139
  "adapter": {
140
140
  "name": "toy-events-atif",
@@ -107,7 +107,7 @@
107
107
  },
108
108
  "extra": {
109
109
  "agentenv": {
110
- "version": "1.0",
110
+ "version": "1.1",
111
111
  "native_format": "toy-events/1",
112
112
  "adapter": {
113
113
  "name": "toy-events-atif",
@@ -168,7 +168,7 @@
168
168
  },
169
169
  "extra": {
170
170
  "agentenv": {
171
- "version": "1.0",
171
+ "version": "1.1",
172
172
  "native_format": "toy-events/1",
173
173
  "adapter": {
174
174
  "name": "toy-events-atif",
@@ -160,7 +160,7 @@
160
160
  },
161
161
  "extra": {
162
162
  "agentenv": {
163
- "version": "1.0",
163
+ "version": "1.1",
164
164
  "native_format": "toy-events/1",
165
165
  "adapter": {
166
166
  "name": "toy-events-atif",
@@ -287,7 +287,7 @@
287
287
  },
288
288
  "extra": {
289
289
  "agentenv": {
290
- "version": "1.0",
290
+ "version": "1.1",
291
291
  "native_format": "toy-events/1",
292
292
  "adapter": {
293
293
  "name": "toy-events-atif",
@@ -12,7 +12,7 @@ from pydantic import BaseModel, ConfigDict, ValidationError
12
12
  FORMAT = "atif/1"
13
13
  #: The key under each ``extra`` that holds the profile.
14
14
  PROFILE_KEY = "agentenv"
15
- PROFILE_VERSION = "1.0"
15
+ PROFILE_VERSION = "1.1"
16
16
  #: The ATIF version producers write: the oldest that holds the fields they use.
17
17
  SCHEMA_VERSION = "ATIF-v1.8"
18
18
  #: The only key outside ``extra.agentenv`` a producer writes: Harbor's, on a ToolCall whose input wasn't an object.
@@ -24,6 +24,10 @@ RESULT_STATUSES = ("ok", "error", "canceled", "timeout")
24
24
  ERROR_KINDS = ("agent_error", "infra_error")
25
25
  VISIBILITIES = ("raw", "summary", "omitted", "redacted")
26
26
  COST_SOURCES = ("harness", "provider")
27
+ #: Who wrote a compaction's summary: the agent's own model, or the harness. Added in 1.1.
28
+ SUMMARY_WRITERS = ("assistant", "harness")
29
+ #: What set a compaction off: something asked for it (a command), or the harness on its own. Added in 1.1.
30
+ COMPACTION_TRIGGERS = ("manual", "auto")
27
31
  VOCABULARIES = {
28
32
  "StepProfile.state": TASK_STATES,
29
33
  "ObservationResultProfile.status": RESULT_STATUSES,
@@ -31,6 +35,8 @@ VOCABULARIES = {
31
35
  "ReasoningBlock.visibility": VISIBILITIES,
32
36
  "MetricsProfile.cost_source": COST_SOURCES,
33
37
  "FinalMetricsProfile.cost_source": COST_SOURCES,
38
+ "Compaction.written_by": SUMMARY_WRITERS,
39
+ "Compaction.trigger": COMPACTION_TRIGGERS,
34
40
  }
35
41
 
36
42
 
@@ -77,6 +83,14 @@ class StepError(_Profile):
77
83
  code: str | None = None
78
84
 
79
85
 
86
+ class Compaction(_Profile):
87
+ """A step whose message is a summary that replaced the conversation before it, in what the agent sees from then on:
88
+ who wrote it, and what set it off. Added in 1.1."""
89
+
90
+ written_by: str | None = None
91
+ trigger: str | None = None
92
+
93
+
80
94
  class Arrival(_Profile):
81
95
  """When a result arrived after its call's step had closed: its time, and the step open when it came."""
82
96
 
@@ -113,6 +127,7 @@ class StepProfile(_Profile):
113
127
  reasoning: list[ReasoningBlock] | None = None
114
128
  media: dict[str, MediaInfo] | None = None
115
129
  data: list[StepData] | None = None
130
+ compaction: Compaction | None = None
116
131
 
117
132
 
118
133
  class ToolCallProfile(_Profile):
@@ -1,5 +1,5 @@
1
1
  """Checking an ATIF document against ATIF and the agentenv profile: the vendored models, the profile's models, and the
2
- rules neither checks, each a finding with a rule id PROFILE.md names. A producer is held to profile 1.0; a reader of
2
+ rules neither checks, each a finding with a rule id PROFILE.md names. A producer is held to this profile; a reader of
3
3
  someone else's document is warned where a producer would fail, and fails only where agentenv couldn't read it."""
4
4
  from __future__ import annotations
5
5
 
@@ -21,6 +21,7 @@ from .profile import (
21
21
  VOCABULARIES,
22
22
  AdapterRef,
23
23
  Arrival,
24
+ Compaction,
24
25
  MediaInfo,
25
26
  ReasoningBlock,
26
27
  StepError,
@@ -31,6 +32,7 @@ from .reader import MEDIA_PATH, _resolver, _trajectories, is_prefix, media_refs,
31
32
  ERROR = "error"
32
33
  WARNING = "warning"
33
34
 
35
+ _VERSION = re.compile(r"(\d+)\.(\d+)")
34
36
  TIMESTAMP = re.compile(r"^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{3}|\.\d{6})?Z$")
35
37
  _COUNTS = (("prompt_tokens", "total_prompt_tokens"), ("completion_tokens", "total_completion_tokens"),
36
38
  ("cached_tokens", "total_cached_tokens"))
@@ -38,7 +40,7 @@ _INT = TypeAdapter(int)
38
40
  #: A profile field that holds a nested profile object, by its owner and name.
39
41
  _NESTED: dict[tuple[str, str], type[BaseModel]] = {
40
42
  ("Trajectory", "adapter"): AdapterRef, ("Step", "error"): StepError,
41
- ("ObservationResult", "arrived"): Arrival,
43
+ ("ObservationResult", "arrived"): Arrival, ("Step", "compaction"): Compaction,
42
44
  }
43
45
  _LISTS: dict[tuple[str, str], type[BaseModel]] = {("Step", "reasoning"): ReasoningBlock}
44
46
  _MAPS: dict[tuple[str, str], type[BaseModel]] = {
@@ -65,8 +67,11 @@ RULES: dict[str, Rule] = {rule.id: rule for rule in (
65
67
  Rule("json", ERROR, ERROR, "The document is a JSON object: UTF-8, with no NaN or infinity"),
66
68
  Rule("atif", ERROR, ERROR, "ATIF's own models, vendored from Harbor, accept it"),
67
69
  Rule("profile", ERROR, ERROR, "Each `extra.agentenv` parses with its profile model"),
68
- Rule("profile-key", ERROR, WARNING, "Each `extra.agentenv` holds only the fields profile 1.0 defines"),
69
- Rule("profile-version", ERROR, WARNING, "The root's `extra.agentenv.version`, when given, is `1.0`"),
70
+ Rule("profile-key", ERROR, WARNING, "Each `extra.agentenv` holds only the fields this profile defines"),
71
+ Rule("profile-version", ERROR, WARNING, "The root's `extra.agentenv.version`, when given, is a 1.x this validator "
72
+ "knows: 1.0 or 1.1"),
73
+ Rule("compaction", ERROR, WARNING, "A step's `compaction` is on a `source: agent` step and names who wrote its "
74
+ "summary"),
70
75
  Rule("vocabulary", ERROR, WARNING, "A vocabulary field holds one of its values"),
71
76
  Rule("outside-key", ERROR, WARNING, "No `extra` holds a key outside `agentenv` but `ToolCall.extra.raw_arguments`"),
72
77
  Rule("call-id", ERROR, WARNING, "Each `tool_call_id` is unique across the document and its sub-agents"),
@@ -283,9 +288,28 @@ def _profiles(objects: list[tuple[str, str, Mapping[str, Any]]], found: _Finding
283
288
  for n, block in enumerate(profile.get("reasoning") or [] if kind == "Step" else []):
284
289
  if isinstance(block, Mapping) and block.get("visibility") is not None:
285
290
  _vocabulary("ReasoningBlock.visibility", f"{at}.reasoning[{n}].visibility", block["visibility"], found)
286
- if kind == "Trajectory" and where == "" and profile.get("version") not in (None, PROFILE_VERSION):
291
+ compaction = profile.get("compaction") if kind == "Step" else None
292
+ if isinstance(compaction, Mapping):
293
+ if obj.get("source") != "agent":
294
+ found.add("compaction", f"{at}.compaction", "a compaction is the step of the call that wrote its "
295
+ f"summary, a source: agent step, not {obj.get('source')!r}")
296
+ if compaction.get("written_by") is None:
297
+ found.add("compaction", f"{at}.compaction.written_by", "a compaction names who wrote its summary")
298
+ for name in ("written_by", "trigger"):
299
+ if compaction.get(name) is not None:
300
+ _vocabulary(f"Compaction.{name}", f"{at}.compaction.{name}", compaction[name], found)
301
+ if kind == "Trajectory" and where == "" and not _known_version(profile.get("version")):
287
302
  found.add("profile-version", f"{at}.version",
288
- f"this is profile {profile['version']!r}; the validator checks profile {PROFILE_VERSION}")
303
+ f"this is profile {profile['version']!r}; the validator checks profile {PROFILE_VERSION} and "
304
+ "the minors before it")
305
+
306
+
307
+ def _known_version(version: Any) -> bool:
308
+ """None, or a 1.x no newer than this profile: a minor only adds optional fields, so an older one is read whole."""
309
+ if version is None:
310
+ return True
311
+ got, have = _VERSION.fullmatch(str(version)), _VERSION.fullmatch(PROFILE_VERSION)
312
+ return got is not None and have is not None and got[1] == have[1] and int(got[2]) <= int(have[2])
289
313
 
290
314
 
291
315
  def _known_keys(kind: str, at: str, profile: Mapping[str, Any], found: _Findings) -> None:
@@ -77,9 +77,28 @@ def request_headers(url: str, headers: dict[str, str] | None = None) -> dict[str
77
77
 
78
78
  def granted_headers(url: str, grants: dict[str | None, dict[str, str]]) -> dict[str, str]:
79
79
  """What ``grants``, env addresses and the headers that carry their control tokens, give a call to ``url``: those of
80
- the address it is or is under, and none anywhere else."""
81
- return next((sent for base, sent in grants.items()
82
- if base and (url == base.rstrip("/") or url.startswith(f"{base.rstrip('/')}/"))), {})
80
+ the address it resolves to or under, and none anywhere else."""
81
+ where = _resolved(url)
82
+ if where is None:
83
+ return {}
84
+ for base, sent in grants.items():
85
+ address = _resolved(base) if base else None
86
+ if address is not None and where[0] == address[0] and where[1][:len(address[1])] == address[1]:
87
+ return sent
88
+ return {}
89
+
90
+
91
+ def _resolved(url: str) -> tuple[tuple[str, str, int | None], list[str]] | None:
92
+ """``url``'s origin and path segments as its server routes them, dot segments resolved; None for a relative url or
93
+ one whose path still holds a dot segment once percent-decoded, which a server may resolve out of its address."""
94
+ try:
95
+ parsed = httpx.URL(url)
96
+ except httpx.InvalidURL:
97
+ return None
98
+ segments = parsed.path.rstrip("/").split("/")
99
+ if not parsed.is_absolute_url or any(segment in (".", "..") for segment in segments):
100
+ return None
101
+ return (parsed.scheme, parsed.host, parsed.port), segments
83
102
 
84
103
 
85
104
  async def _rpc(base_url: str, method: str, params: dict, timeout: int, verify: bool,
@@ -87,6 +87,49 @@ def test_a_final_response_the_last_step_lacks_gets_its_own_step_with_no_model_ca
87
87
  check(run.document())
88
88
 
89
89
 
90
+ @atif_adapter(native_format="toy-events/1", version="0.1.0", input_includes_cache=False)
91
+ class Compacting(Adapter):
92
+ """Toy records with a compaction: the summary a model call wrote, its usage, and the harness's own message."""
93
+
94
+ @native(type="say")
95
+ def say(self, r, turn):
96
+ turn.message(step=r["step"], text=r["text"])
97
+
98
+ @native(type="compact")
99
+ def compact(self, r, turn):
100
+ turn.message(step=r["step"], text=r["text"])
101
+ turn.compaction(step=r["step"], written_by=r.get("by", "assistant"), trigger=r.get("trigger"))
102
+ turn.step(key=r["step"], input_tokens=100, output_tokens=20)
103
+
104
+ @native(type="system")
105
+ def system(self, r, turn):
106
+ turn.system_message(text=r["text"])
107
+
108
+
109
+ def test_a_compaction_is_the_step_of_the_call_that_wrote_its_summary_and_the_harnesss_message_a_system_step():
110
+ run, pages = run_task([{"type": "say", "step": "s1", "text": "working"},
111
+ {"type": "compact", "step": "c1", "text": "the summary so far", "trigger": "manual"},
112
+ {"type": "system", "text": "Compacted"},
113
+ {"type": "say", "step": "s2", "text": "after it"}], cls=Compacting)
114
+ user, before, compaction, system, after = run.document()["steps"]
115
+ assert (compaction["source"], compaction["message"], compaction["llm_call_count"]) == (
116
+ "agent", "the summary so far", 1)
117
+ assert compaction["metrics"] == {"prompt_tokens": 100, "completion_tokens": 20}
118
+ assert profile_of(compaction)["compaction"] == {"written_by": "assistant", "trigger": "manual"}
119
+ assert (system["source"], system["message"]) == ("system", "Compacted")
120
+ assert not {"model_name", "metrics", "llm_call_count", "tool_calls"} & set(system)
121
+ assert after["message"] == "after it"
122
+ check(run.document())
123
+ assert all(is_prefix(a, b) for a, b in zip(pages, pages[1:]) if a is not None)
124
+
125
+
126
+ @pytest.mark.parametrize("record", [{"type": "compact", "step": "c1", "text": "x", "by": "someone"},
127
+ {"type": "compact", "step": "c1", "text": "x", "trigger": "now"}])
128
+ def test_a_compaction_names_a_writer_and_trigger_of_its_vocabularies(record):
129
+ with pytest.raises(AtifError, match="isn't one of"):
130
+ run_task([record], cls=Compacting)
131
+
132
+
90
133
  def test_the_terminal_state_is_never_served_before_the_task_ends():
91
134
  run, pages = run_task([{"type": "say", "step": "s1", "text": "a"}, {"type": "say", "step": "s2", "text": "b"}])
92
135
  for page in pages[:-1]:
@@ -78,6 +78,7 @@ NEGATIVE: dict[str, tuple[str, Callable[[dict[str, Any]], None]]] = {
78
78
  "profile": ("coding", lambda d: d["steps"][0]["extra"]["agentenv"].update(turn="zero")),
79
79
  "profile-key": ("coding", lambda d: d["steps"][0]["extra"]["agentenv"].update(later=1)),
80
80
  "profile-version": ("coding", lambda d: d["extra"]["agentenv"].update(version="2.0")),
81
+ "compaction": ("coding", lambda d: d["steps"][0]["extra"]["agentenv"].update(compaction={"written_by": "assistant"})),
81
82
  "vocabulary": ("coding", lambda d: d["steps"][-1]["extra"]["agentenv"].update(state="paused")),
82
83
  "outside-key": ("coding", lambda d: d["steps"][0]["extra"].update(note="x")),
83
84
  "call-id": ("coding", _duplicate_call_id),
@@ -143,6 +144,29 @@ def test_an_unknown_profile_key_fails_a_producer_and_only_warns_a_reader(tmp_pat
143
144
  assert "warning profile-key steps[0].extra.agentenv.later" in capsys.readouterr().out
144
145
 
145
146
 
147
+ def test_a_compaction_sits_on_an_agent_step_names_who_wrote_it_and_holds_its_vocabularies():
148
+ document = _fixture("coding")
149
+ profile = document["steps"][1].setdefault("extra", {}).setdefault("agentenv", {})
150
+ profile["compaction"] = {"written_by": "assistant", "trigger": "manual"}
151
+ assert errors_in(validate(document)) == []
152
+ profile["compaction"] = {"trigger": "auto"}
153
+ assert [(f.rule, f.where) for f in errors_in(validate(document))] == [
154
+ ("compaction", "steps[1].extra.agentenv.compaction.written_by")]
155
+ profile["compaction"] = {"written_by": "someone", "trigger": "now"}
156
+ assert [(f.rule, f.where) for f in errors_in(validate(document))] == [
157
+ ("vocabulary", "steps[1].extra.agentenv.compaction.written_by"),
158
+ ("vocabulary", "steps[1].extra.agentenv.compaction.trigger")]
159
+
160
+
161
+ @pytest.mark.parametrize(("version", "known"), [("1.0", True), ("1.1", True), ("1.2", False), ("2.0", False)])
162
+ def test_a_document_of_an_earlier_minor_is_read_whole_and_a_later_one_is_flagged(version, known):
163
+ """A minor only adds optional fields, so a validator of 1.1 checks a 1.0 copy, from an agent on an older SDK, as its
164
+ own; one it doesn't know yet is flagged, as a newer document is."""
165
+ document = _fixture("coding")
166
+ document["extra"]["agentenv"]["version"] = version
167
+ assert ("profile-version" in _rules(errors_in(validate(document)))) is not known
168
+
169
+
146
170
  def test_media_bytes_are_checked_against_their_name_and_profile():
147
171
  document = _fixture("computer_use")
148
172
  path = _parts(document)[0]["source"]["path"]
@@ -129,6 +129,24 @@ def test_an_agents_token_travels_in_its_own_header_not_authorization():
129
129
  assert client.control_token_headers(None) == {} and client.control_token_headers("") == {}
130
130
 
131
131
 
132
+ @pytest.mark.parametrize("url, granted", [
133
+ ("http://proxy/sandbox/A/svc/mcp-x/agentenv", True),
134
+ ("http://PROXY:80/sandbox/A/./svc/x", True),
135
+ ("http://proxy/sandbox/A/svc/x/../y", True),
136
+ ("http://proxy/sandbox/A/svc/mcp-x/../../../B/x", False),
137
+ ("http://proxy/sandbox/A/../B/x", False),
138
+ ("http://proxy/sandbox/A/%2e%2e/B/x", False),
139
+ ("http://proxy/sandbox/AB/x", False),
140
+ ("https://proxy/sandbox/A/x", False),
141
+ ("../sandbox/A/x", False),
142
+ ])
143
+ def test_a_grant_covers_only_urls_that_resolve_under_its_address(url, granted):
144
+ """The server resolves dot segments before it routes, so a dotted path that climbs out of the env's address
145
+ reaches another env behind the same proxy."""
146
+ assert client.granted_headers(url, {"http://proxy/sandbox/A/": client.control_headers("s3cret")}) == (
147
+ {"Authorization": "Bearer s3cret"} if granted else {})
148
+
149
+
132
150
  @pytest.mark.asyncio
133
151
  async def test_invoke_extension_and_the_data_plane_send_the_token(monkeypatch):
134
152
  seen = []