agentenv-framework-protocol 0.1.609__tar.gz → 0.1.611__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 (254) hide show
  1. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/PKG-INFO +31 -1
  2. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/README.md +30 -0
  3. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/pyproject.toml +1 -1
  4. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/a2a_agent/_atif_copy.py +25 -14
  5. agentenv_framework_protocol-0.1.611/src/agentenv_protocol/a2a_agent/_secrets.py +265 -0
  6. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/a2a_agent/_trajectory_log.py +10 -5
  7. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/a2a_agent/framework.py +25 -3
  8. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/atif/PROFILE.md +2 -0
  9. agentenv_framework_protocol-0.1.611/tests/test_a2a_atif_scrubbing.py +399 -0
  10. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/.gitignore +0 -0
  11. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/LICENSE +0 -0
  12. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/NOTICE +0 -0
  13. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/THIRD_PARTY_NOTICES.md +0 -0
  14. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/examples/__init__.py +0 -0
  15. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/examples/advanced_agent.py +0 -0
  16. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/examples/basic_agent.py +0 -0
  17. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/examples/custom_extensions_agent.py +0 -0
  18. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/examples/multimodal_agent.py +0 -0
  19. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/examples/reference_model.py +0 -0
  20. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/examples/streaming_agent.py +0 -0
  21. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/examples/website/notes/.gitignore +0 -0
  22. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/examples/website/notes/Dockerfile +0 -0
  23. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/examples/website/notes/Dockerfile.dockerignore +0 -0
  24. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/examples/website/notes/README.md +0 -0
  25. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/examples/website/notes/data/seed.json +0 -0
  26. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/examples/website/notes/env.toml +0 -0
  27. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/examples/website/notes/site.py +0 -0
  28. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/examples/website/notes/web/index.html +0 -0
  29. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/examples/website/notes/web/package-lock.json +0 -0
  30. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/examples/website/notes/web/package.json +0 -0
  31. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/examples/website/notes/web/src/main.js +0 -0
  32. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/examples/website/notes/web/src/style.css +0 -0
  33. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/examples/website/notes/web/vite.config.js +0 -0
  34. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/__init__.py +0 -0
  35. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/a2a_agent/__init__.py +0 -0
  36. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/a2a_agent/_snapshot_state.py +0 -0
  37. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/a2a_agent/_triggers.py +0 -0
  38. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/a2a_agent/_turn_index.py +0 -0
  39. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/a2a_agent/clock.py +0 -0
  40. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/a2a_agent/control_token.py +0 -0
  41. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/a2a_agent/extensions.py +0 -0
  42. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/a2a_agent/peer_agents.py +0 -0
  43. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/a2a_agent/proxy.py +0 -0
  44. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/a2a_agent/registry.py +0 -0
  45. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/a2a_agent/staging.py +0 -0
  46. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/a2a_agent/tasks/__init__.py +0 -0
  47. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/a2a_agent/tasks/v1.py +0 -0
  48. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/agent_env_environment.py +0 -0
  49. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/atif/__init__.py +0 -0
  50. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/atif/__main__.py +0 -0
  51. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/atif/adapter.py +0 -0
  52. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/atif/builder.py +0 -0
  53. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/atif/fixtures/coding.json +0 -0
  54. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/atif/fixtures/coding.stripped.json +0 -0
  55. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/atif/fixtures/computer_use.json +0 -0
  56. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/atif/fixtures/late_result.json +0 -0
  57. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/atif/fixtures/media/482405b002a62efa8516c36709a7a100637507670576fa73a20ad5420d55c66f.png +0 -0
  58. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/atif/fixtures/media/55c64d0fcd6f9d5f7c828093857e3fdfda68478bb4e9bd24d481ef391c7804e8.heic +0 -0
  59. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/atif/fixtures/media/67905ad3cc2dd52b1f5f6a6d2814de0396618b29b4238b9af5207aeb69936e6d.mp4 +0 -0
  60. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/atif/fixtures/media/69a8aa01fe5537076d023dd5e9cc4275b39fc0434aa6483a9f58b66ef2f3c896.png +0 -0
  61. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/atif/fixtures/media/82e60066a2de261b6653bcdda90d1cb9a7af2f474cecd82e8d371e8384d72315.png +0 -0
  62. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/atif/fixtures/media/845e91831319e89c4d656bdb80c278ac09a7230d61e5dfd2e1b1fbb436ac8917.pdf +0 -0
  63. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/atif/fixtures/multi_agent.json +0 -0
  64. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/atif/fixtures/odd_parts.json +0 -0
  65. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/atif/fixtures/subagent.json +0 -0
  66. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/atif/fixtures/two_turns.json +0 -0
  67. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/atif/kit.py +0 -0
  68. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/atif/models/LICENSE +0 -0
  69. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/atif/models/VENDORED.md +0 -0
  70. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/atif/models/__init__.py +0 -0
  71. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/atif/models/agent.py +0 -0
  72. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/atif/models/content.py +0 -0
  73. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/atif/models/final_metrics.py +0 -0
  74. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/atif/models/metrics.py +0 -0
  75. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/atif/models/observation.py +0 -0
  76. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/atif/models/observation_result.py +0 -0
  77. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/atif/models/step.py +0 -0
  78. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/atif/models/subagent_trajectory_ref.py +0 -0
  79. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/atif/models/tool_call.py +0 -0
  80. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/atif/models/trajectory.py +0 -0
  81. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/atif/profile.py +0 -0
  82. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/atif/reader.py +0 -0
  83. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/atif/runner.py +0 -0
  84. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/atif/served.py +0 -0
  85. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/atif/validator.py +0 -0
  86. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/client.py +0 -0
  87. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/computer/__init__.py +0 -0
  88. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/computer/_declare.py +0 -0
  89. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/computer/_desktop.py +0 -0
  90. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/computer/_job.py +0 -0
  91. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/computer/_linux.py +0 -0
  92. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/computer/_load.py +0 -0
  93. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/computer/_macos.py +0 -0
  94. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/computer/_reaping.py +0 -0
  95. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/computer/_session_posix.py +0 -0
  96. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/computer/_session_windows.py +0 -0
  97. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/computer/_windows.py +0 -0
  98. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/computer/_with_fds.py +0 -0
  99. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/computer/_x11.py +0 -0
  100. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/computer/app.py +0 -0
  101. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/computer/app_data.py +0 -0
  102. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/computer/app_runtime.py +0 -0
  103. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/computer/apps.py +0 -0
  104. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/computer/card.py +0 -0
  105. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/computer/checks.py +0 -0
  106. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/computer/clock.py +0 -0
  107. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/computer/conformance/__init__.py +0 -0
  108. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/computer/conformance/__main__.py +0 -0
  109. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/computer/conformance/checks.py +0 -0
  110. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/computer/conformance/client.py +0 -0
  111. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/computer/conformance/desk.py +0 -0
  112. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/computer/conformance/fixture.py +0 -0
  113. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/computer/conformance/mp4.py +0 -0
  114. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/computer/conformance/page_fixture.py +0 -0
  115. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/computer/conformance/report.py +0 -0
  116. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/computer/conformance/wayland_fixture.py +0 -0
  117. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/computer/dataplane.py +0 -0
  118. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/computer/driver.py +0 -0
  119. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/computer/errors.py +0 -0
  120. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/computer/extensions.py +0 -0
  121. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/computer/frames.py +0 -0
  122. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/computer/keys.py +0 -0
  123. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/computer/launch.py +0 -0
  124. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/computer/manifest.py +0 -0
  125. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/computer/operations.py +0 -0
  126. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/computer/platform.py +0 -0
  127. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/computer/prefix.py +0 -0
  128. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/computer/queue.py +0 -0
  129. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/computer/recording.py +0 -0
  130. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/computer/results.py +0 -0
  131. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/computer/run_install_step.py +0 -0
  132. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/computer/runtime.py +0 -0
  133. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/computer/seed.py +0 -0
  134. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/computer/serve.py +0 -0
  135. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/computer/serve_app.py +0 -0
  136. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/computer/served.py +0 -0
  137. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/computer/session.py +0 -0
  138. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/computer/settings.py +0 -0
  139. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/computer/skill.py +0 -0
  140. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/computer/spaces.py +0 -0
  141. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/computer/svc.py +0 -0
  142. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/computer/tools.py +0 -0
  143. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/errors.py +0 -0
  144. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/manifest.py +0 -0
  145. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/passthrough.py +0 -0
  146. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/preflight.py +0 -0
  147. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/tool_access.py +0 -0
  148. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/tool_client.py +0 -0
  149. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/tool_context.py +0 -0
  150. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/transfers.py +0 -0
  151. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/types.py +0 -0
  152. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/website/__init__.py +0 -0
  153. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/website/clock.py +0 -0
  154. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/website/conformance.py +0 -0
  155. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/website/environment.py +0 -0
  156. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/website/errors.py +0 -0
  157. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/website/forwarding.py +0 -0
  158. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/website/readiness.py +0 -0
  159. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/website/routes.py +0 -0
  160. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/website/session.py +0 -0
  161. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/website_browser/__init__.py +0 -0
  162. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/website_browser/cdp.py +0 -0
  163. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/website_browser/contexts.py +0 -0
  164. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/website_browser/control.py +0 -0
  165. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/website_browser/data.py +0 -0
  166. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/website_browser/devtools.py +0 -0
  167. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/website_browser/environment.py +0 -0
  168. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/website_browser/log.py +0 -0
  169. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/website_browser/network.py +0 -0
  170. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/website_browser/recording.py +0 -0
  171. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/website_browser/scope.py +0 -0
  172. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/website_browser/shapes.py +0 -0
  173. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/src/agentenv_protocol/website_browser/stream.py +0 -0
  174. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/atif_cases.py +0 -0
  175. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/computer_fake.py +0 -0
  176. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/conftest.py +0 -0
  177. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/probe_fake.py +0 -0
  178. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_a2a_agent.py +0 -0
  179. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_a2a_agent_clock.py +0 -0
  180. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_a2a_agent_examples.py +0 -0
  181. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_a2a_atif_serving.py +0 -0
  182. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_a2a_atif_turns.py +0 -0
  183. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_a2a_cdp_config.py +0 -0
  184. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_a2a_object_transfers.py +0 -0
  185. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_a2a_peer_agents.py +0 -0
  186. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_a2a_proxy.py +0 -0
  187. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_a2a_staging.py +0 -0
  188. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_a2a_trajectory_log.py +0 -0
  189. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_agent_env_environment.py +0 -0
  190. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_atif_builder.py +0 -0
  191. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_atif_fixtures.py +0 -0
  192. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_atif_kit.py +0 -0
  193. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_atif_profile.py +0 -0
  194. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_atif_reader.py +0 -0
  195. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_atif_validator.py +0 -0
  196. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_atif_vendored.py +0 -0
  197. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_browser_cdp.py +0 -0
  198. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_browser_contexts.py +0 -0
  199. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_browser_data.py +0 -0
  200. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_browser_log.py +0 -0
  201. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_browser_network.py +0 -0
  202. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_browser_recording.py +0 -0
  203. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_browser_state.py +0 -0
  204. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_client.py +0 -0
  205. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_computer_app_data.py +0 -0
  206. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_computer_app_server.py +0 -0
  207. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_computer_clock.py +0 -0
  208. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_computer_conformance.py +0 -0
  209. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_computer_conformance_attempts.py +0 -0
  210. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_computer_conformance_checks.py +0 -0
  211. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_computer_conformance_page.py +0 -0
  212. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_computer_conformance_recording.py +0 -0
  213. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_computer_dataplane.py +0 -0
  214. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_computer_declare.py +0 -0
  215. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_computer_driver.py +0 -0
  216. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_computer_driver_keys.py +0 -0
  217. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_computer_extensions.py +0 -0
  218. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_computer_frames.py +0 -0
  219. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_computer_macos.py +0 -0
  220. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_computer_page.py +0 -0
  221. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_computer_queue.py +0 -0
  222. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_computer_recording.py +0 -0
  223. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_computer_seed.py +0 -0
  224. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_computer_serve.py +0 -0
  225. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_computer_served.py +0 -0
  226. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_computer_session_windows.py +0 -0
  227. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_computer_spaces.py +0 -0
  228. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_computer_svc_forward.py +0 -0
  229. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_computer_tool_prefix.py +0 -0
  230. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_computer_windows_driver.py +0 -0
  231. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_control_token.py +0 -0
  232. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_data_objects.py +0 -0
  233. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_devtools_pipe.py +0 -0
  234. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_errors.py +0 -0
  235. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_extension_methods.py +0 -0
  236. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_intake.py +0 -0
  237. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_manifest.py +0 -0
  238. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_preflight.py +0 -0
  239. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_tool_access.py +0 -0
  240. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_tool_annotations.py +0 -0
  241. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_tool_client.py +0 -0
  242. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_tool_context.py +0 -0
  243. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_tool_context_fastmcp.py +0 -0
  244. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_tool_context_injection.py +0 -0
  245. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_usage.py +0 -0
  246. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_website_api.py +0 -0
  247. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_website_browser.py +0 -0
  248. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_website_conformance.py +0 -0
  249. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_website_environment.py +0 -0
  250. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_website_forwarding.py +0 -0
  251. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_website_live.py +0 -0
  252. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_website_mcp.py +0 -0
  253. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/tests/test_website_notes_example.py +0 -0
  254. {agentenv_framework_protocol-0.1.609 → agentenv_framework_protocol-0.1.611}/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.609
