agentenv-framework-protocol 0.1.640__tar.gz → 0.1.643__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.
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/PKG-INFO +9 -9
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/README.md +8 -8
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/pyproject.toml +1 -1
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/a2a_agent/proxy.py +17 -5
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/a2a_agent/tasks/v1.py +19 -2
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_a2a_proxy.py +39 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_usage_models.py +18 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/.gitignore +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/LICENSE +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/NOTICE +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/THIRD_PARTY_NOTICES.md +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/examples/__init__.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/examples/advanced_agent.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/examples/basic_agent.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/examples/custom_extensions_agent.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/examples/multimodal_agent.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/examples/reference_model.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/examples/streaming_agent.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/examples/website/notes/.gitignore +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/examples/website/notes/Dockerfile +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/examples/website/notes/Dockerfile.dockerignore +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/examples/website/notes/README.md +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/examples/website/notes/data/seed.json +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/examples/website/notes/env.toml +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/examples/website/notes/site.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/examples/website/notes/web/index.html +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/examples/website/notes/web/package-lock.json +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/examples/website/notes/web/package.json +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/examples/website/notes/web/src/main.js +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/examples/website/notes/web/src/style.css +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/examples/website/notes/web/vite.config.js +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/__init__.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/a2a_agent/__init__.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/a2a_agent/_atif_copy.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/a2a_agent/_media_spool.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/a2a_agent/_secrets.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/a2a_agent/_snapshot_state.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/a2a_agent/_trajectory_log.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/a2a_agent/_triggers.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/a2a_agent/_turn_index.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/a2a_agent/clock.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/a2a_agent/control_token.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/a2a_agent/extensions.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/a2a_agent/framework.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/a2a_agent/peer_agents.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/a2a_agent/registry.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/a2a_agent/staging.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/a2a_agent/tasks/__init__.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/agent_env_environment.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/atif/PROFILE.md +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/atif/__init__.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/atif/__main__.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/atif/_image_size.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/atif/adapter.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/atif/builder.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/atif/fixtures/coding.json +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/atif/fixtures/coding.stripped.json +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/atif/fixtures/computer_use.json +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/atif/fixtures/late_result.json +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/atif/fixtures/media/482405b002a62efa8516c36709a7a100637507670576fa73a20ad5420d55c66f.png +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/atif/fixtures/media/55c64d0fcd6f9d5f7c828093857e3fdfda68478bb4e9bd24d481ef391c7804e8.heic +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/atif/fixtures/media/67905ad3cc2dd52b1f5f6a6d2814de0396618b29b4238b9af5207aeb69936e6d.mp4 +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/atif/fixtures/media/69a8aa01fe5537076d023dd5e9cc4275b39fc0434aa6483a9f58b66ef2f3c896.png +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/atif/fixtures/media/82e60066a2de261b6653bcdda90d1cb9a7af2f474cecd82e8d371e8384d72315.png +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/atif/fixtures/media/845e91831319e89c4d656bdb80c278ac09a7230d61e5dfd2e1b1fbb436ac8917.pdf +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/atif/fixtures/multi_agent.json +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/atif/fixtures/odd_parts.json +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/atif/fixtures/subagent.json +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/atif/fixtures/two_turns.json +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/atif/kit.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/atif/models/LICENSE +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/atif/models/VENDORED.md +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/atif/models/__init__.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/atif/models/agent.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/atif/models/content.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/atif/models/final_metrics.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/atif/models/metrics.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/atif/models/observation.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/atif/models/observation_result.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/atif/models/step.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/atif/models/subagent_trajectory_ref.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/atif/models/tool_call.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/atif/models/trajectory.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/atif/profile.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/atif/reader.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/atif/runner.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/atif/served.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/atif/validator.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/client.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/computer/__init__.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/computer/_declare.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/computer/_desktop.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/computer/_job.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/computer/_linux.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/computer/_load.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/computer/_macos.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/computer/_reaping.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/computer/_session_posix.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/computer/_session_windows.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/computer/_windows.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/computer/_with_fds.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/computer/_x11.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/computer/annotate.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/computer/app.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/computer/app_data.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/computer/app_runtime.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/computer/apps.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/computer/card.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/computer/checks.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/computer/clock.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/computer/conformance/__init__.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/computer/conformance/__main__.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/computer/conformance/checks.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/computer/conformance/client.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/computer/conformance/desk.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/computer/conformance/fixture.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/computer/conformance/mp4.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/computer/conformance/page_fixture.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/computer/conformance/report.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/computer/conformance/wayland_fixture.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/computer/dataplane.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/computer/driver.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/computer/errors.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/computer/extensions.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/computer/frames.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/computer/keys.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/computer/launch.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/computer/manifest.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/computer/operations.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/computer/platform.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/computer/prefix.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/computer/queue.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/computer/recording.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/computer/results.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/computer/run_install_step.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/computer/runtime.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/computer/seed.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/computer/serve.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/computer/serve_app.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/computer/served.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/computer/session.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/computer/settings.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/computer/skill.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/computer/spaces.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/computer/svc.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/computer/tools.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/errors.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/manifest.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/passthrough.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/preflight.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/tool_access.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/tool_client.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/tool_context.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/transfers.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/types.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/website/__init__.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/website/clock.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/website/conformance.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/website/environment.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/website/errors.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/website/forwarding.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/website/readiness.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/website/routes.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/website/session.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/website_browser/__init__.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/website_browser/cdp.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/website_browser/contexts.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/website_browser/control.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/website_browser/data.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/website_browser/devtools.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/website_browser/environment.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/website_browser/log.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/website_browser/network.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/website_browser/recording.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/website_browser/scope.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/website_browser/shapes.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/src/agentenv_protocol/website_browser/stream.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/atif_cases.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/computer_fake.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/conftest.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/probe_fake.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_a2a_agent.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_a2a_agent_clock.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_a2a_agent_examples.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_a2a_atif_media.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_a2a_atif_prescribe.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_a2a_atif_scrubbing.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_a2a_atif_serving.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_a2a_atif_turns.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_a2a_cdp_config.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_a2a_object_transfers.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_a2a_peer_agents.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_a2a_staging.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_a2a_trajectory_log.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_agent_env_environment.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_atif_builder.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_atif_fixtures.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_atif_kit.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_atif_profile.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_atif_reader.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_atif_validator.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_atif_vendored.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_browser_cdp.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_browser_contexts.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_browser_data.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_browser_log.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_browser_network.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_browser_recording.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_browser_state.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_client.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_computer_app_data.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_computer_app_server.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_computer_clock.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_computer_conformance.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_computer_conformance_attempts.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_computer_conformance_checks.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_computer_conformance_page.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_computer_conformance_recording.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_computer_dataplane.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_computer_declare.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_computer_driver.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_computer_driver_keys.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_computer_extensions.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_computer_frames.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_computer_macos.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_computer_page.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_computer_queue.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_computer_recording.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_computer_recording_annotate.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_computer_screenshot_delay.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_computer_seed.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_computer_serve.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_computer_served.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_computer_session_windows.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_computer_spaces.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_computer_svc_forward.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_computer_tool_prefix.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_computer_windows_driver.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_control_token.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_data_objects.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_devtools_pipe.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_errors.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_extension_methods.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_intake.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_manifest.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_preflight.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_tool_access.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_tool_annotations.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_tool_client.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_tool_context.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_tool_context_fastmcp.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_tool_context_injection.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_usage.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_website_api.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_website_browser.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_website_conformance.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_website_environment.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_website_forwarding.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_website_live.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_website_mcp.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_website_notes_example.py +0 -0
- {agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/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.
|
|
3
|
+
Version: 0.1.643
|
|
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
|
|
@@ -1502,14 +1502,14 @@ reads what `to_dict` wrote under any protocol version, a field it leaves out
|
|
|
1502
1502
|
being `None` and a key it doesn't know ignored, and `TaskResult.failure(...,
|
|
1503
1503
|
usage=...)` carries usage on a failure as `success` does.
|
|
1504
1504
|
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1505
|
+
An agent that knows each call's model gives a turn's counts by model in
|
|
1506
|
+
`Usage.models`, on every turn: one `ModelUsage` per model, with the model's
|
|
1507
|
+
name as called, its `calls`, its token and cache counts read as `Usage`'s are,
|
|
1508
|
+
and the agent's own `cost_usd` for them when it has one. That prices a
|
|
1509
|
+
subagent on a smaller model, a side call for a title, or a whole turn a CLI
|
|
1510
|
+
ran on another model at that model's own rate. The rows cover every call the
|
|
1511
|
+
turn counted; a call the agent can't name goes under the model it was
|
|
1512
|
+
configured with. A turn without rows is priced at its role's model.
|
|
1513
1513
|
|
|
1514
1514
|
Whoever makes a model call knows what its counts hold, so an agent builds its own
|
|
1515
1515
|
`Usage`. `Usage.from_model_response(usage)` is the default reader for a model
|
|
@@ -1431,14 +1431,14 @@ reads what `to_dict` wrote under any protocol version, a field it leaves out
|
|
|
1431
1431
|
being `None` and a key it doesn't know ignored, and `TaskResult.failure(...,
|
|
1432
1432
|
usage=...)` carries usage on a failure as `success` does.
|
|
1433
1433
|
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1434
|
+
An agent that knows each call's model gives a turn's counts by model in
|
|
1435
|
+
`Usage.models`, on every turn: one `ModelUsage` per model, with the model's
|
|
1436
|
+
name as called, its `calls`, its token and cache counts read as `Usage`'s are,
|
|
1437
|
+
and the agent's own `cost_usd` for them when it has one. That prices a
|
|
1438
|
+
subagent on a smaller model, a side call for a title, or a whole turn a CLI
|
|
1439
|
+
ran on another model at that model's own rate. The rows cover every call the
|
|
1440
|
+
turn counted; a call the agent can't name goes under the model it was
|
|
1441
|
+
configured with. A turn without rows is priced at its role's model.
|
|
1442
1442
|
|
|
1443
1443
|
Whoever makes a model call knows what its counts hold, so an agent builds its own
|
|
1444
1444
|
`Usage`. `Usage.from_model_response(usage)` is the default reader for a model
|
|
@@ -58,7 +58,7 @@ from .extensions import (
|
|
|
58
58
|
extension,
|
|
59
59
|
)
|
|
60
60
|
from .framework import AgentEnvAgent, AgentIdentity, a2a_agent
|
|
61
|
-
from .tasks.v1 import AgentConfig, TaskRequest, TaskResult, TextPart, TrajectoryLog, Usage
|
|
61
|
+
from .tasks.v1 import AgentConfig, ModelUsage, TaskRequest, TaskResult, TextPart, TrajectoryLog, Usage
|
|
62
62
|
from ..tool_client import ToolResult, ToolSession, ToolSessionError
|
|
63
63
|
from ..transfers import download
|
|
64
64
|
from ..types import EnvironmentTool
|
|
@@ -112,7 +112,8 @@ class _Turn:
|
|
|
112
112
|
pending: list[tuple[str, str]] = field(default_factory=list) # (tool, its canonical arguments) not yet run
|
|
113
113
|
last_event: str = field(default_factory=lambda: _now())
|
|
114
114
|
model: str | None = None
|
|
115
|
-
|
|
115
|
+
# Each recorded model call's model, as it named it, and usage, its input counting the cache.
|
|
116
|
+
model_calls: list[tuple[str | None, Usage]] = field(default_factory=list)
|
|
116
117
|
|
|
117
118
|
|
|
118
119
|
@contextlib.asynccontextmanager
|
|
@@ -250,7 +251,7 @@ class ProxyAgent(AgentEnvAgent):
|
|
|
250
251
|
turn.recorded = True
|
|
251
252
|
turn.model = request.model or turn.model
|
|
252
253
|
span = _span("chat", "chat", turn.last_event, turn.model, completion={"content": content})
|
|
253
|
-
turn.
|
|
254
|
+
turn.model_calls.append((request.model, usage))
|
|
254
255
|
for key in ("input_tokens", "output_tokens"):
|
|
255
256
|
if (count := getattr(usage, key)) is not None:
|
|
256
257
|
span["attributes"][f"gen_ai.usage.{key}"] = count
|
|
@@ -560,7 +561,7 @@ def _turn_usage(turn: _Turn) -> Usage:
|
|
|
560
561
|
(``cache_unsettled``), which leaves the turn's flag unknown; how many usages were in a shape none of the readers
|
|
561
562
|
know (``unrecognized``); and each provider's split of the cache writes, summed, a reported ``Usage``'s split
|
|
562
563
|
counted only where it holds counts, as its ``provider_details`` may hold anything."""
|
|
563
|
-
calls = turn.
|
|
564
|
+
calls = [usage for _, usage in turn.model_calls]
|
|
564
565
|
sums, unreported = {}, {}
|
|
565
566
|
for name in _USAGE_SUMS:
|
|
566
567
|
values = [value for call in calls if (value := getattr(call, name)) is not None]
|
|
@@ -581,7 +582,18 @@ def _turn_usage(turn: _Turn) -> Usage:
|
|
|
581
582
|
**({"unrecognized": unrecognized} if unrecognized else {}), **splits}
|
|
582
583
|
return Usage(tool_call_count=len(turn.actions), **sums,
|
|
583
584
|
input_includes_cache=True if sums["input_tokens"] is not None and not unsettled else None,
|
|
584
|
-
provider_details=details if calls else {})
|
|
585
|
+
models=_by_model(turn), provider_details=details if calls else {})
|
|
586
|
+
|
|
587
|
+
|
|
588
|
+
def _by_model(turn: _Turn) -> tuple[ModelUsage, ...]:
|
|
589
|
+
"""The turn's recorded calls by the model each named (``ModelUsage.of``); none when a call named none, since the
|
|
590
|
+
proxy has no configured model to count it under."""
|
|
591
|
+
by_model: dict[str, list[Usage]] = {}
|
|
592
|
+
for named, usage in turn.model_calls:
|
|
593
|
+
if named is None:
|
|
594
|
+
return ()
|
|
595
|
+
by_model.setdefault(named, []).append(usage)
|
|
596
|
+
return tuple(ModelUsage.of(name, of) for name, of in by_model.items())
|
|
585
597
|
|
|
586
598
|
|
|
587
599
|
def _span(name: str, operation: str, started: str, model: str | None, *, prompt: Any = None,
|
|
@@ -420,6 +420,23 @@ class ModelUsage:
|
|
|
420
420
|
raise ValueError("a model's usage must name the model")
|
|
421
421
|
_check_counts(self, _MODEL_COUNTERS)
|
|
422
422
|
|
|
423
|
+
@classmethod
|
|
424
|
+
def of(cls, model: str, usages: Iterable["Usage"]) -> "ModelUsage":
|
|
425
|
+
"""``model``'s row from the usages of its calls, one each: each count summed over the calls that gave it, None
|
|
426
|
+
when none did; their cost only when every call reported one, since a sum of some isn't the model's cost; and
|
|
427
|
+
the includes-cache flag the calls that gave input counts agree on, else None."""
|
|
428
|
+
usages = list(usages)
|
|
429
|
+
|
|
430
|
+
def total(name: str) -> Any:
|
|
431
|
+
values = [value for usage in usages if (value := getattr(usage, name)) is not None]
|
|
432
|
+
return sum(values) if values else None
|
|
433
|
+
|
|
434
|
+
costs = [usage.cost_usd for usage in usages]
|
|
435
|
+
flags = {usage.input_includes_cache for usage in usages if usage.input_tokens is not None}
|
|
436
|
+
return cls(model=model, calls=len(usages), **{name: total(name) for name in _MODEL_COUNTERS[1:]},
|
|
437
|
+
input_includes_cache=flags.pop() if len(flags) == 1 else None,
|
|
438
|
+
cost_usd=sum(costs) if costs and None not in costs else None)
|
|
439
|
+
|
|
423
440
|
@classmethod
|
|
424
441
|
def from_dict(cls, data: Mapping[str, Any]) -> "ModelUsage":
|
|
425
442
|
"""The model's usage ``to_dict`` wrote; a key this version doesn't know is ignored."""
|
|
@@ -436,8 +453,8 @@ class Usage:
|
|
|
436
453
|
"""Common execution metrics plus runtime-specific, JSON-shaped details. ``cache_read_tokens`` and
|
|
437
454
|
``cache_write_tokens`` count the prompt tokens read from and written to the provider's prompt cache;
|
|
438
455
|
``input_includes_cache`` says whether ``input_tokens`` counts both of them (True), neither (False), or is unknown
|
|
439
|
-
(None), which a price needs to read the counts. ``models`` is the counts by model,
|
|
440
|
-
|
|
456
|
+
(None), which a price needs to read the counts. ``models`` is the counts by model, from an agent that knows each
|
|
457
|
+
call's model: it covers every call the turn counted, so a price can charge each model at its own rate. A count
|
|
441
458
|
the turn leaves out that every row gives is the rows' sum, and so is the includes-cache flag the rows agree on."""
|
|
442
459
|
|
|
443
460
|
tool_call_count: int | None = None
|
{agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/tests/test_a2a_proxy.py
RENAMED
|
@@ -603,6 +603,33 @@ def test_a_turns_usage_sums_its_recorded_calls_with_input_counting_the_cache(cli
|
|
|
603
603
|
"input_tokens": 1, "output_tokens": 1, "total_tokens": 1, "cache_read_tokens": 1, "cache_write_tokens": 2}}}
|
|
604
604
|
|
|
605
605
|
|
|
606
|
+
def _recorded_turn(client, calls) -> dict:
|
|
607
|
+
"""The usage of a turn whose recorded calls are ``calls``, each a model name (or None) and its usage."""
|
|
608
|
+
task_id = _send(client, "go")
|
|
609
|
+
for model, usage in calls:
|
|
610
|
+
assert _proxy(client, "record", task_id=task_id, message="Thinking.", usage=usage,
|
|
611
|
+
**({"model": model} if model else {})).status_code == 200
|
|
612
|
+
_proxy(client, "reply", task_id=task_id, parts=[{"kind": "text", "text": "Done."}])
|
|
613
|
+
return _usage(_settled(client, task_id))
|
|
614
|
+
|
|
615
|
+
|
|
616
|
+
def test_a_turns_recorded_calls_are_given_by_the_model_each_named(client):
|
|
617
|
+
usage = _recorded_turn(client, [("gpt-4.1-mini", {"prompt_tokens": 1000, "completion_tokens": 10}),
|
|
618
|
+
("gpt-4o-mini", {"prompt_tokens": 300, "completion_tokens": 5}),
|
|
619
|
+
("gpt-4o-mini", None)])
|
|
620
|
+
|
|
621
|
+
assert usage["models"] == [
|
|
622
|
+
{"model": "gpt-4.1-mini", "calls": 1, "input_tokens": 1000, "output_tokens": 10, "input_includes_cache": True},
|
|
623
|
+
{"model": "gpt-4o-mini", "calls": 2, "input_tokens": 300, "output_tokens": 5, "input_includes_cache": True}]
|
|
624
|
+
|
|
625
|
+
|
|
626
|
+
def test_a_turn_with_a_call_that_named_no_model_gives_no_rows(client):
|
|
627
|
+
usage = _recorded_turn(client, [("gpt-4.1-mini", {"prompt_tokens": 1000, "completion_tokens": 10}),
|
|
628
|
+
(None, {"prompt_tokens": 200, "completion_tokens": 2})])
|
|
629
|
+
|
|
630
|
+
assert "models" not in usage and usage["input_tokens"] == 1200
|
|
631
|
+
|
|
632
|
+
|
|
606
633
|
def test_counts_a_recorded_call_doesnt_give_or_cant_be_read_are_left_out(client):
|
|
607
634
|
task_id = _send(client, "go")
|
|
608
635
|
for usage in ({"prompt_tokens": "9", "completion_tokens": True, "prompt_tokens_details": "none"},
|
|
@@ -837,3 +864,15 @@ def test_what_a_turn_still_runs_is_stopped_when_the_app_stops(monkeypatch, tmp_p
|
|
|
837
864
|
time.sleep(0.02)
|
|
838
865
|
|
|
839
866
|
_stopped(int((tmp_path / "child").read_text()))
|
|
867
|
+
|
|
868
|
+
|
|
869
|
+
def test_a_models_cost_is_its_calls_only_when_every_one_reported_one(client):
|
|
870
|
+
task_id = _send(client, "go")
|
|
871
|
+
for usage in ({"agentenv_usage": {"input_tokens": 10, "output_tokens": 1, "cost_usd": 0.01}},
|
|
872
|
+
{"prompt_tokens": 20, "completion_tokens": 2}):
|
|
873
|
+
assert _proxy(client, "record", task_id=task_id, message="Thinking.", usage=usage,
|
|
874
|
+
model="policy-model").status_code == 200
|
|
875
|
+
_proxy(client, "reply", task_id=task_id, parts=[{"kind": "text", "text": "Done."}])
|
|
876
|
+
|
|
877
|
+
[row] = _usage(_settled(client, task_id))["models"]
|
|
878
|
+
assert (row["calls"], row["input_tokens"], "cost_usd" in row) == (2, 30, False)
|
|
@@ -69,3 +69,21 @@ def test_a_turn_that_gives_only_its_rows_takes_their_sums_as_its_counts():
|
|
|
69
69
|
def test_from_dict_refuses_a_models_value_that_isnt_a_list_even_when_empty(models):
|
|
70
70
|
with pytest.raises(TypeError, match="models must be a list"):
|
|
71
71
|
Usage.from_dict({"input_tokens": 1, "models": models})
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
def test_a_models_row_of_its_calls_sums_what_they_gave_and_counts_each_call():
|
|
75
|
+
row = ModelUsage.of("m", [Usage(input_tokens=100, output_tokens=10, cache_read_tokens=80, input_includes_cache=True),
|
|
76
|
+
Usage(input_tokens=50, output_tokens=5, input_includes_cache=True), Usage()])
|
|
77
|
+
assert row == ModelUsage(model="m", calls=3, input_tokens=150, output_tokens=15, cache_read_tokens=80,
|
|
78
|
+
input_includes_cache=True)
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
def test_a_models_row_takes_its_calls_cost_only_when_every_call_reported_one():
|
|
82
|
+
assert ModelUsage.of("m", [Usage(input_tokens=1, cost_usd=0.25), Usage(input_tokens=1, cost_usd=0.5)]).cost_usd == 0.75
|
|
83
|
+
assert ModelUsage.of("m", [Usage(input_tokens=1, cost_usd=0.25), Usage(input_tokens=1)]).cost_usd is None
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
def test_a_models_row_takes_the_flag_its_counted_calls_agree_on():
|
|
87
|
+
assert ModelUsage.of("m", [Usage(input_tokens=1, input_includes_cache=True), Usage()]).input_includes_cache is True
|
|
88
|
+
assert ModelUsage.of("m", [Usage(input_tokens=1, input_includes_cache=True),
|
|
89
|
+
Usage(input_tokens=1, input_includes_cache=False)]).input_includes_cache is None
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/THIRD_PARTY_NOTICES.md
RENAMED
|
File without changes
|
{agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/examples/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{agentenv_framework_protocol-0.1.640 → agentenv_framework_protocol-0.1.643}/examples/basic_agent.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|