agentenv-framework-protocol 0.1.667__tar.gz → 0.1.668__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 (267) hide show
  1. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/PKG-INFO +25 -9
  2. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/README.md +24 -8
  3. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/pyproject.toml +1 -1
  4. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/computer/__init__.py +3 -2
  5. agentenv_framework_protocol-0.1.668/src/agentenv_protocol/computer/_adb.py +143 -0
  6. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/computer/card.py +4 -5
  7. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/computer/checks.py +20 -0
  8. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/computer/conformance/checks.py +24 -2
  9. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/computer/dataplane.py +33 -8
  10. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/computer/driver.py +25 -4
  11. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/computer/operations.py +3 -1
  12. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/computer/platform.py +1 -1
  13. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/computer/recording.py +1 -2
  14. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/computer/skill.py +6 -1
  15. agentenv_framework_protocol-0.1.668/tests/fake_adb.py +46 -0
  16. agentenv_framework_protocol-0.1.668/tests/test_computer_beside.py +215 -0
  17. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_computer_driver.py +9 -3
  18. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/.gitignore +0 -0
  19. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/LICENSE +0 -0
  20. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/NOTICE +0 -0
  21. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/THIRD_PARTY_NOTICES.md +0 -0
  22. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/examples/__init__.py +0 -0
  23. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/examples/advanced_agent.py +0 -0
  24. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/examples/basic_agent.py +0 -0
  25. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/examples/custom_extensions_agent.py +0 -0
  26. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/examples/multimodal_agent.py +0 -0
  27. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/examples/reference_model.py +0 -0
  28. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/examples/streaming_agent.py +0 -0
  29. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/examples/website/notes/.gitignore +0 -0
  30. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/examples/website/notes/Dockerfile +0 -0
  31. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/examples/website/notes/Dockerfile.dockerignore +0 -0
  32. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/examples/website/notes/README.md +0 -0
  33. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/examples/website/notes/data/seed.json +0 -0
  34. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/examples/website/notes/env.toml +0 -0
  35. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/examples/website/notes/site.py +0 -0
  36. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/examples/website/notes/web/index.html +0 -0
  37. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/examples/website/notes/web/package-lock.json +0 -0
  38. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/examples/website/notes/web/package.json +0 -0
  39. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/examples/website/notes/web/src/main.js +0 -0
  40. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/examples/website/notes/web/src/style.css +0 -0
  41. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/examples/website/notes/web/vite.config.js +0 -0
  42. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/__init__.py +0 -0
  43. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/a2a_agent/__init__.py +0 -0
  44. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/a2a_agent/_atif_copy.py +0 -0
  45. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/a2a_agent/_media_spool.py +0 -0
  46. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/a2a_agent/_secrets.py +0 -0
  47. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/a2a_agent/_snapshot_state.py +0 -0
  48. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/a2a_agent/_trajectory_log.py +0 -0
  49. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/a2a_agent/_triggers.py +0 -0
  50. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/a2a_agent/_turn_index.py +0 -0
  51. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/a2a_agent/clock.py +0 -0
  52. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/a2a_agent/control_token.py +0 -0
  53. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/a2a_agent/extensions.py +0 -0
  54. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/a2a_agent/framework.py +0 -0
  55. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/a2a_agent/peer_agents.py +0 -0
  56. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/a2a_agent/proxy.py +0 -0
  57. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/a2a_agent/registry.py +0 -0
  58. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/a2a_agent/staging.py +0 -0
  59. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/a2a_agent/tasks/__init__.py +0 -0
  60. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/a2a_agent/tasks/v1.py +0 -0
  61. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/agent_env_environment.py +0 -0
  62. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/atif/PROFILE.md +0 -0
  63. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/atif/__init__.py +0 -0
  64. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/atif/__main__.py +0 -0
  65. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/atif/_image_size.py +0 -0
  66. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/atif/adapter.py +0 -0
  67. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/atif/builder.py +0 -0
  68. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/atif/fixtures/coding.json +0 -0
  69. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/atif/fixtures/coding.stripped.json +0 -0
  70. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/atif/fixtures/computer_use.json +0 -0
  71. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/atif/fixtures/late_result.json +0 -0
  72. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/atif/fixtures/media/482405b002a62efa8516c36709a7a100637507670576fa73a20ad5420d55c66f.png +0 -0
  73. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/atif/fixtures/media/55c64d0fcd6f9d5f7c828093857e3fdfda68478bb4e9bd24d481ef391c7804e8.heic +0 -0
  74. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/atif/fixtures/media/67905ad3cc2dd52b1f5f6a6d2814de0396618b29b4238b9af5207aeb69936e6d.mp4 +0 -0
  75. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/atif/fixtures/media/69a8aa01fe5537076d023dd5e9cc4275b39fc0434aa6483a9f58b66ef2f3c896.png +0 -0
  76. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/atif/fixtures/media/82e60066a2de261b6653bcdda90d1cb9a7af2f474cecd82e8d371e8384d72315.png +0 -0
  77. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/atif/fixtures/media/845e91831319e89c4d656bdb80c278ac09a7230d61e5dfd2e1b1fbb436ac8917.pdf +0 -0
  78. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/atif/fixtures/multi_agent.json +0 -0
  79. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/atif/fixtures/odd_parts.json +0 -0
  80. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/atif/fixtures/subagent.json +0 -0
  81. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/atif/fixtures/two_turns.json +0 -0
  82. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/atif/kit.py +0 -0
  83. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/atif/models/LICENSE +0 -0
  84. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/atif/models/VENDORED.md +0 -0
  85. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/atif/models/__init__.py +0 -0
  86. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/atif/models/agent.py +0 -0
  87. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/atif/models/content.py +0 -0
  88. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/atif/models/final_metrics.py +0 -0
  89. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/atif/models/metrics.py +0 -0
  90. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/atif/models/observation.py +0 -0
  91. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/atif/models/observation_result.py +0 -0
  92. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/atif/models/step.py +0 -0
  93. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/atif/models/subagent_trajectory_ref.py +0 -0
  94. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/atif/models/tool_call.py +0 -0
  95. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/atif/models/trajectory.py +0 -0
  96. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/atif/profile.py +0 -0
  97. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/atif/reader.py +0 -0
  98. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/atif/runner.py +0 -0
  99. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/atif/served.py +0 -0
  100. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/atif/validator.py +0 -0
  101. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/client.py +0 -0
  102. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/computer/_declare.py +0 -0
  103. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/computer/_desktop.py +0 -0
  104. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/computer/_job.py +0 -0
  105. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/computer/_linux.py +0 -0
  106. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/computer/_load.py +0 -0
  107. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/computer/_macos.py +0 -0
  108. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/computer/_reaping.py +0 -0
  109. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/computer/_session_posix.py +0 -0
  110. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/computer/_session_windows.py +0 -0
  111. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/computer/_windows.py +0 -0
  112. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/computer/_with_fds.py +0 -0
  113. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/computer/_x11.py +0 -0
  114. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/computer/annotate.py +0 -0
  115. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/computer/app.py +0 -0
  116. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/computer/app_data.py +0 -0
  117. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/computer/app_runtime.py +0 -0
  118. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/computer/apps.py +0 -0
  119. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/computer/clock.py +0 -0
  120. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/computer/conformance/__init__.py +0 -0
  121. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/computer/conformance/__main__.py +0 -0
  122. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/computer/conformance/client.py +0 -0
  123. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/computer/conformance/desk.py +0 -0
  124. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/computer/conformance/fixture.py +0 -0
  125. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/computer/conformance/mp4.py +0 -0
  126. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/computer/conformance/page_fixture.py +0 -0
  127. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/computer/conformance/report.py +0 -0
  128. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/computer/conformance/wayland_fixture.py +0 -0
  129. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/computer/errors.py +0 -0
  130. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/computer/extensions.py +0 -0
  131. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/computer/frames.py +0 -0
  132. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/computer/keys.py +0 -0
  133. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/computer/launch.py +0 -0
  134. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/computer/manifest.py +0 -0
  135. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/computer/prefix.py +0 -0
  136. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/computer/queue.py +0 -0
  137. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/computer/results.py +0 -0
  138. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/computer/run_install_step.py +0 -0
  139. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/computer/runtime.py +0 -0
  140. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/computer/seed.py +0 -0
  141. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/computer/serve.py +0 -0
  142. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/computer/serve_app.py +0 -0
  143. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/computer/served.py +0 -0
  144. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/computer/session.py +0 -0
  145. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/computer/settings.py +0 -0
  146. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/computer/spaces.py +0 -0
  147. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/computer/svc.py +0 -0
  148. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/computer/tools.py +0 -0
  149. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/errors.py +0 -0
  150. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/manifest.py +0 -0
  151. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/passthrough.py +0 -0
  152. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/preflight.py +0 -0
  153. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/tool_access.py +0 -0
  154. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/tool_client.py +0 -0
  155. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/tool_context.py +0 -0
  156. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/transfers.py +0 -0
  157. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/types.py +0 -0
  158. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/website/__init__.py +0 -0
  159. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/website/clock.py +0 -0
  160. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/website/conformance.py +0 -0
  161. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/website/environment.py +0 -0
  162. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/website/errors.py +0 -0
  163. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/website/forwarding.py +0 -0
  164. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/website/readiness.py +0 -0
  165. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/website/routes.py +0 -0
  166. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/website/session.py +0 -0
  167. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/website_browser/__init__.py +0 -0
  168. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/website_browser/cdp.py +0 -0
  169. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/website_browser/contexts.py +0 -0
  170. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/website_browser/control.py +0 -0
  171. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/website_browser/data.py +0 -0
  172. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/website_browser/devtools.py +0 -0
  173. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/website_browser/environment.py +0 -0
  174. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/website_browser/log.py +0 -0
  175. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/website_browser/network.py +0 -0
  176. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/website_browser/recording.py +0 -0
  177. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/website_browser/scope.py +0 -0
  178. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/website_browser/shapes.py +0 -0
  179. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/src/agentenv_protocol/website_browser/stream.py +0 -0
  180. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/atif_cases.py +0 -0
  181. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/computer_fake.py +0 -0
  182. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/conftest.py +0 -0
  183. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/probe_fake.py +0 -0
  184. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_a2a_agent.py +0 -0
  185. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_a2a_agent_clock.py +0 -0
  186. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_a2a_agent_examples.py +0 -0
  187. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_a2a_atif_media.py +0 -0
  188. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_a2a_atif_prescribe.py +0 -0
  189. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_a2a_atif_scrubbing.py +0 -0
  190. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_a2a_atif_serving.py +0 -0
  191. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_a2a_atif_turns.py +0 -0
  192. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_a2a_cdp_config.py +0 -0
  193. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_a2a_object_transfers.py +0 -0
  194. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_a2a_peer_agents.py +0 -0
  195. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_a2a_proxy.py +0 -0
  196. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_a2a_staging.py +0 -0
  197. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_a2a_trajectory_log.py +0 -0
  198. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_agent_env_environment.py +0 -0
  199. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_atif_builder.py +0 -0
  200. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_atif_fixtures.py +0 -0
  201. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_atif_kit.py +0 -0
  202. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_atif_profile.py +0 -0
  203. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_atif_reader.py +0 -0
  204. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_atif_validator.py +0 -0
  205. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_atif_vendored.py +0 -0
  206. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_browser_cdp.py +0 -0
  207. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_browser_contexts.py +0 -0
  208. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_browser_data.py +0 -0
  209. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_browser_log.py +0 -0
  210. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_browser_network.py +0 -0
  211. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_browser_recording.py +0 -0
  212. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_browser_state.py +0 -0
  213. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_client.py +0 -0
  214. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_computer_app_data.py +0 -0
  215. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_computer_app_server.py +0 -0
  216. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_computer_clock.py +0 -0
  217. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_computer_conformance.py +0 -0
  218. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_computer_conformance_attempts.py +0 -0
  219. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_computer_conformance_checks.py +0 -0
  220. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_computer_conformance_page.py +0 -0
  221. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_computer_conformance_recording.py +0 -0
  222. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_computer_dataplane.py +0 -0
  223. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_computer_declare.py +0 -0
  224. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_computer_driver_keys.py +0 -0
  225. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_computer_extensions.py +0 -0
  226. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_computer_frames.py +0 -0
  227. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_computer_macos.py +0 -0
  228. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_computer_page.py +0 -0
  229. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_computer_queue.py +0 -0
  230. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_computer_recording.py +0 -0
  231. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_computer_recording_annotate.py +0 -0
  232. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_computer_screenshot_delay.py +0 -0
  233. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_computer_seed.py +0 -0
  234. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_computer_serve.py +0 -0
  235. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_computer_served.py +0 -0
  236. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_computer_session_windows.py +0 -0
  237. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_computer_spaces.py +0 -0
  238. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_computer_svc_forward.py +0 -0
  239. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_computer_tool_prefix.py +0 -0
  240. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_computer_windows_driver.py +0 -0
  241. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_control_token.py +0 -0
  242. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_data_objects.py +0 -0
  243. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_devtools_pipe.py +0 -0
  244. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_errors.py +0 -0
  245. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_extension_methods.py +0 -0
  246. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_intake.py +0 -0
  247. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_manifest.py +0 -0
  248. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_preflight.py +0 -0
  249. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_rpc_keepalive.py +0 -0
  250. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_tool_access.py +0 -0
  251. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_tool_annotations.py +0 -0
  252. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_tool_client.py +0 -0
  253. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_tool_context.py +0 -0
  254. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_tool_context_fastmcp.py +0 -0
  255. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_tool_context_injection.py +0 -0
  256. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_tool_defers.py +0 -0
  257. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_usage.py +0 -0
  258. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_usage_models.py +0 -0
  259. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_website_api.py +0 -0
  260. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_website_browser.py +0 -0
  261. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_website_conformance.py +0 -0
  262. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_website_environment.py +0 -0
  263. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_website_forwarding.py +0 -0
  264. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_website_live.py +0 -0
  265. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_website_mcp.py +0 -0
  266. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/tests/test_website_notes_example.py +0 -0
  267. {agentenv_framework_protocol-0.1.667 → agentenv_framework_protocol-0.1.668}/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.667