3
+ Version: 0.1.611
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
@@ -1737,6 +1737,36 @@ extension names the state the SDK keeps (`"state": ["turns"]` in its params,
1737
1737
  `SNAPSHOT_STATE_PARAM`), and agent-env grants the object only to an agent whose
1738
1738
  card has it, since an SDK from before it refuses the object.
1739
1739
 
1740
+ Every `atif/1` read leaves out the secrets the SDK knows, each written
1741
+ `[redacted:<length>]` wherever it occurs: in the document, the aux log and the
1742
+ turn context, inline, uploaded and in cursor pages, whose byte budget counts
1743
+ what they serve. The SDK knows:
1744
+
1745
+ - its control token, and the model credentials in its environment:
1746
+ `LITELLM_API_KEY` and the values of `LITELLM_EXTRA_HEADERS`;
1747
+ - write-only agent-config values: a string whole, and in a mapping what a
1748
+ credential-like key names (`Authorization`, `api_key`, `token`, `password`,
1749
+ ...), so a mapping of sampling parameters keeps its ordinary words;
1750
+ - an MCP registration's header values and credential-like query values, and a
1751
+ CDP endpoint's header values and the token in its URLs;
1752
+ - every transfer grant an extension call hands the agent: the parts of its URL
1753
+ that carry the credential (a presigned URL's credential-like query values,
1754
+ `X-Amz-Signature` but not `X-Amz-Algorithm`, decoded and as the URL writes
1755
+ them; else a token-like path segment; a password), its headers other than `Content-Type` and the
1756
+ like, and a signed upload form's signing fields. Every copy of the URL holds
1757
+ those parts, so a URL an agent prints keeps its host and path and loses its
1758
+ signature;
1759
+ - a clock follower's read token;
1760
+ - whatever the agent registers with `self.register_secret(value)`, once its app
1761
+ exists (in `run`, say).
1762
+
1763
+ They're taken from each extension call before any handler runs, the agent's own
1764
+ included. A value under 8 characters isn't scrubbed, with a warning naming where
1765
+ it came from. Each is matched raw, JSON-escaped and percent-encoded, the longest
1766
+ first, and a read scrubs as it serves, so a secret learned after a step was
1767
+ written is left out too. Native reads keep every secret byte for byte, so a
1768
+ replay of the served inputs holds what the served copy redacts.
1769
+
1740
1770
  `enable(..., description="...")` is reserved for declarations carrying
