agentenv-framework-protocol 0.1.647__tar.gz → 0.1.649__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 (262) hide show
  1. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/PKG-INFO +18 -1
  2. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/README.md +17 -0
  3. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/pyproject.toml +1 -1
  4. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/a2a_agent/__init__.py +2 -0
  5. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/a2a_agent/_atif_copy.py +44 -9
  6. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/a2a_agent/_trajectory_log.py +7 -5
  7. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/a2a_agent/extensions.py +23 -1
  8. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/a2a_agent/framework.py +9 -3
  9. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_a2a_atif_serving.py +94 -0
  10. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_a2a_trajectory_log.py +3 -1
  11. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/.gitignore +0 -0
  12. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/LICENSE +0 -0
  13. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/NOTICE +0 -0
  14. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/THIRD_PARTY_NOTICES.md +0 -0
  15. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/examples/__init__.py +0 -0
  16. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/examples/advanced_agent.py +0 -0
  17. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/examples/basic_agent.py +0 -0
  18. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/examples/custom_extensions_agent.py +0 -0
  19. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/examples/multimodal_agent.py +0 -0
  20. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/examples/reference_model.py +0 -0
  21. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/examples/streaming_agent.py +0 -0
  22. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/examples/website/notes/.gitignore +0 -0
  23. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/examples/website/notes/Dockerfile +0 -0
  24. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/examples/website/notes/Dockerfile.dockerignore +0 -0
  25. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/examples/website/notes/README.md +0 -0
  26. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/examples/website/notes/data/seed.json +0 -0
  27. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/examples/website/notes/env.toml +0 -0
  28. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/examples/website/notes/site.py +0 -0
  29. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/examples/website/notes/web/index.html +0 -0
  30. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/examples/website/notes/web/package-lock.json +0 -0
  31. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/examples/website/notes/web/package.json +0 -0
  32. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/examples/website/notes/web/src/main.js +0 -0
  33. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/examples/website/notes/web/src/style.css +0 -0
  34. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/examples/website/notes/web/vite.config.js +0 -0
  35. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/__init__.py +0 -0
  36. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/a2a_agent/_media_spool.py +0 -0
  37. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/a2a_agent/_secrets.py +0 -0
  38. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/a2a_agent/_snapshot_state.py +0 -0
  39. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/a2a_agent/_triggers.py +0 -0
  40. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/a2a_agent/_turn_index.py +0 -0
  41. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/a2a_agent/clock.py +0 -0
  42. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/a2a_agent/control_token.py +0 -0
  43. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/a2a_agent/peer_agents.py +0 -0
  44. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/a2a_agent/proxy.py +0 -0
  45. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/a2a_agent/registry.py +0 -0
  46. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/a2a_agent/staging.py +0 -0
  47. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/a2a_agent/tasks/__init__.py +0 -0
  48. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/a2a_agent/tasks/v1.py +0 -0
  49. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/agent_env_environment.py +0 -0
  50. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/atif/PROFILE.md +0 -0
  51. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/atif/__init__.py +0 -0
  52. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/atif/__main__.py +0 -0
  53. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/atif/_image_size.py +0 -0
  54. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/atif/adapter.py +0 -0
  55. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/atif/builder.py +0 -0
  56. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/atif/fixtures/coding.json +0 -0
  57. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/atif/fixtures/coding.stripped.json +0 -0
  58. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/atif/fixtures/computer_use.json +0 -0
  59. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/atif/fixtures/late_result.json +0 -0
  60. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/atif/fixtures/media/482405b002a62efa8516c36709a7a100637507670576fa73a20ad5420d55c66f.png +0 -0
  61. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/atif/fixtures/media/55c64d0fcd6f9d5f7c828093857e3fdfda68478bb4e9bd24d481ef391c7804e8.heic +0 -0
  62. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/atif/fixtures/media/67905ad3cc2dd52b1f5f6a6d2814de0396618b29b4238b9af5207aeb69936e6d.mp4 +0 -0
  63. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/atif/fixtures/media/69a8aa01fe5537076d023dd5e9cc4275b39fc0434aa6483a9f58b66ef2f3c896.png +0 -0
  64. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/atif/fixtures/media/82e60066a2de261b6653bcdda90d1cb9a7af2f474cecd82e8d371e8384d72315.png +0 -0
  65. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/atif/fixtures/media/845e91831319e89c4d656bdb80c278ac09a7230d61e5dfd2e1b1fbb436ac8917.pdf +0 -0
  66. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/atif/fixtures/multi_agent.json +0 -0
  67. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/atif/fixtures/odd_parts.json +0 -0
  68. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/atif/fixtures/subagent.json +0 -0
  69. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/atif/fixtures/two_turns.json +0 -0
  70. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/atif/kit.py +0 -0
  71. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/atif/models/LICENSE +0 -0
  72. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/atif/models/VENDORED.md +0 -0
  73. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/atif/models/__init__.py +0 -0
  74. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/atif/models/agent.py +0 -0
  75. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/atif/models/content.py +0 -0
  76. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/atif/models/final_metrics.py +0 -0
  77. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/atif/models/metrics.py +0 -0
  78. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/atif/models/observation.py +0 -0
  79. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/atif/models/observation_result.py +0 -0
  80. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/atif/models/step.py +0 -0
  81. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/atif/models/subagent_trajectory_ref.py +0 -0
  82. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/atif/models/tool_call.py +0 -0
  83. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/atif/models/trajectory.py +0 -0
  84. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/atif/profile.py +0 -0
  85. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/atif/reader.py +0 -0
  86. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/atif/runner.py +0 -0
  87. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/atif/served.py +0 -0
  88. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/atif/validator.py +0 -0
  89. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/client.py +0 -0
  90. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/computer/__init__.py +0 -0
  91. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/computer/_declare.py +0 -0
  92. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/computer/_desktop.py +0 -0
  93. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/computer/_job.py +0 -0
  94. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/computer/_linux.py +0 -0
  95. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/computer/_load.py +0 -0
  96. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/computer/_macos.py +0 -0
  97. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/computer/_reaping.py +0 -0
  98. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/computer/_session_posix.py +0 -0
  99. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/computer/_session_windows.py +0 -0
  100. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/computer/_windows.py +0 -0
  101. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/computer/_with_fds.py +0 -0
  102. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/computer/_x11.py +0 -0
  103. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/computer/annotate.py +0 -0
  104. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/computer/app.py +0 -0
  105. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/computer/app_data.py +0 -0
  106. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/computer/app_runtime.py +0 -0
  107. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/computer/apps.py +0 -0
  108. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/computer/card.py +0 -0
  109. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/computer/checks.py +0 -0
  110. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/computer/clock.py +0 -0
  111. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/computer/conformance/__init__.py +0 -0
  112. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/computer/conformance/__main__.py +0 -0
  113. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/computer/conformance/checks.py +0 -0
  114. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/computer/conformance/client.py +0 -0
  115. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/computer/conformance/desk.py +0 -0
  116. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/computer/conformance/fixture.py +0 -0
  117. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/computer/conformance/mp4.py +0 -0
  118. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/computer/conformance/page_fixture.py +0 -0
  119. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/computer/conformance/report.py +0 -0
  120. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/computer/conformance/wayland_fixture.py +0 -0
  121. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/computer/dataplane.py +0 -0
  122. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/computer/driver.py +0 -0
  123. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/computer/errors.py +0 -0
  124. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/computer/extensions.py +0 -0
  125. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/computer/frames.py +0 -0
  126. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/computer/keys.py +0 -0
  127. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/computer/launch.py +0 -0
  128. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/computer/manifest.py +0 -0
  129. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/computer/operations.py +0 -0
  130. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/computer/platform.py +0 -0
  131. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/computer/prefix.py +0 -0
  132. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/computer/queue.py +0 -0
  133. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/computer/recording.py +0 -0
  134. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/computer/results.py +0 -0
  135. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/computer/run_install_step.py +0 -0
  136. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/computer/runtime.py +0 -0
  137. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/computer/seed.py +0 -0
  138. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/computer/serve.py +0 -0
  139. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/computer/serve_app.py +0 -0
  140. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/computer/served.py +0 -0
  141. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/computer/session.py +0 -0
  142. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/computer/settings.py +0 -0
  143. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/computer/skill.py +0 -0
  144. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/computer/spaces.py +0 -0
  145. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/computer/svc.py +0 -0
  146. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/computer/tools.py +0 -0
  147. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/errors.py +0 -0
  148. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/manifest.py +0 -0
  149. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/passthrough.py +0 -0
  150. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/preflight.py +0 -0
  151. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/tool_access.py +0 -0
  152. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/tool_client.py +0 -0
  153. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/tool_context.py +0 -0
  154. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/transfers.py +0 -0
  155. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/types.py +0 -0
  156. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/website/__init__.py +0 -0
  157. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/website/clock.py +0 -0
  158. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/website/conformance.py +0 -0
  159. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/website/environment.py +0 -0
  160. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/website/errors.py +0 -0
  161. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/website/forwarding.py +0 -0
  162. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/website/readiness.py +0 -0
  163. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/website/routes.py +0 -0
  164. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/website/session.py +0 -0
  165. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/website_browser/__init__.py +0 -0
  166. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/website_browser/cdp.py +0 -0
  167. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/website_browser/contexts.py +0 -0
  168. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/website_browser/control.py +0 -0
  169. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/website_browser/data.py +0 -0
  170. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/website_browser/devtools.py +0 -0
  171. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/website_browser/environment.py +0 -0
  172. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/website_browser/log.py +0 -0
  173. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/website_browser/network.py +0 -0
  174. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/website_browser/recording.py +0 -0
  175. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/website_browser/scope.py +0 -0
  176. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/website_browser/shapes.py +0 -0
  177. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/src/agentenv_protocol/website_browser/stream.py +0 -0
  178. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/atif_cases.py +0 -0
  179. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/computer_fake.py +0 -0
  180. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/conftest.py +0 -0
  181. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/probe_fake.py +0 -0
  182. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_a2a_agent.py +0 -0
  183. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_a2a_agent_clock.py +0 -0
  184. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_a2a_agent_examples.py +0 -0
  185. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_a2a_atif_media.py +0 -0
  186. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_a2a_atif_prescribe.py +0 -0
  187. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_a2a_atif_scrubbing.py +0 -0
  188. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_a2a_atif_turns.py +0 -0
  189. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_a2a_cdp_config.py +0 -0
  190. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_a2a_object_transfers.py +0 -0
  191. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_a2a_peer_agents.py +0 -0
  192. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_a2a_proxy.py +0 -0
  193. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_a2a_staging.py +0 -0
  194. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_agent_env_environment.py +0 -0
  195. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_atif_builder.py +0 -0
  196. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_atif_fixtures.py +0 -0
  197. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_atif_kit.py +0 -0
  198. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_atif_profile.py +0 -0
  199. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_atif_reader.py +0 -0
  200. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_atif_validator.py +0 -0
  201. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_atif_vendored.py +0 -0
  202. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_browser_cdp.py +0 -0
  203. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_browser_contexts.py +0 -0
  204. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_browser_data.py +0 -0
  205. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_browser_log.py +0 -0
  206. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_browser_network.py +0 -0
  207. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_browser_recording.py +0 -0
  208. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_browser_state.py +0 -0
  209. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_client.py +0 -0
  210. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_computer_app_data.py +0 -0
  211. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_computer_app_server.py +0 -0
  212. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_computer_clock.py +0 -0
  213. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_computer_conformance.py +0 -0
  214. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_computer_conformance_attempts.py +0 -0
  215. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_computer_conformance_checks.py +0 -0
  216. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_computer_conformance_page.py +0 -0
  217. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_computer_conformance_recording.py +0 -0
  218. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_computer_dataplane.py +0 -0
  219. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_computer_declare.py +0 -0
  220. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_computer_driver.py +0 -0
  221. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_computer_driver_keys.py +0 -0
  222. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_computer_extensions.py +0 -0
  223. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_computer_frames.py +0 -0
  224. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_computer_macos.py +0 -0
  225. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_computer_page.py +0 -0
  226. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_computer_queue.py +0 -0
  227. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_computer_recording.py +0 -0
  228. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_computer_recording_annotate.py +0 -0
  229. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_computer_screenshot_delay.py +0 -0
  230. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_computer_seed.py +0 -0
  231. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_computer_serve.py +0 -0
  232. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_computer_served.py +0 -0
  233. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_computer_session_windows.py +0 -0
  234. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_computer_spaces.py +0 -0
  235. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_computer_svc_forward.py +0 -0
  236. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_computer_tool_prefix.py +0 -0
  237. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_computer_windows_driver.py +0 -0
  238. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_control_token.py +0 -0
  239. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_data_objects.py +0 -0
  240. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_devtools_pipe.py +0 -0
  241. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_errors.py +0 -0
  242. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_extension_methods.py +0 -0
  243. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_intake.py +0 -0
  244. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_manifest.py +0 -0
  245. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_preflight.py +0 -0
  246. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_tool_access.py +0 -0
  247. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_tool_annotations.py +0 -0
  248. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_tool_client.py +0 -0
  249. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_tool_context.py +0 -0
  250. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_tool_context_fastmcp.py +0 -0
  251. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_tool_context_injection.py +0 -0
  252. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_usage.py +0 -0
  253. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_usage_models.py +0 -0
  254. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_website_api.py +0 -0
  255. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_website_browser.py +0 -0
  256. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_website_conformance.py +0 -0
  257. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_website_environment.py +0 -0
  258. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_website_forwarding.py +0 -0
  259. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_website_live.py +0 -0
  260. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_website_mcp.py +0 -0
  261. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/tests/test_website_notes_example.py +0 -0
  262. {agentenv_framework_protocol-0.1.647 → agentenv_framework_protocol-0.1.649}/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.647