3
+ Version: 0.1.668
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
@@ -722,7 +722,8 @@ class Store(ForwardingSite):
722
722
 
723
723
  ## Computer drivers
724
724
 
725
- A computer driver is what runs inside a computer an agent uses through screenshots and input. Write
725
+ A computer driver is what runs inside a computer an agent uses through screenshots and input, or
726
+ beside a device it reaches (see Where it runs below). Write
726
727
  one as a `ComputerDriverEnvironment` subclass from `agentenv_protocol.computer`, which needs the
727
728
  `computer` extra (`pip install 'agentenv-framework-protocol[computer]'`: mcp, uvicorn, Pillow and PyAV).
728
729
  The driver marks the methods that capture the screen and send input; the base class serves the
@@ -775,8 +776,9 @@ pixels), at the display's size times its scale. Input operations may return an `
775
776
  | `@pointer_move`, `@pointer_down`, `@pointer_up`, `@pointer_position` | all or none | `computer-pointer/v1` and its five tools; click and scroll at the pointer |
776
777
  | `@key_down`, `@key_up` | both or none | `computer-keyboard/v1` and its two tools |
777
778
  | `@navigate`, `@history`, `@tabs`, `@dialog`, `@upload`, `@page_state` | all or none, for a screen that is a website browser's page | `computer-page/v1` and its five tools; the `page` of every frame |