1741
1771
  configuration or metadata. It preserves the agent-specific extension prose
1742
1772
  published in the Agent Card. The versioned SDK definition provides a generic
@@ -1666,6 +1666,36 @@ extension names the state the SDK keeps (`"state": ["turns"]` in its params,
1666
1666
  `SNAPSHOT_STATE_PARAM`), and agent-env grants the object only to an agent whose
1667
1667
  card has it, since an SDK from before it refuses the object.
1668
1668
 
1669
+ Every `atif/1` read leaves out the secrets the SDK knows, each written
1670
+ `[redacted:<length>]` wherever it occurs: in the document, the aux log and the
1671
+ turn context, inline, uploaded and in cursor pages, whose byte budget counts
1672
+ what they serve. The SDK knows:
1673
+
1674
+ - its control token, and the model credentials in its environment:
1675
+ `LITELLM_API_KEY` and the values of `LITELLM_EXTRA_HEADERS`;
1676
+ - write-only agent-config values: a string whole, and in a mapping what a
1677
+ credential-like key names (`Authorization`, `api_key`, `token`, `password`,
1678
+ ...), so a mapping of sampling parameters keeps its ordinary words;
1679
+ - an MCP registration's header values and credential-like query values, and a
1680
+ CDP endpoint's header values and the token in its URLs;
1681
+ - every transfer grant an extension call hands the agent: the parts of its URL
1682
+ that carry the credential (a presigned URL's credential-like query values,
1683
+ `X-Amz-Signature` but not `X-Amz-Algorithm`, decoded and as the URL writes
1684
+ them; else a token-like path segment; a password), its headers other than `Content-Type` and the
1685
+ like, and a signed upload form's signing fields. Every copy of the URL holds
1686
+ those parts, so a URL an agent prints keeps its host and path and loses its
1687
+ signature;
1688
+ - a clock follower's read token;
1689
+ - whatever the agent registers with `self.register_secret(value)`, once its app
1690
+ exists (in `run`, say).
1691
+
1692
+ They're taken from each extension call before any handler runs, the agent's own
1693
+ included. A value under 8 characters isn't scrubbed, with a warning naming where
1694
+ it came from. Each is matched raw, JSON-escaped and percent-encoded, the longest
1695
+ first, and a read scrubs as it serves, so a secret learned after a step was
1696
+ written is left out too. Native reads keep every secret byte for byte, so a
1697
+ replay of the served inputs holds what the served copy redacts.
1698
+
1669
1699
  `enable(..., description="...")` is reserved for declarations carrying