3
+ Version: 0.1.649
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
@@ -1774,6 +1774,23 @@ included:
1774
1774
  served. A sub-agent can gain steps while its task runs, so keep each one's
1775
1775
  latest copy; the page that serves a task's last step, which closes only as the
1776
1776
  task ends, carries them whole.
1777
+ - A task's cursor read may also say what the reader holds, and get only what it
1778
+ lacks:
1779
+ - `header_digest` is the digest of the header it holds (`""` for none). The
1780
+ answer names the header's `header_digest` and leaves `header` out while the
1781
+ two match.
1782
+ - `subagent_cursors` maps each sub-agent's `trajectory_id` to
1783
+ `{after, header_digest}`, the last `step_id` the reader holds of it and its
1784
+ header's digest (`{}` at first). The answer then carries each of the task's
1785
+ sub-agents by its closed steps past its cursor, whether or not the step that
1786
+ started it has closed, and its header, the trajectory without `steps`, only
1787
+ when that changed. A sub-agent with neither is left out, and
1788
+ `subagent_header_digests` names each one's header digest.
1789
+
1790
+ The card lists both fields on the task cursor read. Detect them with
1791
+ `card_request_accepts(get_request, {"task_id", "after", "format",
1792
+ "header_digest", "subagent_cursors"})`, and send them only to a card that
1793
+ takes them. A read naming neither gets the page above.
1777
1794
 