778
- | `@run_in_session` | no; a Linux default | `computer-exec/v1` |
779
- | `@write_files` | no; a Linux default | `data/add` |
779
+ | `@run_in_session` | no; a default on Linux, macOS, Windows and Android | `computer-exec/v1` |
780
+ | `@write_files` | no; a default on Linux, macOS, Windows and Android | `data/add` |
781
+ | `@read_files` | no; a default on Android | what `data/get` reads in place of the driver's own home |
780
782
  | `@record` | no | the stream `computer-recording/v1` records from; without it the base class polls `@capture` |
781
783
 
782
784
  The class is checked when it is defined: a missing required operation, half a group, two methods
@@ -784,13 +786,23 @@ for one operation that some platform could both match, or features that don't ma
784
786
  decorators raise `TypeError`. Predicates (`os`, `distribution`, `version`, `arch`, `display`)
785
787
  choose a method per platform, read from `/etc/os-release`, the machine and `XDG_SESSION_TYPE` or
786
788
  `DISPLAY`: `@capture(display="x11")` and `@capture(display="wayland")` can sit side by side. A
787
- driver's own `@run_in_session` or `@write_files` replaces the base class's Linux default, which runs
788
- as the driver's user inside the desktop session. The base class keeps its state in `self._computer`
789
+ driver's own `@run_in_session`, `@write_files` or `@read_files` replaces the base class's default for
790
+ its OS. On Linux, macOS and Windows that default acts as the driver's user inside the desktop
791
+ session. On Android it goes through adb (`AGENTENV_ADB`, else the `adb` on `PATH`, with adb's own
792
+ `ANDROID_SERIAL` and `ADB_SERVER_SOCKET`) as the device's `shell` user under `/sdcard`, and a written
793
+ file is announced to the media scanner. The base class keeps its state in `self._computer`
789
794
  and names its own members `_computer_*` and `computer_*`; a driver that redefines one of them, or
790
795
  another private member of the base class, is refused when it is defined, so a helper of the
791
796
  driver's can't silently replace one. What the optional operations give is served only when the
792
797
  driver has them, through the `served_tools`, `served_extensions` and `served_operations` hooks.
793
798
 
799
+ **Where it runs.** A driver runs `inside` its computer, as the session user, unless its class says
800
+ `placement = "beside"`. It then runs next to a device it reaches, such as an Android phone over
801
+ adb, and passes `__init__` the device's `Platform`, since what it would detect is its own host's.
802
+ `computer/v1`'s params carry `placement`. `provider`, a driver the device's provider serves, is
803
+ reserved, and a class that names it is refused. agent-env's `computer_driver` env names the placement in its
804
+ `env.toml` too, and a put where the two differ is refused.
805
+
794
806
  **What the base class serves:**
795
807
 