1670
1700
  configuration or metadata. It preserves the agent-specific extension prose
1671
1701
  published in the Agent Card. The versioned SDK definition provides a generic
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "agentenv-framework-protocol"
3
- version = "0.1.609"
3
+ version = "0.1.611"
4
4
  description = "Open data-plane protocol and server SDK for agent environments."
5
5
  readme = "README.md"
6
6
  license = "Apache-2.0"
@@ -13,7 +13,7 @@ import uuid
13
13
  from contextlib import contextmanager
14
14
  from dataclasses import dataclass, field
15
15
  from datetime import datetime, timezone
16
- from typing import Any, Iterable, Iterator, Sequence
16
+ from typing import Any, Callable, Iterable, Iterator, Sequence
17
17
  from urllib.parse import urlsplit, urlunsplit
18
18
 
19
19
  from ..atif import FORMAT, Adapter, AdapterRun, AuxEntry, Media, ServedTurn, TurnContext
@@ -64,12 +64,15 @@ class AtifPage:
64
64
 
65
65
 
66
66
  class AtifCopy:
67
- """One A2A context's atif/1 document. Safe to feed from the agent's thread while the loop reads it."""
67
+ """One A2A context's atif/1 document. Safe to feed from the agent's thread while the loop reads it. Everything it
68
+ serves goes through ``scrub``, the agent's secrets redacted."""
68
69
 
69
- def __init__(self, adapter: type[Adapter], context_id: str) -> None:
70
+ def __init__(self, adapter: type[Adapter], context_id: str, *,
71
+ scrub: Callable[[Any], Any] = lambda served: served) -> None:
70
72
  self._run = AdapterRun(adapter, trajectory_id=uuid.uuid4().hex)
71
73
  self._adapter = adapter.__name__
72
74
  self._context_id = context_id
75
+ self._scrub = scrub
73
76
  self._lock = threading.Lock()
74
77
  self._tasks: dict[str, _Task] = {}
75
78
  self._failed: str | None = None
@@ -126,8 +129,9 @@ class AtifCopy:
126
129
  task.turn = ServedTurn.of(task.context, **ending)
127
130
  task.ended = True
128
131
 
129
- def task_read(self, task_id: str) -> tuple[dict[str, Any], list[AuxEntry], ServedTurn] | None:
130
- """An ended task's document as it stood when the task ended, its aux log and its served turn context."""
132
+ def task_read(self, task_id: str) -> tuple[dict[str, Any], list[dict[str, Any]], dict[str, Any]] | None:
133
+ """An ended task's document as it stood when the task ended, its aux log and its served turn context, as served:
134
+ on the wire and scrubbed."""
131
135
  with self._lock:
132
136
  self._check()
133
137
  task = self._tasks.get(task_id)
@@ -135,19 +139,22 @@ class AtifCopy:
135
139
  return None
136
140
  document = self._run.document(through=task.place)
137
141
  assert document is not None
138
- return document, list(task.aux), task.turn
142
+ return (self._scrub(document), self._scrub([entry.wire() for entry in task.aux]),
143
+ self._scrub(task.turn.wire()))
139
144
 
140
145
  def context_read(self) -> dict[str, Any] | None:
141
146
  """The context's live page: every closed step a reader may be served, or None before the first."""
142
147
  with self._lock:
143
148
  self._check()
144
- return self._run.page()
149
+ page = self._run.page()
150
+ return None if page is None else self._scrub(page)
145
151
 
146
152
  def page(self, after: int, max_steps: int, max_bytes: int, *, task_id: str | None = None) -> AtifPage:
147
153
  """The closed steps after step ``after``, of the whole context or of task ``task_id``, within both budgets; the
148
154
  first is always returned, so one larger than ``max_bytes`` can't stall a reader. With them, the sub-agents of
149
155
  every task they belong to, as far as each is served: a sub-agent can gain steps while its task runs, and the
150
- page that serves a task's last step, which closes only as the task ends, carries them whole."""
156
+ page that serves a task's last step, which closes only as the task ends, carries them whole. The byte budget
157
+ counts what it serves, scrubbed."""
151
158
  with self._lock:
152
159
  self._check()
153
160
  document = self._run.page()
@@ -162,21 +169,25 @@ class AtifCopy:
162
169
  served: list[dict[str, Any]] = []
163
170
  tasks: set[str | None] = set()
164
171
  used = 0
172
+ last = after
165
173
  for step, owner in pending[:max_steps]:
166
- size = len(json.dumps(step))
174
+ scrubbed = self._scrub(step)
175
+ size = len(json.dumps(scrubbed))
167
176
  if served and used + size > max_bytes:
168
177
  break
169
- served.append(step)
178
+ served.append(scrubbed)
170
179
  tasks.add(owner)
171
180
  used += size
181
+ last = step["step_id"]
172
182
  header = None
173
183
  subagents: list[dict[str, Any]] = []
174
184
  if document is not None:
175
- header = {key: value for key, value in document.items() if key not in ("steps", "subagent_trajectories")}
176
- subagents = [sub for sub in document.get("subagent_trajectories", [])
177
- if sub_tasks.get(sub["trajectory_id"]) in tasks]
185
+ header = self._scrub({key: value for key, value in document.items()
186
+ if key not in ("steps", "subagent_trajectories")})
187
+ subagents = self._scrub([sub for sub in document.get("subagent_trajectories", [])
188
+ if sub_tasks.get(sub["trajectory_id"]) in tasks])
178
189
  return AtifPage(header=header, subagents=subagents, steps=served,
179
- next=served[-1]["step_id"] if served else after, has_more=len(served) < len(pending))
190
+ next=last, has_more=len(served) < len(pending))
180
191
 
181
192
  def _open(self, task_id: str) -> _Task | None:
182
193
  if self._failed is not None:
@@ -0,0 +1,265 @@
1
+ """The secrets an agent's atif/1 reads leave out: every value the SDK holds or is handed (its control token, write-only
2
+ agent-config values, MCP and CDP registrations' credentials, the grants and tokens in extension calls, the model
3
+ credentials in its environment) and every one the agent registers. Each read scrubs every string it serves, so a
4
+ secret learned after a step was written is still left out; native reads are never scrubbed."""
5
+
6
+ from __future__ import annotations
7
+
8
+ import json
9
+ import logging
10
+ import os
11
+ import re
12
+ import threading
13
+ from collections.abc import Iterable, Iterator, Mapping
14
+ from typing import Any, TypeVar
15
+ from urllib.parse import quote, unquote_plus, urlsplit
16
+
17
+ from pydantic import BaseModel, SecretStr
18
+
19
+ from ..transfers import HttpGetGrant, HttpPostPolicyGrant, HttpPutGrant
20
+ from .extensions import CdpAddRequest, ClockSyncTimeRequest, McpAddRequest
21
+ from .tasks.v1 import AgentConfig
22
+
23
+ logger = logging.getLogger(__name__)
24
+
25
+ #: A shorter value isn't scrubbed: replacing it everywhere it occurs would mangle ordinary text.
26
+ MIN_SECRET_LENGTH = 8
27
+ #: The model credentials an agent's environment holds, which a tool can echo.
28
+ MODEL_KEY_ENV = "LITELLM_API_KEY"
29
+ MODEL_HEADERS_ENV = "LITELLM_EXTRA_HEADERS"
30
+ # Two rules tell a credential by its name. A header is one unless it plainly describes the request, since a header an
31
+ # agent is handed is there to authorize it. A query parameter, a signed form's field or a write-only mapping's key is
32
+ # one only when named like one, since most of them aren't: X-Amz-Algorithm, a key path, a sampling parameter.
33
+ _PLAIN_HEADERS = frozenset({"accept", "content-encoding", "content-length", "content-type", "user-agent"})
34
+ #: The words of such a name that mark its value as a credential, and the endings that do: ``X-Amz-Signature`` and Azure's ``sig`` are, ``X-Amz-Algorithm``, ``X-Amz-Date``
35
+ #: and ``X-Amz-SignedHeaders`` aren't, so ``AWS4-HMAC-SHA256`` is left in an agent's text.
36
+ _CREDENTIAL_WORDS = frozenset({
37
+ "auth", "authorization", "bearer", "cookie", "credential", "credentials", "jwt", "key", "passwd", "password",
38
+ "policy", "pwd", "secret", "sig", "signature", "token", "accessid", "googleaccessid", "awsaccesskeyid",
39
+ })
40
+ _CREDENTIAL_ENDINGS = ("key", "token", "secret", "password", "signature", "credential")
41
+ _NAME_WORD = re.compile(r"[a-z0-9]+")
42
+ #: How long a path segment of a URL with no query must be to be taken as its credential, as a grant server's signed
43
+ #: token is: longer than an ordinary path's words, unlike ``MIN_SECRET_LENGTH``, which bounds what is scrubbed at all.
44
+ MIN_TOKEN_SEGMENT_LENGTH = 16
45
+ _TOKEN_SEGMENT = re.compile(rf"[A-Za-z0-9_.=~+-]{{{MIN_TOKEN_SEGMENT_LENGTH},}}")
46
+
47
+ T = TypeVar("T")
48
+
49
+
50
+ class Secrets:
51
+ """The values an agent's atif/1 reads leave out, each written ``[redacted:<length>]`` wherever it occurs, in its raw,
52
+ JSON-escaped (ASCII or not) and percent-encoded forms. Safe to add to from the agent's threads while the loop
53
+ scrubs. The match is compiled as a prefix trie, once per change and when a read needs it, so a call that hands the
54
+ agent a grant per file, or a run that accumulates thousands, costs neither a rebuild per secret nor a slower
55
+ scan."""
56
+
57
+ def __init__(self, *, write_only: Mapping[str, str] | None = None) -> None:
58
+ #: The agent's write-only config fields, each to its wire name, whose values an agent-config call hands it.
59
+ self._write_only = dict(write_only or {})
60
+ self._lock = threading.Lock()
61
+ self._forms: set[str] = set()
62
+ self._pattern: re.Pattern[str] | None = None
63
+ self._stale = False
64
+ self._short: set[str] = set()
65
+
66
+ def add(self, value: str | SecretStr | None, *, source: str, warn: bool = True) -> None:
67
+ """Leave ``value`` out of every atif/1 read from now on; ``source`` names it in the warning a value too short to
68
+ scrub gets, never the value, unless ``warn`` is off, as for the parts of a URL."""
69
+ text = value.get_secret_value() if isinstance(value, SecretStr) else value
70
+ if not isinstance(text, str) or not text:
71
+ return
72
+ if len(text) < MIN_SECRET_LENGTH:
73
+ if warn and source not in self._short:
74
+ self._short.add(source)
75
+ logger.warning("a secret from %s is shorter than %d characters, so atif/1 reads don't scrub it",
76
+ source, MIN_SECRET_LENGTH)
77
+ return
78
+ forms = _forms(text)
79
+ with self._lock:
80
+ if not forms <= self._forms:
81
+ self._forms |= forms
82
+ self._stale = True
83
+
84
+ @classmethod
85
+ def for_agent(cls, *, write_only: Mapping[str, str], defaults: Mapping[str, Any],
86
+ environ: Mapping[str, str] | None = None) -> Secrets:
87
+ """What an agent's SDK knows from the start: the model credentials in its environment, and its write-only
88
+ config's defaults (``defaults`` by wire name). Its control token comes when it's served, the rest with each
89
+ extension call (``add_request``) and from the agent (``add``)."""
90
+ secrets = cls(write_only=write_only)
91
+ secrets.add_environment(environ)
92
+ wire_names = set(write_only.values())
93
+ for name, value in defaults.items():
94
+ if name in wire_names:
95
+ secrets.add_values(value, source="a write-only agent-config default")
96
+ return secrets
97
+
98
+ def add_all(self, values: Iterable[str | SecretStr | None], *, source: str, warn: bool = True) -> None:
99
+ for value in values:
100
+ self.add(value, source=source, warn=warn)
101
+
102
+ def add_environment(self, environ: Mapping[str, str] | None = None) -> None:
103
+ """The model credentials in the agent's environment: its key, and its extra headers' values."""
104
+ environ = os.environ if environ is None else environ
105
+ self.add(environ.get(MODEL_KEY_ENV), source=MODEL_KEY_ENV)
106
+ try:
107
+ headers = json.loads(environ.get(MODEL_HEADERS_ENV) or "{}")
108
+ except ValueError:
109
+ return
110
+ if isinstance(headers, dict):
111
+ self.add_all(_header_values(headers), source=MODEL_HEADERS_ENV)
112
+
113
+ def add_request(self, request: BaseModel | None) -> None:
114
+ """Every secret an extension call hands the agent, whichever handler takes it: the parts of its grants' URLs
115
+ that carry their credentials, their headers and signing fields, an MCP or CDP registration's credentials, a clock
116
+ follower's read token, wherever the request holds them, and an agent-config call's write-only values."""
117
+ if isinstance(request, AgentConfig):
118
+ for name in request.model_fields_set & self._write_only.keys():
119
+ self.add_values(getattr(request, name), source="a write-only agent-config value")
120
+ for item in _models(request):
121
+ if isinstance(item, (HttpGetGrant, HttpPutGrant, HttpPostPolicyGrant)):
122
+ self.add_all(_url_secrets(str(item.url)), source="a transfer grant", warn=False)
123
+ self.add_all(_grant_secrets(item), source="a transfer grant")
124
+ elif isinstance(item, McpAddRequest):
125
+ self.add_all(_query_values(item.url), source="an MCP registration", warn=False)
126
+ self.add_all(_header_values(item.headers), source="an MCP registration's headers")
127
+ elif isinstance(item, CdpAddRequest):
128
+ self.add_all([*_url_secrets(item.http_url), *_url_secrets(item.ws_url)], source="a CDP registration",
129
+ warn=False)
130
+ self.add_all(_header_values(item.headers), source="a CDP registration's headers")
131
+ elif isinstance(item, ClockSyncTimeRequest):
132
+ self.add(item.read_token, source="a clock follower's read token")
133
+
134
+ def add_values(self, value: Any, *, source: str) -> None:
135
+ """The credentials a write-only config value holds: a string or list of strings whole, and in a mapping or a model
136
+ only what a credential-like key names (and everything below it), so a write-only mapping of sampling parameters,
137
+ as pi's ``model_params`` is, doesn't have ``priority`` or a provider's name redacted wherever it occurs."""
138
+ self.add_all(_credentials(value, whole=not isinstance(value, (Mapping, BaseModel))), source=source)
139
+
140
+ def scrub(self, value: T) -> T:
141
+ """``value`` with every secret redacted in its strings: its mappings' keys and values and its lists' items."""
142
+ pattern = self._match()
143
+ return value if pattern is None else _scrub(value, pattern)
144
+
145
+ def _match(self) -> re.Pattern[str] | None:
146
+ with self._lock:
147
+ if self._stale:
148
+ self._pattern = re.compile(_trie(self._forms))
149
+ self._stale = False
150
+ return self._pattern
151
+
152
+
153
+ def _forms(text: str) -> set[str]:
154
+ """How a secret can appear in a served string: raw, JSON-escaped with and without ASCII escapes (inbound DataParts
155
+ are written without), and percent-encoded, as in another URL's query."""
156
+ return {text, json.dumps(text)[1:-1], json.dumps(text, ensure_ascii=False)[1:-1], quote(text, safe="")}
157
+
158
+
159
+ def _scrub(value: Any, pattern: re.Pattern[str]) -> Any:
160
+ if isinstance(value, str):
161
+ return pattern.sub(lambda match: f"[redacted:{len(match.group(0))}]", value)
162
+ if isinstance(value, dict):
163
+ return {_scrub(key, pattern): _scrub(item, pattern) for key, item in value.items()}
164
+ if isinstance(value, list):
165
+ return [_scrub(item, pattern) for item in value]
166
+ return value
167
+
168
+
169
+ def _trie(forms: Iterable[str]) -> str:
170
+ """One expression matching each of ``forms``, the longest at any position: a prefix trie, whose shared prefixes
171
+ are matched once, with each unbranching run written as one literal, so its nesting is its branching."""
172
+ root: dict[str, Any] = {}
173
+ for form in forms:
174
+ node = root
175
+ for char in form:
176
+ node = node.setdefault(char, {})
177
+ node[""] = {}
178
+ return _branch(root)
179
+
180
+
181
+ def _branch(node: dict[str, Any]) -> str:
182
+ run: list[str] = []
183
+ while len(node) == 1 and "" not in node:
184
+ [(char, node)] = node.items()
185
+ run.append(re.escape(char))
186
+ children = sorted(char for char in node if char)
187
+ if not children:
188
+ return "".join(run)
189
+ group = "(?:" + "|".join(re.escape(char) + _branch(node[char]) for char in children) + ")"
190
+ # An end here as well: the longer match first, the end if it fails.
191
+ return "".join(run) + (f"{group}?" if "" in node else group)
192
+
193
+
194
+ def _models(value: Any) -> Iterator[BaseModel]:
195
+ """``value`` and every model it holds, in fields, lists and mappings."""
196
+ if isinstance(value, BaseModel):
197
+ yield value
198
+ for name in type(value).model_fields:
199
+ yield from _models(getattr(value, name))
200
+ elif isinstance(value, (list, tuple)):
201
+ for item in value:
202
+ yield from _models(item)
203
+ elif isinstance(value, Mapping):
204
+ for item in value.values():
205
+ yield from _models(item)
206
+
207
+
208
+ def _credentials(value: Any, *, whole: bool) -> Iterator[str | SecretStr]:
209
+ """The strings ``value`` holds that are credentials: all of them when ``whole`` (a write-only string field, or what a
210
+ credential-like key names), else those a credential-like key or field name marks, and everything below it."""
211
+ if isinstance(value, (str, SecretStr)):
212
+ if whole:
213
+ yield value
214
+ elif isinstance(value, (list, tuple, set)):
215
+ for item in value:
216
+ yield from _credentials(item, whole=whole)
217
+ elif isinstance(value, BaseModel):
218
+ for name in type(value).model_fields:
219
+ yield from _credentials(getattr(value, name), whole=whole or _names_credential(name))
220
+ elif isinstance(value, Mapping):
221
+ for key, item in value.items():
222
+ yield from _credentials(item, whole=whole or isinstance(key, str) and _names_credential(key))
223
+
224
+
225
+ def _names_credential(name: str) -> bool:
226
+ words = _NAME_WORD.findall(name.lower())
227
+ return any(word in _CREDENTIAL_WORDS or word.endswith(_CREDENTIAL_ENDINGS) for word in words)
228
+
229
+
230
+ def _grant_secrets(grant: HttpGetGrant | HttpPutGrant | HttpPostPolicyGrant) -> list[str]:
231
+ """A grant's credential headers, and a signed upload form's signing fields."""
232
+ secrets = _header_values(grant.headers)
233
+ if isinstance(grant, HttpPostPolicyGrant):
234
+ secrets += [value for name, value in grant.fields.items()
235
+ if name != grant.path_field and _names_credential(name)]
236
+ return secrets
237
+
238
+
239
+ def _url_secrets(url: str) -> list[str]:
240
+ """The parts of a URL that carry its credential: a presigned URL's credential-like query values, else its token-like
241
+ path segments, as a grant server's (``/v1/grants/<token>``, with or without a plain query such as ``?download=1``),
242
+ and its password. Every copy of the URL, whole or as a request line, holds them, so redacting them is enough; the
243
+ rest (its host, its path, ``X-Amz-Algorithm``) isn't secret, and leaving it keeps each grant's share of the match
244
+ to its signature: the session token and access key a role signs every grant with are each one secret."""
245
+ parts = urlsplit(url)
246
+ carried = _query_values(url)
247
+ if not carried:
248
+ carried = [segment for segment in parts.path.split("/") if _TOKEN_SEGMENT.fullmatch(segment)]
249
+ return [*carried, *([parts.password] if parts.password else [])]
250
+
251
+
252
+ def _query_values(url: str) -> list[str]:
253
+ """The values of a URL's credential-like query parameters (a signature, a credential, a token, a key), decoded and
254
+ as the URL writes them, whose own percent-encoding is what a copy of the URL inside another URL's query holds."""
255
+ values: list[str] = []
256
+ for pair in urlsplit(url).query.split("&"):
257
+ name, _, written = pair.partition("=")
258
+ if written and _names_credential(unquote_plus(name)):
259
+ values += [unquote_plus(written), written]
260
+ return values
261
+
262
+
263
+ def _header_values(headers: Mapping[str, Any] | None) -> list[str]:
264
+ return [value for name, value in (headers or {}).items()
265
+ if isinstance(value, str) and name.lower() not in _PLAIN_HEADERS]
@@ -6,9 +6,9 @@ import json
6
6
  import logging