1778
1795
  Every `atif/1` answer names `schema_version` and `profile_version` beside
1779
1796
  `format`. An adapter that raises stops its context's copy, never the turn: the
@@ -1703,6 +1703,23 @@ included:
1703
1703
  served. A sub-agent can gain steps while its task runs, so keep each one's
1704
1704
  latest copy; the page that serves a task's last step, which closes only as the
1705
1705
  task ends, carries them whole.
1706
+ - A task's cursor read may also say what the reader holds, and get only what it
1707
+ lacks:
1708
+ - `header_digest` is the digest of the header it holds (`""` for none). The
1709
+ answer names the header's `header_digest` and leaves `header` out while the
1710
+ two match.
1711
+ - `subagent_cursors` maps each sub-agent's `trajectory_id` to
1712
+ `{after, header_digest}`, the last `step_id` the reader holds of it and its
1713
+ header's digest (`{}` at first). The answer then carries each of the task's
1714
+ sub-agents by its closed steps past its cursor, whether or not the step that
1715
+ started it has closed, and its header, the trajectory without `steps`, only
1716
+ when that changed. A sub-agent with neither is left out, and
1717
+ `subagent_header_digests` names each one's header digest.
1718
+
1719
+ The card lists both fields on the task cursor read. Detect them with
1720
+ `card_request_accepts(get_request, {"task_id", "after", "format",
1721
+ "header_digest", "subagent_cursors"})`, and send them only to a card that
1722
+ takes them. A read naming neither gets the page above.
1706
1723
 