796
808
  - **Tools.** `computer_screenshot` (a frame: `frame_id`, image size, display resolution and scale;
@@ -839,9 +851,13 @@ driver has them, through the `served_tools`, `served_extensions` and `served_ope
839
851
  user's home, under the `data-objects/v1` marker (`{"path": ...}`), as inline bytes, an https URL,
840
852
  or a `transfers.ReadObject` read grant under the marker's `read`, and writes them atomically.
841
853
  `data/get` returns the files under the `paths` it's given, relative to the home, or under the
842
- card's `default_data_paths` (`Desktop`, `Documents`, `Downloads`) when it's given none, inline or
843
- uploaded under a `write_namespace` grant, leaving out the paths its apps keep their data in. An
844
- environment whose `@get_data` hook takes no `paths` refuses them.
854
+ card's `default_data_paths` when it's given none, inline or uploaded under a `write_namespace`
855
+ grant, leaving out the paths its apps keep their data in. The default paths are `Desktop`,
856
+ `Documents` and `Downloads`, unless the driver class declares its own
857
+ (`default_data_paths = ("Download", "DCIM")`): a tuple of normalized relative paths, checked when
858
+ the class is defined. With `@read_files`, `data/get` reads the files through it. A beside
859
+ driver's recordings, under `.agentenv-recordings`, still come from its own home. An environment
860
+ whose `@get_data` hook takes no `paths` refuses them.
845
861
  - **The card** (the name from `ENVIRONMENT_NAME`, then `@computer_driver`'s), and per-role tool
846
862
  access (`tool_access` is on).
847
863
 
@@ -651,7 +651,8 @@ class Store(ForwardingSite):
651
651
 
652
652
  ## Computer drivers
653
653
 
654
- A computer driver is what runs inside a computer an agent uses through screenshots and input. Write
654
+ A computer driver is what runs inside a computer an agent uses through screenshots and input, or
655
+ beside a device it reaches (see Where it runs below). Write
655
656
  one as a `ComputerDriverEnvironment` subclass from `agentenv_protocol.computer`, which needs the
656
657
  `computer` extra (`pip install 'agentenv-framework-protocol[computer]'`: mcp, uvicorn, Pillow and PyAV).
657
658
  The driver marks the methods that capture the screen and send input; the base class serves the
@@ -704,8 +705,9 @@ pixels), at the display's size times its scale. Input operations may return an `
704
705
  | `@pointer_move`, `@pointer_down`, `@pointer_up`, `@pointer_position` | all or none | `computer-pointer/v1` and its five tools; click and scroll at the pointer |
705
706
  | `@key_down`, `@key_up` | both or none | `computer-keyboard/v1` and its two tools |
706
707
  | `@navigate`, `@history`, `@tabs`, `@dialog`, `@upload`, `@page_state` | all or none, for a screen that is a website browser's page | `computer-page/v1` and its five tools; the `page` of every frame |
707
- | `@run_in_session` | no; a Linux default | `computer-exec/v1` |
708
- | `@write_files` | no; a Linux default | `data/add` |
708
+ | `@run_in_session` | no; a default on Linux, macOS, Windows and Android | `computer-exec/v1` |
709
+ | `@write_files` | no; a default on Linux, macOS, Windows and Android | `data/add` |
710
+ | `@read_files` | no; a default on Android | what `data/get` reads in place of the driver's own home |
709
711
  | `@record` | no | the stream `computer-recording/v1` records from; without it the base class polls `@capture` |
710
712
 
711
713
  The class is checked when it is defined: a missing required operation, half a group, two methods
@@ -713,13 +715,23 @@ for one operation that some platform could both match, or features that don't ma
713
715
  decorators raise `TypeError`. Predicates (`os`, `distribution`, `version`, `arch`, `display`)
714
716
  choose a method per platform, read from `/etc/os-release`, the machine and `XDG_SESSION_TYPE` or
715
717
  `DISPLAY`: `@capture(display="x11")` and `@capture(display="wayland")` can sit side by side. A
716
- driver's own `@run_in_session` or `@write_files` replaces the base class's Linux default, which runs
717
- as the driver's user inside the desktop session. The base class keeps its state in `self._computer`
718
+ driver's own `@run_in_session`, `@write_files` or `@read_files` replaces the base class's default for
719
+ its OS. On Linux, macOS and Windows that default acts as the driver's user inside the desktop
720
+ session. On Android it goes through adb (`AGENTENV_ADB`, else the `adb` on `PATH`, with adb's own
721
+ `ANDROID_SERIAL` and `ADB_SERVER_SOCKET`) as the device's `shell` user under `/sdcard`, and a written
722
+ file is announced to the media scanner. The base class keeps its state in `self._computer`
718
723
  and names its own members `_computer_*` and `computer_*`; a driver that redefines one of them, or
719
724
  another private member of the base class, is refused when it is defined, so a helper of the
720
725
  driver's can't silently replace one. What the optional operations give is served only when the
721
726
  driver has them, through the `served_tools`, `served_extensions` and `served_operations` hooks.
722
727
 
728
+ **Where it runs.** A driver runs `inside` its computer, as the session user, unless its class says
729
+ `placement = "beside"`. It then runs next to a device it reaches, such as an Android phone over
730
+ adb, and passes `__init__` the device's `Platform`, since what it would detect is its own host's.
731
+ `computer/v1`'s params carry `placement`. `provider`, a driver the device's provider serves, is
732
+ reserved, and a class that names it is refused. agent-env's `computer_driver` env names the placement in its
733
+ `env.toml` too, and a put where the two differ is refused.
734
+
723
735
  **What the base class serves:**
724
736
 
725
737
  - **Tools.** `computer_screenshot` (a frame: `frame_id`, image size, display resolution and scale;
@@ -768,9 +780,13 @@ driver has them, through the `served_tools`, `served_extensions` and `served_ope
768
780
  user's home, under the `data-objects/v1` marker (`{"path": ...}`), as inline bytes, an https URL,
769
781
  or a `transfers.ReadObject` read grant under the marker's `read`, and writes them atomically.
770
782
  `data/get` returns the files under the `paths` it's given, relative to the home, or under the
771
- card's `default_data_paths` (`Desktop`, `Documents`, `Downloads`) when it's given none, inline or
772
- uploaded under a `write_namespace` grant, leaving out the paths its apps keep their data in. An
773
- environment whose `@get_data` hook takes no `paths` refuses them.
783
+ card's `default_data_paths` when it's given none, inline or uploaded under a `write_namespace`
784
+ grant, leaving out the paths its apps keep their data in. The default paths are `Desktop`,
785
+ `Documents` and `Downloads`, unless the driver class declares its own
786
+ (`default_data_paths = ("Download", "DCIM")`): a tuple of normalized relative paths, checked when
787
+ the class is defined. With `@read_files`, `data/get` reads the files through it. A beside
788
+ driver's recordings, under `.agentenv-recordings`, still come from its own home. An environment
789
+ whose `@get_data` hook takes no `paths` refuses them.
774
790
  - **The card** (the name from `ENVIRONMENT_NAME`, then `@computer_driver`'s), and per-role tool
775
791
  access (`tool_access` is on).
776
792
 
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "agentenv-framework-protocol"
3
- version = "0.1.667"
3
+ version = "0.1.668"
4
4
  description = "Open data-plane protocol and server SDK for agent environments."
5
5
  readme = "README.md"
6
6
  license = "Apache-2.0"
@@ -71,6 +71,7 @@ from .operations import (
71
71
  pointer_position,
72
72
  pointer_up,
73
73
  press,
74
+ read_files,
74
75
  record,
75
76
  run_in_session,
76
77
  scroll,
@@ -138,8 +139,8 @@ __all__ = [
138
139
  "display", "set_display", "capture", "click", "drag", "scroll", "type_text", "press",
139
140
  "pointer_move", "pointer_down", "pointer_up", "pointer_position", "key_down", "key_up",
140
141
  "navigate", "history", "tabs", "dialog", "upload", "page_state",
141
- "run_in_session", "write_files", "record", "Recording", "RecordHints", "RecordedFrame", "RecordedSegment",
142
- "frames_in_thread", "RecordingManifest", "ManifestSegment",
142
+ "run_in_session", "write_files", "read_files", "record", "Recording", "RecordHints", "RecordedFrame",
143
+ "RecordedSegment", "frames_in_thread", "RecordingManifest", "ManifestSegment",
143
144
  "ComputerError", "InvalidArgument", "OutOfBounds", "StaleFrame", "InputBusy", "PermissionDenied", "Unsupported",
144
145
  "BackgroundUnavailable", "TargetUnavailable", "DeviceUnavailable", "DialogOpen", "LimitExceeded", "Timeout",
145
146
  "DeliveryFailed",
@@ -0,0 +1,143 @@
1
+ """The base class's defaults for the OS operations on Android, for a driver beside the device: each goes through adb
2
+ (``AGENTENV_ADB``, else the one on PATH, with adb's own ``ANDROID_SERIAL`` and ``ADB_SERVER_SOCKET``) as the device's
3
+ ``shell`` user, under /sdcard."""
4
+ from __future__ import annotations
5
+
6
+ import asyncio
7
+ import contextlib
8
+ import os
9
+ import shlex
10
+ import tempfile
11
+ import uuid
12
+ from pathlib import Path, PurePosixPath
13
+
14
+ from ._linux import DRAIN_S, _Capped
15
+ from .errors import DeliveryFailed, DeviceUnavailable, InvalidArgument
16
+ from .operations import ExecResult
17
+
18
+ #: Who the device's commands run as, and the home they run in, which the computer skill names to the agent.
19
+ USER = "shell"
20
+ HOME = PurePosixPath("/sdcard")
21
+ #: How long one adb call the defaults make for their own bookkeeping may take; a push or pull, ``TRANSFER_TIMEOUT_S``.
22
+ ADB_TIMEOUT_S = 60
23
+ TRANSFER_TIMEOUT_S = 600
24
+ #: What the device's shell prints on stderr before it runs a command, so what adb printed before it is adb's own.
25
+ STARTED = b"agentenv-started\n"
26
+ #: The most of stderr adb's own messages may fill before ``STARTED``, as when it starts its server.
27
+ ADB_PREAMBLE_BYTES = 4096
28
+ #: What the device's shell prints on stderr, exiting ``NOT_FOUND_EXIT``, when the folder or the program isn't there.
29
+ CANNOT_RUN = "agentenv-cannot-run:"
30
+ NOT_FOUND_EXIT = 127
31
+ #: How much of what the device answered an error quotes.
32
+ SHOWN_BYTES = 500
33
+ #: How many hex characters name the partial file a write pushes beside its target before renaming it over it.
34
+ PARTIAL_ID_CHARS = 12
35
+ #: The broadcast that has the media scanner list a written file, so gallery and file apps see it.
36
+ MEDIA_SCAN = "android.intent.action.MEDIA_SCANNER_SCAN_FILE"
37
+
38
+
39
+ async def run_in_session(argv: list[str], cwd: str | None, env: dict[str, str] | None, timeout_s: float, *,
40
+ output_bytes: int) -> ExecResult:
41
+ """The device's shell prints ``STARTED`` first, after any lines adb prints starting its server, so adb failing
42
+ is told apart from the command failing; and ``CANNOT_RUN`` when the folder or program isn't there."""
43
+ folder, program = shlex.quote(str(HOME / (cwd or ""))), shlex.quote(argv[0])
44
+ assignments = "".join(f"{shlex.quote(f'{name}={value}')} " for name, value in (env or {}).items())
45
+ lookup = f"PATH={shlex.quote(env['PATH'])}; " if env and "PATH" in env else ""
46
+ command = (f"echo agentenv-started >&2; "
47
+ f"cd {folder} 2>/dev/null || {_refused('no such folder')}; "
48
+ f"({lookup}command -v {program}) >/dev/null 2>&1 || {_refused('not found')}; "
49
+ f"exec {'env ' + assignments if assignments else ''}{shlex.join(argv)}")
50
+ process = await _spawn("shell", command)
51
+ stdout, stderr = _Capped(output_bytes), _Capped(output_bytes + len(STARTED) + ADB_PREAMBLE_BYTES)
52
+ readers = asyncio.gather(stdout.read(process.stdout), stderr.read(process.stderr))
53
+ timed_out = False
54
+ try:
55
+ await asyncio.wait_for(process.wait(), timeout_s)
56
+ except BaseException as e:
57
+ await _stopped(process)
58
+ if not isinstance(e, asyncio.TimeoutError):
59
+ readers.cancel()
60
+ raise
61
+ timed_out = True
62
+ with contextlib.suppress(asyncio.TimeoutError):
63
+ await asyncio.wait_for(readers, DRAIN_S)
64
+ start = stderr.kept.find(STARTED, 0, ADB_PREAMBLE_BYTES + len(STARTED))
65
+ if start < 0 and not timed_out:
66
+ raise DeviceUnavailable(f"adb didn't start {argv[0]!r} on the device: "
67
+ f"{stderr.kept.decode(errors='replace').strip()[:SHOWN_BYTES]}")
68
+ said = bytes(stderr.kept[start + len(STARTED):] if start >= 0 else stderr.kept)
69
+ if process.returncode == NOT_FOUND_EXIT and said.startswith(CANNOT_RUN.encode()):
70
+ why = said.decode(errors="replace").removeprefix(CANNOT_RUN).strip()
71
+ raise InvalidArgument(f"cannot run {argv[0]!r} in {cwd or '~'!r}: {why} on the device")
72
+ return ExecResult(exit_code=None if timed_out else process.returncode, stdout=bytes(stdout.kept),
73
+ stderr=said[:output_bytes], timed_out=timed_out,
74
+ truncated=stdout.cut or stderr.cut or len(said) > output_bytes)
75
+
76
+
77
+ async def write_files(files: dict[str, bytes]) -> None:
78
+ """Each file is pushed beside its target and renamed over it, so it lands whole or not at all, then announced to
79
+ the media scanner so the gallery and file apps list it."""
80
+ for relative, data in files.items():
81
+ target = HOME / relative
82
+ partial = target.parent / f".agentenv-{uuid.uuid4().hex[:PARTIAL_ID_CHARS]}.part"
83
+ with tempfile.TemporaryDirectory() as scratch:
84
+ local = Path(scratch) / target.name
85
+ local.write_bytes(data)
86
+ made = await _adb("shell", f"mkdir -p {shlex.quote(str(target.parent))} && "
87
+ f"if [ -d {shlex.quote(str(target))} ]; then echo folder; fi")
88
+ if made.strip() == b"folder":
89
+ raise InvalidArgument(f"{relative!r} is a folder on the device, not a file")
90
+ try:
91
+ await _adb("push", str(local), str(partial), timeout_s=TRANSFER_TIMEOUT_S)
92
+ await _adb("shell", f"mv -f {shlex.quote(str(partial))} {shlex.quote(str(target))}")
93
+ except BaseException:
94
+ with contextlib.suppress(Exception):
95
+ await _adb("shell", f"rm -f {shlex.quote(str(partial))}")
96
+ raise
97
+ await _adb("shell", f"am broadcast -a {MEDIA_SCAN} -d {shlex.quote('file://' + str(target))}")
98
+
99
+
100
+ async def read_files(paths: list[str], into: Path) -> None:
101
+ """The device answers whether each path exists, so a missing one is told apart from adb failing."""
102
+ for relative in paths:
103
+ remote = str(HOME / relative)
104
+ answer = (await _adb("shell", f"if [ -e {shlex.quote(remote)} ]; then echo yes; else echo no; fi")).strip()
105
+ if answer == b"no":
106
+ continue
107
+ if answer != b"yes":
108
+ raise DeliveryFailed(f"the device didn't say whether {relative!r} exists: {answer[:SHOWN_BYTES]!r}")
109
+ (into / relative).parent.mkdir(parents=True, exist_ok=True)
110
+ await _adb("pull", remote, str((into / relative).parent), timeout_s=TRANSFER_TIMEOUT_S)
111
+
112
+
113
+ def _refused(why: str) -> str:
114
+ return f"{{ echo '{CANNOT_RUN} {why}' >&2; exit {NOT_FOUND_EXIT}; }}"
115
+
116
+
117
+ async def _spawn(*args: str) -> asyncio.subprocess.Process:
118
+ adb = os.environ.get("AGENTENV_ADB") or "adb"
119
+ try:
120
+ return await asyncio.create_subprocess_exec(adb, *args, stdin=asyncio.subprocess.DEVNULL,
121
+ stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE)
122
+ except FileNotFoundError:
123
+ raise DeviceUnavailable(f"{adb} is not installed") from None
124
+
125
+
126
+ async def _adb(*args: str, timeout_s: float = ADB_TIMEOUT_S) -> bytes:
127
+ process = await _spawn(*args)
128
+ try:
129
+ stdout, stderr = await asyncio.wait_for(process.communicate(), timeout_s)
130
+ except BaseException as e:
131
+ await _stopped(process)
132
+ if isinstance(e, asyncio.TimeoutError):
133
+ raise DeliveryFailed(f"adb {args[0]} gave no answer in {timeout_s:g}s") from None
134
+ raise
135
+ if process.returncode != 0:
136
+ raise DeliveryFailed(f"adb {args[0]}: {(stderr or stdout).decode(errors='replace').strip()}")
137
+ return stdout
138
+
139
+
140
+ async def _stopped(process: asyncio.subprocess.Process) -> None:
141
+ with contextlib.suppress(ProcessLookupError):
142
+ process.kill()
143
+ await process.wait()
@@ -6,7 +6,6 @@ from __future__ import annotations
6
6
  from typing import TYPE_CHECKING
7
7
 
8
8
  from . import clock
9
- from .dataplane import DEFAULT_DATA_PATHS
10
9
  from .recording import recording_params
11
10
  from ..types import METHOD_ADD, EnvironmentExtension, EnvironmentTool, IntakeDeclaration, IntakeFormat, intake_extension
12
11
 
@@ -89,16 +88,16 @@ def extension_params(driver: ComputerDriverEnvironment, uri: str) -> dict:
89
88
 
90
89
  def computer_features(driver: ComputerDriverEnvironment) -> dict:
91
90
  """computer/v1's params: what the seven tools take, how input is delivered, the platform, the default data paths,
92
- and that the driver takes its control token's sha256 (``CONTROL_TOKEN_SHA256_ENV``), so agent-env boots it with
93
- that and not the token."""
91
+ where the driver runs, and that the driver takes its control token's sha256 (``CONTROL_TOKEN_SHA256_ENV``), so
92
+ agent-env boots it with that and not the token."""
94
93
  return {
95
94
  "buttons": list(driver.buttons), "max_click_count": driver.max_click_count,
96
95
  "keys": driver.keys if driver.keys == "all" else list(driver.keys), "max_text_length": driver.max_text_length,
97
96
  "max_wait_ms": driver.max_wait_ms, "max_drag_points": driver.max_drag_points,
98
97
  "max_duration_ms": driver.max_duration_ms, "max_key_repeat": driver.max_key_repeat,
99
98
  "max_scroll_amount": driver.max_scroll_amount, "delivery": "foreground", "platform": driver.platform.as_dict(),
100
- "supports": list(driver.supports), "default_data_paths": list(DEFAULT_DATA_PATHS), "screen": driver.screen_kind,
101
- "control_token": CONTROL_TOKEN_SHA256,
99
+ "supports": list(driver.supports), "default_data_paths": list(driver.default_data_paths),
100
+ "screen": driver.screen_kind, "placement": driver.placement, "control_token": CONTROL_TOKEN_SHA256,
102
101
  }
103
102
 
104
103
 
@@ -2,13 +2,26 @@
2
2
  members leave the base class's own alone, and its features are in range."""
3
3
  from __future__ import annotations
4
4
 
5
+ from pydantic import ValidationError
6
+
5
7
  from ..errors import AgentEnvError
8
+ from .dataplane import RELATIVE_PATHS
6
9
  from .keys import canonical
7
10
  from .operations import declared
8
11
  from .recording import check_recording
9
12
  from .settings import MAX_SCREENSHOT_DELAY_MS, ComputerSettings
10
13
 
11
14
  BUTTONS = ("left", "right", "middle", "back", "forward")
15
+ #: Where a driver runs, its card's ``placement``: inside its computer, the default, or beside a device it reaches.
16
+ PLACEMENTS = ("inside", "beside")
17
+ DEFAULT_PLACEMENT = "inside"
18
+
19
+
20
+ def placement_problem(placement: object) -> str | None:
21
+ """What is wrong with a driver's placement, as its class or its driver env's env.toml gives it, or None."""
22
+ if placement == "provider":
23
+ return "placement provider, a driver its device's provider serves, isn't supported yet: use inside or beside"
24
+ return None if placement in PLACEMENTS else f"placement is inside or beside, got {placement!r}"
12
25
 
13
26
 
14
27
  def check_names(cls: type, base: type) -> None:
@@ -45,6 +58,13 @@ def check_features(cls: type) -> None:
45
58
  problems.append(f"Settings is ComputerSettings or a subclass of it, got {cls.Settings!r}")
46
59
  if cls.screen_kind not in ("desktop", "page"):
47
60
  problems.append(f"screen_kind is desktop or page, got {cls.screen_kind!r}")
61
+ if problem := placement_problem(cls.placement):
62
+ problems.append(problem)
63
+ try:
64
+ RELATIVE_PATHS.validate_python(cls.default_data_paths, strict=True)
65
+ except ValidationError:
66
+ problems.append(f"default_data_paths is a tuple of normalized paths relative to the session user's home, got "
67
+ f"{cls.default_data_paths!r}")
48
68
  if ("set_display" in declared(cls)) != bool(cls.display_modes):
49
69
  problems.append("display_modes and @set_display come together")
50
70
  problems += check_recording(cls.recording)
@@ -6,6 +6,7 @@ from __future__ import annotations
6
6
  import asyncio
7
7
  import base64
8
8
  import contextlib
9
+ import hashlib
9
10
  import io
10
11
  import json
11
12
  import math
@@ -54,6 +55,8 @@ DATA_PLANE = (INTAKE_EXTENSION_URI, DATA_OBJECTS_EXTENSION_URI)
54
55
  STAGE = ".agentenv-probe"
55
56
  #: How the probe reads a staged file's owner: through the python3 the fixture runs on, the same on every OS.
56
57
  OWNER = ("python3", "-c", "import os, sys; print(os.stat(sys.argv[1]).st_uid)")
58
+ #: How it reads the owner on Android, which has no python3: toybox's stat.
59
+ ANDROID_OWNER = ("stat", "-c", "%u")
57
60
  #: Where a page driver's computer_upload takes files from, relative to the session user's home.
58
61
  UPLOADS = "Uploads"
59
62
  #: What the probe answers the page fixture's prompt with.
@@ -144,6 +147,9 @@ class Probe:
144
147
  self.gtk = not self.page and platform.get("display") == "wayland"
145
148
  self.fixture = "page_fixture.py" if self.page else "wayland_fixture.py" if self.gtk else "fixture.py"
146
149
  self.windows = platform.get("os") == "windows"
150
+ self.android = platform.get("os") == "android"
151
+ #: Whether the driver runs beside the device, so the recordings it keeps are in its own home, not the device's.
152
+ self.beside = self.features.get("placement") == "beside"
147
153
  #: The chord that selects a text box's text: Tk's Ctrl+/, which the Tk desk binds everywhere, or on the GTK
148
154
  #: desk GTK's own Ctrl+A.
149
155
  self.select_all = ["Control", "a"] if self.gtk else ["Control", "/"]
@@ -690,7 +696,8 @@ class Probe:
690
696
 
691
697
  async def one_user() -> str | None:
692
698
  uid = (await self.driver.run("id", "-u"))["stdout"].strip()
693
- owner = (await self.driver.run(*OWNER, f"{STAGE}/{self.fixture}"))["stdout"].strip()
699
+ reader = ANDROID_OWNER if self.android else OWNER
700
+ owner = (await self.driver.run(*reader, f"{STAGE}/{self.fixture}"))["stdout"].strip()
694
701
  if uid == "0":
695
702
  return "commands run as root"
696
703
  return None if owner == uid else f"data/add wrote as uid {owner}, commands run as uid {uid}"
@@ -1177,8 +1184,11 @@ class Probe:
1177
1184
 
1178
1185
  async def _read_back(self, segment: ManifestSegment) -> bytes | str:
1179
1186
  """A segment a recording without a grant kept on the computer, read back and matched to its manifest entry's
1180
- size and digest; what is wrong, as a string, when it can't be."""
1187
+ size and digest; what is wrong, as a string, when it can't be. Beside a device, through data/get, which reads
1188
+ the recordings where the driver keeps them, needing no python3."""
1181
1189
  path = f"{RECORDINGS_DIR}/{segment.path}"
1190
+ if self.beside:
1191
+ return await self._read_back_through_data_get(segment, path)
1182
1192
  out = await self.driver.run("python3", "-c", READ_DIGEST, path)
1183
1193
  if out.get("exit_code") != 0:
1184
1194
  return f"segment {segment.index} couldn't be read back: {out.get('stderr', '')[-200:]}"
@@ -1196,6 +1206,18 @@ class Probe:
1196
1206
  data += read
1197
1207
  return data
1198
1208
 
1209
+ async def _read_back_through_data_get(self, segment: ManifestSegment, path: str) -> bytes | str:
1210
+ got = await self.driver.rpc("data/get", {"paths": [path]})
1211
+ parts = (got.get("result") or {}).get("parts")
1212
+ if not parts:
1213
+ return f"segment {segment.index} couldn't be read back through data/get: it answered {str(got)[:200]}"
1214
+ data = base64.b64decode(parts[0]["file"]["bytes"])
1215
+ digest = hashlib.sha256(data).hexdigest()
1216
+ if (len(data), digest) != (segment.bytes, segment.sha256):
1217
+ return f"segment {segment.index}'s file is {len(data)} bytes, sha256 {digest[:12]}; " \
1218
+ f"the manifest says {segment.bytes}, {segment.sha256[:12]}"
1219
+ return data
1220
+
1199
1221
  async def _annotated_click(self, wire: dict, size: tuple[int, int], point: tuple[int, int],
1200
1222
  inside: tuple[int, int], was: tuple[int, int, int]) -> str | None:
1201
1223
  """What is wrong with an annotated recording of one click at frame pixel ``point`` of a frame ``size``, the
@@ -1,7 +1,8 @@
1
1
  """The data plane on a computer: ``data/add`` writes files under the session user's home, ``data/get`` returns the
2
- files under the paths its caller names, or under ``DEFAULT_DATA_PATHS`` when it names none, leaving out those under a
3
- path one of the computer's apps keeps its data in. Each file part names its path, relative to the home, under the
4
- ``data-objects/v1`` marker."""
2
+ files under the paths its caller names, or under the driver's ``default_data_paths`` when it names none, leaving out
3
+ those under a path one of the computer's apps keeps its data in. Each file part names its path, relative to the home,
4
+ under the ``data-objects/v1`` marker. A driver beside a device reads its files with ``@read_files``; the recordings
5
+ it keeps are in its own home."""
5
6
  from __future__ import annotations
6
7
 
7
8
  import base64
@@ -27,7 +28,10 @@ if TYPE_CHECKING:
27
28
  MAX_URL_BYTES = 1 << 30
28
29
  #: What ``data/get`` returns when its caller names no paths: the folders a desktop keeps its user's files in.
29
30
  DEFAULT_DATA_PATHS = ("Desktop", "Documents", "Downloads")
30
- _PATHS = TypeAdapter(list[RelativePath])
31
+ #: Where the base class writes recordings, relative to the driver's home, and keeps them when there is no grant.
32
+ RECORDINGS_DIR = ".agentenv-recordings"
33
+ #: Paths relative to the session user's home: those data/get is given, and a driver's ``default_data_paths``.
34
+ RELATIVE_PATHS = TypeAdapter(tuple[RelativePath, ...])
31
35
 
32
36
 
33
37
  class DataPlane:
@@ -35,6 +39,8 @@ class DataPlane:
35
39
 
36
40
  _computer: ComputerRuntime
37
41
  settings: ComputerSettings
42
+ default_data_paths: tuple[str, ...]
43
+ placement: str
38
44
 
39
45
  @add_data
40
46
  async def _computer_data_add(self, parts: list) -> None:
@@ -56,10 +62,20 @@ class DataPlane:
56
62
  async def _computer_data_get(self, write_namespace: Optional[WriteNamespaceGrant] = None,
57
63
  paths: Optional[list[str]] = None) -> list:
58
64
  try:
59
- named = _PATHS.validate_python(paths) if paths is not None else list(DEFAULT_DATA_PATHS)
65
+ named = list(RELATIVE_PATHS.validate_python(paths) if paths is not None else self.default_data_paths)
60
66
  except ValidationError:
61
67
  raise ValueError(f"data/get on a computer takes paths relative to the home, not {paths!r}") from None
62
- return await file_parts(Path.home(), named, write_namespace, leaving_out=await self._computer.app_paths())
68
+ leaving_out = await self._computer.app_paths()
69
+ if not self._computer.has("read_files"):
70
+ return await file_parts(Path.home(), named, write_namespace, leaving_out=leaving_out)
71
+ kept_here = [path for path in named
72
+ if self.placement == "beside" and PurePosixPath(path).is_relative_to(RECORDINGS_DIR)]
73
+ on_device = [path for path in named if path not in kept_here]
74
+ with tempfile.TemporaryDirectory() as into:
75
+ if on_device:
76
+ await self._computer.call("read_files", on_device, Path(into))
77
+ return await parts_of(listed(Path(into), on_device, leaving_out) + listed(Path.home(), kept_here),
78
+ write_namespace)
63
79
 
64
80
 
65
81
  async def file_parts(home: Path, paths: list[str], write_namespace: Optional[WriteNamespaceGrant],
@@ -67,8 +83,17 @@ async def file_parts(home: Path, paths: list[str], write_namespace: Optional[Wri
67
83
  """A part for each file under ``paths`` of ``home`` but under none of ``leaving_out``, naming its path relative to
68
84
  ``home``: uploaded under ``write_namespace`` when there is one, else inline. A file a running app removes before it's
69
85
  read is left out."""
70
- files = [(relative, source) for relative, source in data_files(home, paths)
71
- if not any(PurePosixPath(relative).is_relative_to(owned) for owned in leaving_out)]
86
+ return await parts_of(listed(home, paths, leaving_out), write_namespace)
87
+
88
+
89
+ def listed(home: Path, paths: list[str], leaving_out: list[str] = ()) -> list[tuple[str, Path]]:
90
+ return [(relative, source) for relative, source in data_files(home, paths)
91
+ if not any(PurePosixPath(relative).is_relative_to(owned) for owned in leaving_out)]
92
+
93
+
94
+ async def parts_of(files: list[tuple[str, Path]], write_namespace: Optional[WriteNamespaceGrant]) -> list:
95
+ """A part for each of ``files``, named by its relative path: all uploaded under one ``write_namespace``, whose
96
+ limits they share, when there is one, else inline."""
72
97
  parts = []
73
98
  if write_namespace is not None:
74
99
  uploader = NamespaceUploader(write_namespace)
@@ -21,9 +21,9 @@ from ..agent_env_environment import (_CARD_CONFIG_ATTR, _TOOL_ATTR, AgentEnvEnvi
21
21
  control_check, environment_card, read_only_tools)
22
22
  from ..tool_context import ToolContext
23
23
  from ..types import EnvironmentCard, EnvironmentExtension, EnvironmentTool
24
- from . import _linux, annotate, apps, card, svc
25
- from .checks import check_features, check_names
26
- from .dataplane import DataPlane
24
+ from . import _adb, _linux, annotate, apps, card, svc
25
+ from .checks import DEFAULT_PLACEMENT, check_features, check_names
26
+ from .dataplane import DEFAULT_DATA_PATHS, DataPlane
27
27
  from .errors import TargetUnavailable
28
28
  from .extensions import Extensions
29
29
  from .operations import ReadyCheck, check_class, default_for
@@ -63,6 +63,10 @@ class DriverDeclaration(BaseModel):
63
63
  platforms: list[DriverPlatform]
64
64
  settings: Optional[dict[str, Any]] = None
65
65
 
66
+ @property
67
+ def placement(self) -> str:
68
+ return next((p.features["placement"] for p in self.platforms if "placement" in p.features), DEFAULT_PLACEMENT)
69
+
66
70
 
67
71
  class ComputerDriverEnvironment(Tools, Extensions, DataPlane, AgentEnvEnvironment):
68
72
  """Subclass it and mark the methods that capture and send input (see ``operations``); the class is checked when
@@ -104,6 +108,11 @@ class ComputerDriverEnvironment(Tools, Extensions, DataPlane, AgentEnvEnvironmen
104
108
  #: What the computer's screen shows, its card's ``screen``: a ``desktop``, or a website browser's ``page``, its
105
109
  #: active tab.
106
110
  screen_kind: ClassVar[Literal["desktop", "page"]] = "desktop"
111
+ #: Where the driver runs, on its card: ``inside`` its computer as the session user, or ``beside`` a device it
112
+ #: reaches, such as a phone over adb, whose platform it passes to ``__init__``.
113
+ placement: ClassVar[Literal["inside", "beside"]] = DEFAULT_PLACEMENT
114
+ #: The folders under the session user's home that data/get returns when its caller names none, on the card.
115
+ default_data_paths: ClassVar[tuple[str, ...]] = DEFAULT_DATA_PATHS
107
116
  tool_access = True
108
117
  #: What the base class keeps for the driver, built by ``__init__``.
109
118
  _computer: ComputerRuntime | None = None
@@ -300,7 +309,7 @@ class ComputerDriverEnvironment(Tools, Extensions, DataPlane, AgentEnvEnvironmen
300
309
  if self._computer is None:
301
310
  raise TypeError(f"{type(self).__qualname__}.__init__ must call super().__init__()")
302
311
 
303
- # The defaults for the OS operations on Linux, macOS and Windows.
312
+ # The defaults for the OS operations on Linux, macOS and Windows, and from beside an Android device.
304
313
 
305
314
  @default_for("run_in_session", os=["linux", "macos", "windows"])
306
315
  async def _computer_linux_run_in_session(self, argv: list, cwd: str | None, env: dict | None, timeout_s: float):
@@ -310,6 +319,18 @@ class ComputerDriverEnvironment(Tools, Extensions, DataPlane, AgentEnvEnvironmen
310
319
  async def _computer_linux_write_files(self, files: dict) -> None:
311
320
  await asyncio.to_thread(_linux.write_files, files)
312
321
 
322
+ @default_for("run_in_session", os="android")
323
+ async def _computer_android_run_in_session(self, argv: list, cwd: str | None, env: dict | None, timeout_s: float):
324
+ return await _adb.run_in_session(argv, cwd, env, timeout_s, output_bytes=self.settings.exec_output_bytes)
325
+
326
+ @default_for("write_files", os="android")
327
+ async def _computer_android_write_files(self, files: dict) -> None:
328
+ await _adb.write_files(files)
329
+
330
+ @default_for("read_files", os="android")
331
+ async def _computer_android_read_files(self, paths: list, into: Path) -> None:
332
+ await _adb.read_files(paths, into)
333
+
313
334
 
314
335
  def computer_driver(name: str | None = None, *, supports: list | None = None) -> Callable:
315
336
  """Name a driver, its card's name unless ENVIRONMENT_NAME gives one, and declare the platforms it supports."""
@@ -11,6 +11,7 @@ Each operation is called with screen pixels, positionally, in the order below, a
11
11
  pointer_move(x, y), pointer_down(button), pointer_up(button), pointer_position() -> (x, y)
12
12
  key_down(keys), key_up(keys)
13
13
  run_in_session(argv, cwd, env, timeout_s) -> ExecResult write_files({path: bytes})
14
+ read_files(paths, into) copies the files under paths into the local folder into
14
15
  record(hints) -> an async iterator of RecordedFrame or RecordedSegment, until it is closed
15
16
 
16
17
  The page group, for a driver whose screen is a website browser's active tab:
@@ -37,7 +38,7 @@ GROUPS = {
37
38
  "keyboard": ("key_down", "key_up"),
38
39
  "page": ("navigate", "history", "tabs", "dialog", "upload", "page_state"),
39
40
  }
40
- OPTIONAL = ("set_display", "run_in_session", "write_files", "record")
41
+ OPTIONAL = ("set_display", "run_in_session", "write_files", "read_files", "record")
41
42
  INPUT = frozenset({"click", "drag", "scroll", "type_text", "press", "pointer_move", "pointer_down", "pointer_up",
42
43
  "key_down", "key_up", "navigate", "history", "tabs", "dialog", "upload"})
43
44
  #: The input a page's open dialog blocks, which is refused while one is open there.
@@ -173,6 +174,7 @@ upload = _marker("upload")
173
174
  page_state = _marker("page_state")
174
175
  run_in_session = _marker("run_in_session")
175
176
  write_files = _marker("write_files")
177
+ read_files = _marker("read_files")
176
178
  record = _marker("record")
177
179
 
178
180
 
@@ -16,7 +16,7 @@ _Entry = TypeVar("_Entry")
16
16
  #: The platform (``platform_key``) the computer's composer built an app for, which its server and install steps read in
17
17
  #: place of what /etc/os-release says, so they act on the install the image holds; unset outside a composed computer.
18
18
  PLATFORM_ENV = "AGENTENV_PLATFORM"
19
- _OS = {"linux": "linux", "darwin": "macos", "win32": "windows"}
19
+ _OS = {"linux": "linux", "darwin": "macos", "win32": "windows", "android": "android"}
20
20
 
21
21
 
22
22
  @dataclass(frozen=True)