7
7
  from collections import OrderedDict
8
8
  from dataclasses import dataclass
9
- from typing import Any, Sequence
9
+ from typing import Any, Callable, Sequence
10
10
 
11
- from ..atif import Adapter, AuxEntry, ServedTurn
11
+ from ..atif import Adapter
12
12
  from ._atif_copy import AtifCopy, AtifPage, TurnStart
13
13
  from ._turn_index import TurnIndex
14
14
  from .extensions import TrajectoryState
@@ -60,8 +60,8 @@ class AtifTaskRead:
60
60
  """An ended task's atif/1 document as it stood when the task ended, its aux log and its served turn context."""
61
61
 
62
62
  document: dict[str, Any]
63
- aux: list[AuxEntry]
64
- turn: ServedTurn
63
+ aux: list[dict[str, Any]]
64
+ turn: dict[str, Any]
65
65
 
66
66
 
67
67
  @dataclass(frozen=True, slots=True)
@@ -87,6 +87,7 @@ class TaskTrajectories:
87
87
  *,
88
88
  native: str | None = None,
89
89
  atif: type[Adapter] | None = None,
90
+ scrub: Callable[[Any], Any] | None = None,
90
91
  ) -> None:
91
92
  if max_contexts < 1:
92
93
  raise ValueError("max_contexts must be positive")