1707
1724
  Every `atif/1` answer names `schema_version` and `profile_version` beside
1708
1725
  `format`. An adapter that raises stops its context's copy, never the turn: the
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "agentenv-framework-protocol"
3
- version = "0.1.647"
3
+ version = "0.1.649"
4
4
  description = "Open data-plane protocol and server SDK for agent environments."
5
5
  readme = "README.md"
6
6
  license = "Apache-2.0"
@@ -73,6 +73,7 @@ from .extensions import (
73
73
  SnapshotReadObjects,
74
74
  SnapshotUploadedObjects,
75
75
  SnapshotWriteObjects,
76
+ SubagentCursor,
76
77
  TaskEventsTrajectoryRequest,
77
78
  TaskObjectTrajectoryRequest,
78
79
  TaskTrajectoryRequest,
@@ -245,6 +246,7 @@ __all__ = [
245
246
  "SnapshotWriteObjects",
246
247
  "StagingStore",
247
248
  "TaskError",
249
+ "SubagentCursor",
248
250
  "TaskEventsTrajectoryRequest",
249
251
  "TaskObjectTrajectoryRequest",
250
252
  "TaskOutcome",
@@ -6,6 +6,7 @@ from __future__ import annotations
6
6
 
7
7
  import base64
8
8
  import binascii
9
+ import hashlib
9
10
  import json
10
11
  import logging
11
12
  import threading
@@ -13,13 +14,14 @@ import uuid
13
14
  from contextlib import contextmanager
14
15
  from dataclasses import dataclass, field
15
16
  from datetime import datetime, timezone
16
- from typing import Any, Callable, Iterable, Iterator, Sequence
17
+ from typing import Any, Callable, Iterable, Iterator, Mapping, Sequence
17
18
  from urllib.parse import urlsplit, urlunsplit
18
19
 
19
20
  from ..atif import FORMAT, Adapter, AdapterRun, AuxEntry, Media, ServedTurn, TurnContext
20
21
  from ..computer import clock as follower
21
22
  from ..errors import AgentEnvError
22
23
  from . import clock as agent_clock
24
+ from .extensions import SubagentCursor
23
25
  from .tasks.v1 import DataPart, FilePart, TaskError, TextPart, _thaw
24
26
 
25
27
  logger = logging.getLogger(__name__)
@@ -54,13 +56,15 @@ class _Task:
54
56
  @dataclass(frozen=True, slots=True)
55
57
  class AtifPage:
56
58
  """A cursor page of a copy: the closed steps after ``after``, ``next`` the last one's ``step_id``, and the
57
- sub-agents of their tasks."""
59
+ sub-agents of their tasks; the header's digest, and with cursors, each sub-agent's."""
58
60
 
59
61
  header: dict[str, Any] | None
60
62
  subagents: list[dict[str, Any]]
61
63
  steps: list[dict[str, Any]]
62
64
  next: int
63
65
  has_more: bool
66
+ header_digest: str | None = None
67
+ subagent_header_digests: dict[str, str] | None = None
64
68
 
65
69
 
66
70
  class AtifCopy:
@@ -150,12 +154,15 @@ class AtifCopy:
150
154
  page = self._run.page()
151
155
  return None if page is None else self._scrub(page)
152
156
 
153
- def page(self, after: int, max_steps: int, max_bytes: int, *, task_id: str | None = None) -> AtifPage:
157
+ def page(self, after: int, max_steps: int, max_bytes: int, *, task_id: str | None = None,
158
+ subagent_cursors: Mapping[str, SubagentCursor] | None = None) -> AtifPage:
154
159
  """The closed steps after step ``after``, of the whole context or of task ``task_id``, within both budgets; the
155
160
  first is always returned, so one larger than ``max_bytes`` can't stall a reader. With them, the sub-agents of
156
161
  every task they belong to, as far as each is served: a sub-agent can gain steps while its task runs, and the
157
- page that serves a task's last step, which closes only as the task ends, carries them whole. The byte budget
158
- counts what it serves, scrubbed."""
162
+ page that serves a task's last step, which closes only as the task ends, carries them whole. With
163
+ ``subagent_cursors``, instead, each of task ``task_id``'s sub-agents with only its closed steps past its cursor
164
+ and its header only when that changed, whether or not the step that started it has closed. The byte budget
165
+ counts the root steps it serves, scrubbed."""
159
166
  with self._lock:
160
167
  self._check()
161
168
  document = self._run.page()
@@ -182,13 +189,36 @@ class AtifCopy:
182
189
  last = step["step_id"]
183
190
  header = None
184
191
  subagents: list[dict[str, Any]] = []
192
+ sub_digests = None
185
193
  if document is not None:
186
194
  header = self._scrub({key: value for key, value in document.items()
187
195
  if key not in ("steps", "subagent_trajectories")})
188
- subagents = self._scrub([sub for sub in document.get("subagent_trajectories", [])
189
- if sub_tasks.get(sub["trajectory_id"]) in tasks])
190
- return AtifPage(header=header, subagents=subagents, steps=served,
191
- next=last, has_more=len(served) < len(pending))
196
+ subs = document.get("subagent_trajectories", [])
197
+ if subagent_cursors is None:
198
+ subagents = self._scrub([sub for sub in subs if sub_tasks.get(sub["trajectory_id"]) in tasks])
199
+ else:
200
+ subagents, sub_digests = self._subagents_past(
201
+ [sub for sub in subs if sub_tasks.get(sub["trajectory_id"]) == task_id], subagent_cursors)
202
+ return AtifPage(header=header, subagents=subagents, steps=served, next=last,
203
+ has_more=len(served) < len(pending), header_digest=None if header is None else _digest(header),
204
+ subagent_header_digests=sub_digests)
205
+
206
+ def _subagents_past(self, subs: Sequence[dict[str, Any]], cursors: Mapping[str, SubagentCursor]
207
+ ) -> tuple[list[dict[str, Any]], dict[str, str]]:
208
+ """Each sub-agent with what its reader lacks, its closed steps past its cursor and its header if the reader's
209
+ digest is another, left out when it lacks neither; and each one's header digest."""
210
+ served: list[dict[str, Any]] = []
211
+ digests: dict[str, str] = {}
212
+ for sub in subs:
213
+ sub_id = sub["trajectory_id"]
214
+ cursor = cursors.get(sub_id) or SubagentCursor(after=0)
215
+ head = self._scrub({key: value for key, value in sub.items() if key != "steps"})
216
+ digests[sub_id] = digest = _digest(head)
217
+ steps = self._scrub([step for step in sub["steps"] if step["step_id"] > cursor.after])
218
+ changed = digest != cursor.header_digest
219
+ if steps or changed:
220
+ served.append({**(head if changed else {"trajectory_id": sub_id}), "steps": steps})
221
+ return served, digests
192
222
 
193
223
  def _open(self, task_id: str) -> _Task | None:
194
224
  if self._failed is not None:
@@ -220,6 +250,11 @@ class AtifCopy:
220
250
  )
221
251
 
222
252
 
253
+ def _digest(value: Any) -> str:
254
+ """What a reader names to say it holds ``value``: the sha256 of its canonical JSON."""
255
+ return "sha256:" + hashlib.sha256(json.dumps(value, sort_keys=True, separators=(",", ":")).encode()).hexdigest()
256
+
257
+
223
258
  def _real_now() -> datetime:
224
259
  return datetime.now(timezone.utc)
225
260
 
@@ -6,14 +6,14 @@ import json
6
6
  import logging
7
7
  from collections import OrderedDict
8
8
  from dataclasses import dataclass
9
- from typing import Any, Callable, Iterable, Sequence
9
+ from typing import Any, Callable, Iterable, Mapping, Sequence
10
10
 
11
11
  from ..atif import FORMAT as ATIF_FORMAT
12
12
  from ..atif import Adapter
13
13
  from ._atif_copy import AtifCopy, AtifPage, TurnStart
14
14
  from ._media_spool import MediaSpool
15
15
  from ._turn_index import TurnIndex
16
- from .extensions import TrajectoryState
16
+ from .extensions import SubagentCursor, TrajectoryState
17
17
  from .tasks.v1 import TaskError, TrajectoryLog
18
18
 
19
19
  logger = logging.getLogger(__name__)
@@ -320,16 +320,18 @@ class TaskTrajectories:
320
320
  return copy.context_read()
321
321
 
322
322
  def atif_task_page(
323
- self, task_id: str, after: int, max_steps: int, max_bytes: int
323
+ self, task_id: str, after: int, max_steps: int, max_bytes: int, *,
324
+ subagent_cursors: Mapping[str, SubagentCursor] | None = None,
324
325
  ) -> AtifCursor | None:
325
- """A cursor page of the task's closed atif/1 steps, in the task's state."""
326
+ """A cursor page of the task's closed atif/1 steps, in the task's state; with ``subagent_cursors``, its
327
+ sub-agents by what the reader lacks of each (``AtifCopy.page``)."""
326
328
  record = self._tasks.get(task_id)
327
329
  copy = self._copy(record.context_id) if record is not None else None
328
330
  if copy is None:
329
331
  return None
330
332
  self._touch(record.context_id)
331
333
  state = record.state
332
- page = copy.page(after, max_steps, max_bytes, task_id=task_id)
334
+ page = copy.page(after, max_steps, max_bytes, task_id=task_id, subagent_cursors=subagent_cursors)
333
335
  return AtifCursor(page=page, context_id=record.context_id, task_id=task_id, state=state)
334
336
 
335
337
  def atif_context_page(
@@ -276,11 +276,25 @@ class TrajectoryState(str, Enum):
276
276
  MAX_TRAJECTORY_READ_EVENTS = 1_000
277
277
 
278
278
 
279
+ class SubagentCursor(ExtensionRequest):
280
+ """How far a live atif/1 reader holds one sub-agent: its last step's ``step_id``, and its header's digest."""
281
+
282
+ after: StrictInt = Field(ge=0)
283
+ header_digest: str = ""
284
+
285
+
279
286
  class TaskEventsTrajectoryRequest(ExtensionRequest):
287
+ """A cursor read of a task's trajectory from event ``after``. An atif/1 read may also name the digest of the header
288
+ the reader holds (``header_digest``, "" for none), which the answer then leaves out while it's unchanged, and how
289
+ far it holds each sub-agent (``subagent_cursors``, {} at first), which has the answer serve each of the task's
290
+ sub-agents by its new closed steps alone, whether or not the step that started it has closed."""
291
+
280
292
  task_id: str
281
293
  after: StrictInt = Field(ge=0)
282
294
  limit: StrictInt | None = Field(default=None, ge=1, le=MAX_TRAJECTORY_READ_EVENTS)
283
295
  format: TrajectoryFormat | None = None
296
+ header_digest: str | None = None
297
+ subagent_cursors: dict[str, SubagentCursor] | None = None
284
298
 
285
299
 
286
300
  class ContextEventsTrajectoryRequest(ExtensionRequest):
@@ -309,7 +323,13 @@ class AtifEventsResponse(ExtensionResponse):
309
323
  ``subagents`` the embedded sub-agent trajectories of the
310
324
  tasks these steps belong to, as far as each is served, so the page stands alone. A sub-agent can gain steps while
311
325
  its task runs; a reader keeps each sub-agent's latest copy, and the page that serves a task's last step carries
312
- them whole. The last page's header with every page's steps and the latest sub-agents is the document."""
326
+ them whole. The last page's header with every page's steps and the latest sub-agents is the document.
327
+
328
+ A read that named ``header_digest`` gets the header's digest, and the header only when it differs from the one the
329
+ reader holds. A read that named ``subagent_cursors`` gets each of its task's sub-agents with only the closed steps
330
+ past its cursor, and its header (the trajectory without its steps) only when that changed; ``subagent_header_digests``
331
+ then names each one's header digest. The reader's latest header, with every page's steps and each sub-agent's
332
+ latest header and steps, is the document."""
313
333
 
314
334
  context_id: str
315
335
  task_id: str
@@ -322,6 +342,8 @@ class AtifEventsResponse(ExtensionResponse):
322
342
  events: list[Any]
323
343
  next: int
324
344
  has_more: bool
345
+ header_digest: str | None = None
346
+ subagent_header_digests: dict[str, str] | None = None
325
347
 
326
348
 
327
349
  def _opaque_snapshot_objects(
@@ -905,12 +905,16 @@ class _SdkServices:
905
905
  self, request: TaskEventsTrajectoryRequest | ContextEventsTrajectoryRequest
906
906
  ) -> dict[str, Any]:
907
907
  """An atif/1 cursor page: the copy's closed steps after step ``after``, of the task or of
908
- the whole context."""
908
+ the whole context. A task read that names the digest of the header it holds gets the
909
+ header's digest, and the header only when it's another; one that names sub-agent cursors
910
+ gets the task's sub-agents by what it lacks of each, with their header digests."""
909
911
  max_steps = request.limit or MAX_TRAJECTORY_READ_EVENTS
912
+ held = request.header_digest if isinstance(request, TaskEventsTrajectoryRequest) else None
910
913
  try:
911
914
  if isinstance(request, TaskEventsTrajectoryRequest):
912
915
  cursor = self.task_trajectories.atif_task_page(
913
- request.task_id, request.after, max_steps, MAX_TRAJECTORY_READ_BYTES
916
+ request.task_id, request.after, max_steps, MAX_TRAJECTORY_READ_BYTES,
917
+ subagent_cursors=request.subagent_cursors,
914
918
  )
915
919
  unknown = f"Unknown task '{request.task_id}'"
916
920
  else:
@@ -930,11 +934,13 @@ class _SdkServices:
930
934
  task_id=cursor.task_id,
931
935
  state=cursor.state,
932
936
  **_atif_versions(page.header),
933
- header=page.header,
937
+ header=None if held is not None and held == page.header_digest else page.header,
934
938
  subagents=page.subagents,
935
939
  events=page.steps,
936
940
  next=page.next,
937
941
  has_more=page.has_more,
942
+ header_digest=page.header_digest if held is not None else None,
943
+ subagent_header_digests=page.subagent_header_digests,
938
944
  ).model_dump(mode="json", exclude_none=True)
939
945
 
940
946
  async def _atif_document(
@@ -228,6 +228,18 @@ async def _sub_agent_grows(log: TrajectoryLog, tag: str, hold: _Hold) -> TaskRes
228
228
  return TaskResult.text(f"{tag}: two files")
229
229
 
230
230
 
231
+ @_scenario("running")
232
+ async def _sub_agent_runs(log: TrajectoryLog, tag: str, hold: _Hold) -> TaskResult:
233
+ """Spawns a sub-agent that writes its steps while its call waits for a result, holding after each."""
234
+ _append(log, [*_spawning(tag), {"type": "say", "step": f"{tag}-s2", "text": "sub: still listing", "agent": f"{tag}-sub"}])
235
+ await hold.wait()
236
+ _append(log, [{"type": "say", "step": f"{tag}-s3", "text": "sub: two files", "agent": f"{tag}-sub"}])
237
+ await hold.wait()
238
+ _append(log, [{"type": "result", "id": f"{tag}-task", "out": "two files"},
239
+ {"type": "say", "step": f"{tag}-2", "text": f"{tag}: the explorer found two files"}])
240
+ return TaskResult.text(f"{tag}: the explorer found two files")
241
+
242
+
231
243
  @_scenario("orphan")
232
244
  async def _spawn_never_answered(log: TrajectoryLog, tag: str, hold: _Hold) -> TaskResult:
233
245
  """Spawns a sub-agent and holds before its call's result, for a test to cancel it."""
@@ -610,6 +622,88 @@ def test_a_reader_following_the_cursor_gets_the_steps_a_sub_agent_writes_after_i
610
622
  assert _rebuild(pages) == document
611
623
 
612
624
 
625
+ def _held(page: dict[str, Any], held: dict[str, Any]) -> dict[str, Any]:
626
+ """The read that follows ``page`` for a reader holding ``held`` (its header and digest, and each sub-agent's), which
627
+ takes in what ``page`` served."""
628
+ if "header" in page:
629
+ held["header"] = page["header"]
630
+ held["digest"] = page.get("header_digest", "")
631
+ for sub in page["subagents"]:
632
+ mine = held["subs"].setdefault(sub["trajectory_id"], {"steps": []})
633
+ mine.update({key: value for key, value in sub.items() if key != "steps"})
634
+ mine["steps"] = mine["steps"] + sub["steps"]
635
+ held["digests"] = page.get("subagent_header_digests", {})
636
+ held["steps"] = held["steps"] + page["events"]
637
+ return {"after": page["next"], "header_digest": held["digest"], "subagent_cursors": {
638
+ sub_id: {"after": sub["steps"][-1]["step_id"] if sub["steps"] else 0, "header_digest": held["digests"][sub_id]}
639
+ for sub_id, sub in held["subs"].items()}}
640
+
641
+
642
+ def test_a_cursor_read_serves_a_running_sub_agents_new_steps_while_the_call_that_started_it_waits() -> None:
643
+ hold = _Hold()
644
+ held: dict[str, Any] = {"subs": {}, "steps": []}
645
+ with _serving(_toy(hold)) as client:
646
+ task_id = _send(client, "running t1", "m-1")
647
+ hold.reached()
648
+ first = _atif(client, task_id=task_id, after=0, header_digest="", subagent_cursors={})
649
+ plain = _atif(client, task_id=task_id, after=0)
650
+ follow = _held(first, held)
651
+ hold.resume.set()
652
+ hold.reached(2)
653
+ second = _atif(client, task_id=task_id, **follow)
654
+ plain_second = _atif(client, task_id=task_id, after=plain["next"])
655
+ again = _atif(client, task_id=task_id, **_held(second, held))
656
+ hold.resume.set()
657
+ _ended(client, task_id)
658
+ [sub] = first["subagents"]
659
+ assert [step["step_id"] for step in sub["steps"]] == [1] and sub["agent"]["name"] == "explorer"
660
+ assert first["subagent_header_digests"] == {"t1-sub": first["subagent_header_digests"]["t1-sub"]}
661
+ # The call that started it still waits: today's read serves nothing of it, a cursor read its new step alone.
662
+ assert second["events"] == [] and plain_second["events"] == [] and plain_second["subagents"] == []
663
+ assert [(s["trajectory_id"], [step["step_id"] for step in s["steps"]], "agent" in s) for s in second["subagents"]] \
664
+ == [("t1-sub", [2], False)]
665
+ assert again["subagents"] == [] and "header" not in again
666
+
667
+
668
+ def test_a_read_naming_its_headers_digest_gets_the_header_only_when_it_changed() -> None:
669
+ hold = _Hold()
670
+ with _serving(_toy(hold)) as client:
671
+ task_id = _send(client, "grow t1", "m-1")
672
+ hold.reached()
673
+ first = _atif(client, task_id=task_id, after=0, header_digest="")
674
+ same = _atif(client, task_id=task_id, after=first["next"], header_digest=first["header_digest"])
675
+ plain = _atif(client, task_id=task_id, after=0)
676
+ hold.resume.set()
677
+ _ended(client, task_id)
678
+ ended = _atif(client, task_id=task_id, after=same["next"], header_digest=first["header_digest"])
679
+ assert first["header"] == plain["header"] and first["header_digest"].startswith("sha256:")
680
+ assert "header" not in same and same["header_digest"] == first["header_digest"]
681
+ # The task's end gives the header its final metrics, so it's served again under another digest.
682
+ assert ended["header"]["final_metrics"] and ended["header_digest"] != first["header_digest"]
683
+ assert "header_digest" not in plain and "subagent_header_digests" not in plain
684
+
685
+
686
+ def test_a_reader_following_with_cursors_rebuilds_the_tasks_document() -> None:
687
+ hold = _Hold()
688
+ held: dict[str, Any] = {"subs": {}, "steps": []}
689
+ with _serving(_toy(hold)) as client:
690
+ task_id = _send(client, "running t1", "m-1")
691
+ follow = {"after": 0, "header_digest": "", "subagent_cursors": {}}
692
+ for _ in range(2):
693
+ hold.reached(_ + 1)
694
+ follow = _held(_atif(client, task_id=task_id, **follow), held)
695
+ hold.resume.set()
696
+ _ended(client, task_id)
697
+ while True:
698
+ page = _atif(client, task_id=task_id, **follow)
699
+ follow = _held(page, held)
700
+ if not page["has_more"] and page["state"] == "completed":
701
+ break
702
+ document = _atif(client, task_id=task_id)["trajectory"]
703
+ rebuilt = {**held["header"], "steps": held["steps"], "subagent_trajectories": list(held["subs"].values())}
704
+ assert rebuilt == document
705
+
706
+
613
707
  def test_a_spawn_its_task_ended_without_answering_keeps_its_sub_agent_referenced() -> None:
614
708
  hold = _Hold()
615
709
  with _serving(_toy(hold)) as client:
@@ -157,7 +157,7 @@ def test_live_card_advertises_the_cursor_reads() -> None:
157
157
  {"required": ["task_id", "objects"]},
158
158
  {"required": ["context_id"]},
159
159
  {"required": ["context_id", "objects"]},
160
- {"required": ["task_id", "after"], "optional": ["limit"]},
160
+ {"required": ["task_id", "after"], "optional": ["limit", "header_digest", "subagent_cursors"]},
161
161
  {"required": ["context_id", "after"], "optional": ["limit"]},
162
162
  ]
163
163
  }
@@ -166,6 +166,8 @@ def test_live_card_advertises_the_cursor_reads() -> None:
166
166
  assert card_request_accepts(request, {"task_id", "after", "limit"})
167
167
  assert card_request_accepts(request, {"context_id", "after"})
168
168
  assert card_request_accepts(request, {"task_id", "format"})
169
+ assert card_request_accepts(request, {"task_id", "after", "format", "header_digest", "subagent_cursors"})
170
+ assert not card_request_accepts(request, {"context_id", "after", "header_digest"})
169
171
  with pytest.raises(TypeError, match="live must be a boolean"):
170
172
  enable(TRAJECTORY_V1, live="yes")
171
173