@@ -95,6 +96,8 @@ class TaskTrajectories:
95
96
  self._atif = atif
96
97
  #: Each context's count of started tasks, kept only for an agent that serves atif/1.
97
98
  self._turns = TurnIndex() if atif is not None else None
99
+ #: What every atif/1 read goes through: the agent's secrets redacted.
100
+ self._scrub = scrub
98
101
  self._tasks: dict[str, _TaskRecord] = {}
99
102
  self._contexts: OrderedDict[str, list[str]] = OrderedDict()
100
103
  self._copies: dict[str, AtifCopy] = {}
@@ -129,7 +132,9 @@ class TaskTrajectories:
129
132
  if self._atif is not None and turn is not None:
130
133
  copy = self._copies.get(record.context_id)
131
134
  if copy is None:
132
- copy = self._copies[record.context_id] = AtifCopy(self._atif, record.context_id)
135
+ copy = self._copies[record.context_id] = AtifCopy(
136
+ self._atif, record.context_id, **({"scrub": self._scrub} if self._scrub is not None else {})
137
+ )
133
138
  copy.start(task_id, self._turns.next(record.context_id), turn)
134
139
  record.log._atif = _CopySink(copy, task_id)
135
140
  self._touch(record.context_id)
@@ -34,6 +34,7 @@ from ..atif import PROFILE_KEY as ATIF_PROFILE_KEY
34
34
  from ..atif import PROFILE_VERSION as ATIF_PROFILE_VERSION
35
35
  from ..atif import SCHEMA_VERSION as ATIF_SCHEMA_VERSION
36
36
  from ._atif_copy import TurnStart
37
+ from ._secrets import Secrets
37
38
  from ._snapshot_state import SnapshotStates
38
39
  from ._trajectory_log import MAX_TRAJECTORY_READ_BYTES, TaskTrajectories
39
40
  from ._triggers import TriggerEngine, TriggerError
@@ -259,6 +260,15 @@ class AgentEnvAgent:
259
260
  raise RuntimeError("session references are available after create_app()")
260
261
  return application.services.session_ref_for_context(context_id)
261
262
 
263
+ def register_secret(self, value: str) -> None:
264
+ """Leave ``value`` out of this agent's atif/1 reads from now on, wherever it occurs, as the SDK does with the
265
+ secrets it holds and is handed; one under 8 characters isn't, with a warning. Native reads keep it."""
266
+ application = getattr(self, "_agentenv_a2a_application", None)
267
+ if application is None:
268
+ raise RuntimeError("secrets are registered after create_app()")
269
+ if application.services.secrets is not None:
270
+ application.services.secrets.add(value, source="the agent")
271
+
262
272
  def set_session_ref_for_context(self, context_id: str, session_ref: str) -> None:
263
273
  """Associate a native session reference with an A2A context."""
264
274
  if not context_id:
@@ -578,7 +588,15 @@ class _SdkServices:
578
588
  self.trajectory_formats: tuple[str, ...] = (
579
589
  (native, ATIF_FORMAT) if atif is not None else (native,) if native else ()
580
590
  )
581
- self.task_trajectories = TaskTrajectories(native=native, atif=atif)
591
+ #: The secrets the agent's atif/1 reads leave out; an agent that serves none has none to scrub.
592
+ self.secrets = Secrets.for_agent(
593
+ write_only={field: wire for field, wire in _config_wire_names(self.config_model).items()
594
+ if wire in self._write_only_config_fields},
595
+ defaults=self.config_defaults,
596
+ ) if atif is not None else None
597
+ self.task_trajectories = TaskTrajectories(
598
+ native=native, atif=atif, scrub=self.secrets.scrub if self.secrets is not None else None
599
+ )
582
600
  #: Whether the card offers atif/1, served from the copy an adapter builds.
583
601
  self.serves_atif = atif is not None
584
602
  #: The SDK's state in the agent's snapshots, which only an agent that serves atif/1 keeps.
@@ -911,7 +929,7 @@ class _SdkServices:
911
929
  ) -> dict[str, Any]:
912
930
  """A whole atif/1 document: a task read's as it stood when the task ended, with the
913
931
  task's aux log and turn context, or a context read's live page; inline, or uploaded
914
- through the request's grants."""
932
+ through the request's grants, as the copy serves it, its secrets scrubbed."""
915
933
  served: dict[str, Any] = {}
916
934
  if isinstance(request, (TaskTrajectoryRequest, TaskObjectTrajectoryRequest)):
917
935
  read = self.task_trajectories.atif_task(request.task_id)
@@ -921,7 +939,7 @@ class _SdkServices:
921
939
  detail=f"No completed trajectory available for task '{request.task_id}'",
922
940
  )
923
941
  document = read.document
924
- served = {"aux": [entry.wire() for entry in read.aux], "turn_context": read.turn.wire()}
942
+ served = {"aux": read.aux, "turn_context": read.turn}
925
943
  else:
926
944
  if isinstance(request, ContextObjectTrajectoryRequest):
927
945
  _refuse_turn_objects(request)
@@ -1116,6 +1134,8 @@ def _taking_the_control_token(
1116
1134
  async def lifespan(app: Starlette) -> AsyncIterator[Any]:
1117
1135
  application.control_token = take_control_token() or application.control_token
1118
1136
  log_guard(application.control_token)
1137
+ if application.services.secrets is not None:
1138
+ application.services.secrets.add(application.control_token, source="the control token")
1119
1139
  if inner is None:
1120
1140
  yield None
1121
1141
  else:
@@ -1332,6 +1352,8 @@ class A2AAgentApplication:
1332
1352
  extension_request = None
1333
1353
  else:
1334
1354
  extension_request = request_model.model_validate(payload)
1355
+ if self.services.secrets is not None:
1356
+ self.services.secrets.add_request(extension_request)
1335
1357
  if extension_uri == TRAJECTORY_V1.uri:
1336
1358
  self.services.check_trajectory_format(extension_request.format)
1337
1359
  if extension_request.format == ATIF_FORMAT:
@@ -23,6 +23,8 @@ to native exactly.
23
23
 
24
24
  - One document per agent per A2A context. Each A2A task starts at a `source: user` step that holds the inbound
25
25
  message, with the task's ids in that step's profile. Steps number from 1 across the whole document.
26
+ - A served document leaves out the secrets its agent's SDK knows: each is written `[redacted:<length>]` wherever it
27
+ occurs, in any string, the aux log and turn context served with it included. The native log keeps them.
26
28
  - A context's record may span several documents: after an agent instance restarts or drops the context from memory,
27
29
  after a snapshot restore, and when long runs are sealed into segments. They share `session_id`, the first user step of each carries the continuing turn
28
30
  index, and each earlier document names the next in `continued_trajectory_ref`. The worker that stores the earlier