agentenv-framework-protocol 0.1.536__tar.gz → 0.1.537__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.536 → agentenv_framework_protocol-0.1.537}/PKG-INFO +1 -1
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/pyproject.toml +1 -1
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/computer/card.py +3 -0
- agentenv_framework_protocol-0.1.537/src/agentenv_protocol/computer/clock.py +100 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/computer/extensions.py +7 -1
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/website_browser/control.py +14 -7
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/website_browser/log.py +10 -7
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/website_browser/recording.py +8 -5
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/tests/test_browser_log.py +13 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/tests/test_browser_recording.py +39 -4
- agentenv_framework_protocol-0.1.537/tests/test_computer_clock.py +110 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/.gitignore +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/LICENSE +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/NOTICE +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/README.md +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/THIRD_PARTY_NOTICES.md +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/examples/__init__.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/examples/advanced_agent.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/examples/basic_agent.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/examples/custom_extensions_agent.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/examples/multimodal_agent.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/examples/reference_model.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/examples/streaming_agent.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/examples/website/notes/.gitignore +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/examples/website/notes/Dockerfile +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/examples/website/notes/Dockerfile.dockerignore +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/examples/website/notes/README.md +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/examples/website/notes/data/seed.json +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/examples/website/notes/env.toml +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/examples/website/notes/site.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/examples/website/notes/web/index.html +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/examples/website/notes/web/package-lock.json +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/examples/website/notes/web/package.json +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/examples/website/notes/web/src/main.js +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/examples/website/notes/web/src/style.css +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/examples/website/notes/web/vite.config.js +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/__init__.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/a2a_agent/__init__.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/a2a_agent/_trajectory_log.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/a2a_agent/_triggers.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/a2a_agent/extensions.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/a2a_agent/framework.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/a2a_agent/peer_agents.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/a2a_agent/proxy.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/a2a_agent/registry.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/a2a_agent/staging.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/a2a_agent/tasks/__init__.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/a2a_agent/tasks/v1.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/agent_env_environment.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/client.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/computer/__init__.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/computer/_declare.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/computer/_desktop.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/computer/_job.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/computer/_linux.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/computer/_load.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/computer/_macos.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/computer/_reaping.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/computer/_session_posix.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/computer/_session_windows.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/computer/_windows.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/computer/_with_fds.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/computer/_x11.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/computer/app.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/computer/app_data.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/computer/app_runtime.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/computer/apps.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/computer/checks.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/computer/conformance/__init__.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/computer/conformance/__main__.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/computer/conformance/checks.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/computer/conformance/client.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/computer/conformance/desk.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/computer/conformance/fixture.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/computer/conformance/mp4.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/computer/conformance/page_fixture.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/computer/conformance/report.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/computer/conformance/wayland_fixture.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/computer/dataplane.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/computer/driver.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/computer/errors.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/computer/frames.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/computer/keys.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/computer/launch.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/computer/manifest.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/computer/operations.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/computer/platform.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/computer/prefix.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/computer/queue.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/computer/recording.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/computer/results.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/computer/run_install_step.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/computer/runtime.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/computer/seed.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/computer/serve.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/computer/serve_app.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/computer/served.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/computer/session.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/computer/settings.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/computer/skill.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/computer/spaces.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/computer/svc.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/computer/tools.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/errors.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/manifest.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/preflight.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/tool_access.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/tool_client.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/tool_context.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/transfers.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/types.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/website/__init__.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/website/clock.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/website/conformance.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/website/environment.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/website/errors.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/website/readiness.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/website/routes.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/website/session.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/website_browser/__init__.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/website_browser/cdp.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/website_browser/contexts.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/website_browser/data.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/website_browser/devtools.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/website_browser/environment.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/website_browser/network.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/src/agentenv_protocol/website_browser/shapes.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/tests/computer_fake.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/tests/probe_fake.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/tests/test_a2a_agent.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/tests/test_a2a_agent_examples.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/tests/test_a2a_cdp_config.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/tests/test_a2a_object_transfers.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/tests/test_a2a_peer_agents.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/tests/test_a2a_proxy.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/tests/test_a2a_staging.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/tests/test_a2a_trajectory_log.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/tests/test_agent_env_environment.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/tests/test_browser_cdp.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/tests/test_browser_contexts.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/tests/test_browser_data.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/tests/test_browser_network.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/tests/test_browser_state.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/tests/test_client.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/tests/test_computer_app_data.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/tests/test_computer_app_server.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/tests/test_computer_conformance.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/tests/test_computer_conformance_checks.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/tests/test_computer_conformance_page.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/tests/test_computer_conformance_recording.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/tests/test_computer_dataplane.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/tests/test_computer_declare.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/tests/test_computer_driver.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/tests/test_computer_driver_keys.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/tests/test_computer_extensions.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/tests/test_computer_frames.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/tests/test_computer_macos.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/tests/test_computer_page.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/tests/test_computer_queue.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/tests/test_computer_recording.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/tests/test_computer_seed.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/tests/test_computer_serve.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/tests/test_computer_served.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/tests/test_computer_session_windows.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/tests/test_computer_spaces.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/tests/test_computer_svc_forward.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/tests/test_computer_tool_prefix.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/tests/test_computer_windows_driver.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/tests/test_control_token.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/tests/test_data_objects.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/tests/test_devtools_pipe.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/tests/test_errors.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/tests/test_extension_methods.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/tests/test_intake.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/tests/test_manifest.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/tests/test_preflight.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/tests/test_tool_access.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/tests/test_tool_annotations.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/tests/test_tool_client.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/tests/test_tool_context.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/tests/test_tool_context_fastmcp.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/tests/test_tool_context_injection.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/tests/test_website_api.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/tests/test_website_browser.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/tests/test_website_conformance.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/tests/test_website_environment.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/tests/test_website_live.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/tests/test_website_mcp.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/tests/test_website_notes_example.py +0 -0
- {agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/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.537
|
|
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
|
|
@@ -5,6 +5,7 @@ from __future__ import annotations
|
|
|
5
5
|
|
|
6
6
|
from typing import TYPE_CHECKING
|
|
7
7
|
|
|
8
|
+
from . import clock
|
|
8
9
|
from .dataplane import DEFAULT_DATA_PATHS
|
|
9
10
|
from .recording import recording_params
|
|
10
11
|
from ..types import METHOD_ADD, EnvironmentExtension, EnvironmentTool, IntakeDeclaration, IntakeFormat, intake_extension
|
|
@@ -55,6 +56,8 @@ def served_extensions(driver: ComputerDriverEnvironment,
|
|
|
55
56
|
continue
|
|
56
57
|
if extension.uri == COMPUTER_RECORDING and driver.recording is None:
|
|
57
58
|
continue
|
|
59
|
+
if extension.uri == clock.CLOCK and not clock.follows():
|
|
60
|
+
continue
|
|
58
61
|
dropped = {op for (uri, op), need in _METHOD_NEEDS.items() if uri == extension.uri and not driver.has(need)}
|
|
59
62
|
if dropped:
|
|
60
63
|
methods = {op: entry for op, entry in extension.params["methods"].items() if op not in dropped}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"""A computer's side of clock/v1. A base that follows the universe clock runs a follower (its image has ``FOLLOWER``),
|
|
2
|
+
which core configures through the sandbox's root channel (``CONFIG``, root's and the follower's alone, holding the
|
|
3
|
+
computer's read token) and which says how it's doing in ``STATUS``, holding no token. The driver serves clock/v1's
|
|
4
|
+
``sync_time``, the method every server that follows the clock serves, so the computer's card is what tells core and the
|
|
5
|
+
gateway that it follows: called when the clock is armed, it checks the task's zone against the one the computer booted
|
|
6
|
+
with and answers once the follower shows the gateway's current version, or says why it doesn't. That version it reads
|
|
7
|
+
from the gateway's watch, as any reader may: a watch naming no follower is answered at once and acknowledges nothing."""
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
import asyncio
|
|
11
|
+
import json
|
|
12
|
+
import os
|
|
13
|
+
import time
|
|
14
|
+
import urllib.parse
|
|
15
|
+
import urllib.request
|
|
16
|
+
from pathlib import Path
|
|
17
|
+
from typing import Optional
|
|
18
|
+
|
|
19
|
+
from .errors import InvalidArgument, TargetUnavailable
|
|
20
|
+
|
|
21
|
+
CLOCK = "urn:agentenv:clock/v1"
|
|
22
|
+
FOLLOWER = "/usr/local/lib/agentenv-clock/clock-follower"
|
|
23
|
+
#: The follower's user, whose group may read ``CONFIG``.
|
|
24
|
+
FOLLOWER_USER = "agentenv-clock"
|
|
25
|
+
CONFIG = "/etc/agentenv/clock/follower.json"
|
|
26
|
+
STATUS = "/run/agentenv-clock/status.json"
|
|
27
|
+
#: What a disk form's guest has, made from the computer's container image: core's root channel reaches its launcher,
|
|
28
|
+
#: not the guest, so it can't configure a follower there, and a disk computer stays on real time for now.
|
|
29
|
+
DISK_GUEST = "/etc/agentenv/vm/image.env"
|
|
30
|
+
#: How long ``sync_time`` waits for the follower to show the gateway's current version, as after a gateway restart
|
|
31
|
+
#: or a clock change it catches up.
|
|
32
|
+
CONNECT_WAIT_S = 10.0
|
|
33
|
+
_DIRECT = urllib.request.build_opener(urllib.request.ProxyHandler({}))
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def follows() -> bool:
|
|
37
|
+
"""Whether this computer follows the universe clock: its base runs the follower, and it isn't a disk guest."""
|
|
38
|
+
return os.path.exists(FOLLOWER) and not os.path.exists(DISK_GUEST)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def session_zone() -> str:
|
|
42
|
+
"""The zone the computer booted with, which every session program is in."""
|
|
43
|
+
try:
|
|
44
|
+
return os.environ.get("TZ") or Path("/etc/timezone").read_text().strip() or "UTC"
|
|
45
|
+
except OSError:
|
|
46
|
+
return "UTC"
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def follower_status() -> dict:
|
|
50
|
+
try:
|
|
51
|
+
status = json.loads(Path(STATUS).read_text())
|
|
52
|
+
except (OSError, ValueError):
|
|
53
|
+
return {}
|
|
54
|
+
return status if isinstance(status, dict) else {}
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
def gateway_version(watch_url: str) -> str:
|
|
58
|
+
"""The version the gateway's clock has now, read from its watch naming no version and no follower."""
|
|
59
|
+
with _DIRECT.open(f"{watch_url}?{urllib.parse.urlencode({'after': ''})}", timeout=5) as answer:
|
|
60
|
+
return json.loads(answer.read())["version"]
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
def _why(status: dict, current: Optional[str], unread: Optional[str]) -> str:
|
|
64
|
+
if status.get("error"):
|
|
65
|
+
return f"it can't reach the gateway at {status.get('url')}: {status['error']}"
|
|
66
|
+
if not status.get("url"):
|
|
67
|
+
return "core hasn't written its config, which it does when a multi env deploys this computer"
|
|
68
|
+
if not status.get("connected"):
|
|
69
|
+
return f"it hasn't heard from the gateway at {status['url']} yet"
|
|
70
|
+
if unread is not None:
|
|
71
|
+
return f"this computer can't read the gateway's version at {status['url']}: {unread}"
|
|
72
|
+
return f"it shows the gateway's version {status.get('version')!r}, and the gateway is at {current!r}"
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
async def sync_time(env_get_time_url: str, timezone: Optional[str] = None) -> dict:
|
|
76
|
+
"""``clock/v1``'s ``sync_time`` on a computer: its follower already follows the gateway core configured it with,
|
|
77
|
+
so ``env_get_time_url`` is taken as every server takes it and not used; ``timezone``, the task's, must be the one
|
|
78
|
+
the computer booted with, which a deploy sets (``computer_settings.timezone``)."""
|
|
79
|
+
if not follows():
|
|
80
|
+
raise TargetUnavailable("this computer's base doesn't follow the universe clock")
|
|
81
|
+
zone = session_zone()
|
|
82
|
+
if timezone is not None and timezone.strip() != zone:
|
|
83
|
+
raise InvalidArgument(f"the task's clock is in {timezone.strip()!r} and this computer's session in {zone!r}; "
|
|
84
|
+
f"deploy it with computer_settings.timezone = {timezone.strip()!r}")
|
|
85
|
+
deadline = time.monotonic() + CONNECT_WAIT_S
|
|
86
|
+
while True:
|
|
87
|
+
status, current, unread = follower_status(), None, None
|
|
88
|
+
if status.get("connected") and status.get("url"):
|
|
89
|
+
try:
|
|
90
|
+
current = await asyncio.to_thread(gateway_version, status["url"])
|
|
91
|
+
except Exception as e: # noqa: BLE001 - away or answering something else: said as why, tried again
|
|
92
|
+
unread = f"{type(e).__name__}: {e}"[:300]
|
|
93
|
+
status = follower_status()
|
|
94
|
+
if current is not None and status.get("connected") and status.get("version") == current:
|
|
95
|
+
return {"synced": True, "timezone": zone, "env_get_time_url": env_get_time_url,
|
|
96
|
+
"follower": {key: status.get(key) for key in ("name", "url", "version", "armed")}}
|
|
97
|
+
if time.monotonic() >= deadline:
|
|
98
|
+
raise TargetUnavailable("this computer's clock follower isn't following the gateway: "
|
|
99
|
+
+ _why(status, current, unread))
|
|
100
|
+
await asyncio.sleep(0.1)
|
|
@@ -5,7 +5,7 @@ from __future__ import annotations
|
|
|
5
5
|
from typing import TYPE_CHECKING, Callable, Optional
|
|
6
6
|
|
|
7
7
|
from ..agent_env_environment import agent_skill, extension
|
|
8
|
-
from . import card
|
|
8
|
+
from . import card, clock
|
|
9
9
|
from .card import (
|
|
10
10
|
COMPUTER_DISPLAY,
|
|
11
11
|
COMPUTER_EXEC,
|
|
@@ -52,6 +52,12 @@ class Extensions:
|
|
|
52
52
|
status["failed"] = "; ".join(f"{c.name}: {c.detail}" for c in failed)
|
|
53
53
|
return status
|
|
54
54
|
|
|
55
|
+
@extension(clock.CLOCK, description="Follow the gateway's universe clock: the computer's clock follower already "
|
|
56
|
+
"follows the gateway core configured it with; this checks the task's zone against the one the computer "
|
|
57
|
+
"booted with and answers once the follower is connected, or says why it isn't.")
|
|
58
|
+
async def sync_time(self, env_get_time_url: str, timezone: Optional[str] = None) -> dict:
|
|
59
|
+
return await clock.sync_time(env_get_time_url, timezone)
|
|
60
|
+
|
|
55
61
|
@extension(COMPUTER_DISPLAY, op="get", method="GET", description="Get or set the display's resolution and scale.")
|
|
56
62
|
async def _computer_display_get(self) -> dict:
|
|
57
63
|
return _display_data(await self._computer.display_now(), self.display_modes)
|
|
@@ -51,11 +51,12 @@ FRAME_QUALITY = 80
|
|
|
51
51
|
NUDGE_S = 0.5
|
|
52
52
|
#: How long a frame may take to capture, longer than a screenshot an agent waits on, since a frame is taken in the
|
|
53
53
|
#: background: a page too busy to paint, or between documents mid-navigation, gets this long to show, a capture the
|
|
54
|
-
#: browser refused for
|
|
54
|
+
#: browser refused for the moment asked again every ``FRAME_RETRY_S``.
|
|
55
55
|
FRAME_CAPTURE_S = 10.0
|
|
56
56
|
FRAME_RETRY_S = 0.25
|
|
57
|
-
#: What the browser says of a capture refused for the moment
|
|
58
|
-
|
|
57
|
+
#: What the browser says of a capture refused for the moment: while a navigation swaps the tab's document, or once the
|
|
58
|
+
#: session it was asked on is gone, as when the tab closes or the browser attaches it anew.
|
|
59
|
+
FOR_THE_MOMENT = ("Not attached to an active page", "Unable to capture screenshot", "Session with given id not found")
|
|
59
60
|
#: How often a wait for a tab to load looks again.
|
|
60
61
|
LOAD_POLL_S = 0.1
|
|
61
62
|
#: Where an agent's files to upload are, and where downloads land, under the session user's home.
|
|
@@ -747,14 +748,20 @@ class BrowserControl:
|
|
|
747
748
|
except asyncio.TimeoutError:
|
|
748
749
|
raise DeviceUnavailable(f"the tab painted nothing within {FRAME_CAPTURE_S:g} s") from None
|
|
749
750
|
except DevToolsError as e:
|
|
750
|
-
if not any(why in str(e) for why in
|
|
751
|
+
if not any(why in str(e) for why in FOR_THE_MOMENT) or loop.time() + FRAME_RETRY_S >= deadline:
|
|
751
752
|
raise DeviceUnavailable(f"the tab couldn't be captured: {e}") from None
|
|
752
753
|
except ConnectionError as e:
|
|
753
754
|
raise DeviceUnavailable(f"the tab couldn't be captured: {e}") from None
|
|
754
755
|
await asyncio.sleep(FRAME_RETRY_S)
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
756
|
+
while session not in self._sessions:
|
|
757
|
+
try:
|
|
758
|
+
session = next((s for s, t in self._sessions.items() if t == target), None) or (
|
|
759
|
+
await self.active_session())
|
|
760
|
+
except DeviceUnavailable:
|
|
761
|
+
if loop.time() + FRAME_RETRY_S >= deadline:
|
|
762
|
+
raise
|
|
763
|
+
await asyncio.sleep(FRAME_RETRY_S)
|
|
764
|
+
target = self._sessions[session]
|
|
758
765
|
self._frames[target] = shot["data"], "jpg"
|
|
759
766
|
return shot["data"], "jpg", target, self.url_of(target)
|
|
760
767
|
|
|
@@ -400,24 +400,27 @@ class BrowserLog:
|
|
|
400
400
|
self.write(seq, {kind: body})
|
|
401
401
|
return seq
|
|
402
402
|
|
|
403
|
-
def read(self, after: int = 0, limit: int = READ_LIMIT) -> dict:
|
|
403
|
+
def read(self, after: int = 0, limit: int = READ_LIMIT, settle_through: Optional[int] = None) -> dict:
|
|
404
404
|
"""The lines after sequence number ``after``, in order, up to ``limit`` of them and to the last whose every
|
|
405
405
|
earlier line is written or stalled: ``lines``, ``last``, the sequence number of that last one, and ``more``
|
|
406
|
-
when the limit left some.
|
|
407
|
-
|
|
406
|
+
when the limit left some. An action begun at or before ``settle_through`` and still going counts as stalled
|
|
407
|
+
now, as a recording that ends while an action is in flight needs."""
|
|
408
|
+
complete, picked, more = self._picked(after, limit, settle_through)
|
|
408
409
|
return self._loaded(after, complete, picked, more)
|
|
409
410
|
|
|
410
|
-
async def read_async(self, after: int = 0, limit: int = READ_LIMIT) -> dict:
|
|
411
|
+
async def read_async(self, after: int = 0, limit: int = READ_LIMIT, settle_through: Optional[int] = None) -> dict:
|
|
411
412
|
"""``read``, its file read in a thread."""
|
|
412
|
-
complete, picked, more = self._picked(after, limit)
|
|
413
|
+
complete, picked, more = self._picked(after, limit, settle_through)
|
|
413
414
|
return await asyncio.to_thread(self._loaded, after, complete, picked, more)
|
|
414
415
|
|
|
415
|
-
def _picked(self, after: int, limit: int
|
|
416
|
+
def _picked(self, after: int, limit: int, settle_through: Optional[int] = None
|
|
417
|
+
) -> tuple[int, list[tuple[int, int, int]], bool]:
|
|
416
418
|
"""Where the lines a read returns are: the last sequence number it may return, and each line's number, offset
|
|
417
419
|
and length, in order."""
|
|
418
420
|
now = time.monotonic()
|
|
419
421
|
for seq, began in list(self._pending.items()):
|
|
420
|
-
|
|
422
|
+
settled = settle_through is not None and seq <= settle_through
|
|
423
|
+
if (settled or now - began >= STALLED_S) and (begun := self._begun.get(seq)) is not None:
|
|
421
424
|
self._stood_in.add(seq)
|
|
422
425
|
self.write(seq, {"action": {**begun["action"], "unfinished": True}}, at=begun["at"])
|
|
423
426
|
complete = min(self._pending) - 1 if self._pending else self._seq
|
|
@@ -244,15 +244,18 @@ class _Recording:
|
|
|
244
244
|
return wire
|
|
245
245
|
|
|
246
246
|
async def _log_lines(self) -> list[dict]:
|
|
247
|
-
"""The log's lines from the recording's start to its end, once every one of them is written
|
|
248
|
-
written
|
|
247
|
+
"""The log's lines from the recording's start to its end, once every one of them is written; after
|
|
248
|
+
``LOG_WAIT_S``, an action still going is written as unfinished, as it was at the end, and what's written of
|
|
249
|
+
them is what there is."""
|
|
249
250
|
manifest, log = self.manifest, self.recordings.log
|
|
250
251
|
deadline = asyncio.get_running_loop().time() + LOG_WAIT_S
|
|
251
252
|
wanted = manifest.log_last - manifest.log_after
|
|
252
253
|
while True:
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
254
|
+
late = asyncio.get_running_loop().time() >= deadline
|
|
255
|
+
read = await log.read_async(manifest.log_after, limit=wanted,
|
|
256
|
+
settle_through=manifest.log_last if late else None)
|
|
257
|
+
lines = [line for line in read["lines"] if line.get("seq", 0) <= manifest.log_last]
|
|
258
|
+
if len(lines) >= wanted or late:
|
|
256
259
|
return lines
|
|
257
260
|
await asyncio.sleep(LOG_POLL_S)
|
|
258
261
|
|
|
@@ -178,6 +178,19 @@ def test_an_action_still_going_after_the_limit_is_written_unfinished_and_its_out
|
|
|
178
178
|
assert [line["seq"] for line in log.read()["lines"]] == [1, 2, 3]
|
|
179
179
|
|
|
180
180
|
|
|
181
|
+
def test_a_read_settling_through_an_entry_writes_the_actions_still_going_up_to_it_unfinished_now(tmp_path):
|
|
182
|
+
log = BrowserLog(tmp_path / "browser-chromium.jsonl")
|
|
183
|
+
early = log.begin({"via": "mcp", "tool": "browser_navigate", "acts": True, "tab": "T1"})
|
|
184
|
+
late = log.begin({"via": "cdp", "method": "Runtime.evaluate", "acts": True, "tab": "T1"})
|
|
185
|
+
|
|
186
|
+
read = log.read(settle_through=early["seq"])
|
|
187
|
+
|
|
188
|
+
assert [(line["seq"], line["action"]["unfinished"]) for line in read["lines"]] == [(early["seq"], True)]
|
|
189
|
+
assert read["last"] == early["seq"] and log.read(after=early["seq"])["lines"] == []
|
|
190
|
+
log.finish(late, ok=True)
|
|
191
|
+
assert [line["seq"] for line in log.read(after=early["seq"])["lines"]] == [late["seq"]]
|
|
192
|
+
|
|
193
|
+
|
|
181
194
|
def test_a_restarted_server_carries_on_the_sequence_on_a_new_line_after_a_partial_one(tmp_path):
|
|
182
195
|
path = tmp_path / "browser-chromium.jsonl"
|
|
183
196
|
path.write_text('{"seq": 1, "at": "t", "reset": {}}\n{"seq": 2, "at": "t", "tab": {}}\n{"seq": 3, "at"')
|
|
@@ -112,7 +112,8 @@ async def test_a_burst_still_settling_at_the_end_gets_its_frame_before_the_last(
|
|
|
112
112
|
|
|
113
113
|
|
|
114
114
|
@pytest.mark.asyncio
|
|
115
|
-
async def
|
|
115
|
+
async def test_an_end_waits_for_entries_in_flight_writes_an_action_still_going_as_unfinished_and_lists_the_rest(
|
|
116
|
+
recorded, monkeypatch):
|
|
116
117
|
log, control, uploads, recordings = recorded
|
|
117
118
|
monkeypatch.setattr(browser_recording, "LOG_WAIT_S", 0.3)
|
|
118
119
|
started = await recordings.start("run-1:record", _grant(), frames=False)
|
|
@@ -120,11 +121,16 @@ async def test_an_end_waits_for_entries_in_flight_and_lists_any_still_unwritten_
|
|
|
120
121
|
asyncio.get_running_loop().call_later(0.1, lambda: log.finish(finishing, ok=True))
|
|
121
122
|
complete = await recordings.end(started["recording_id"])
|
|
122
123
|
started = await recordings.start("run-2:record", _grant(), frames=False)
|
|
123
|
-
|
|
124
|
-
|
|
124
|
+
going = log.begin({"via": "mcp", "who": "default", "tool": "browser_navigate", "acts": True, "tab": "T1"})
|
|
125
|
+
after = _acted(log, "cdp", "Input.insertText", "T1")
|
|
126
|
+
held = log.reserve()
|
|
127
|
+
ended = await recordings.end(started["recording_id"])
|
|
128
|
+
lines = [json.loads(line) for line in uploads.by_path[
|
|
129
|
+
f"agentenv-browser-recordings/r1/{ended['recording_id']}/log.jsonl"].decode().splitlines()]
|
|
125
130
|
|
|
126
131
|
assert complete["log_missing"] == [] and complete["log_last"] == finishing["seq"]
|
|
127
|
-
assert
|
|
132
|
+
assert ended["log_missing"] == [held] and [line["seq"] for line in lines] == [going["seq"], after]
|
|
133
|
+
assert lines[0]["action"]["unfinished"] is True
|
|
128
134
|
|
|
129
135
|
|
|
130
136
|
@pytest.mark.asyncio
|
|
@@ -324,6 +330,35 @@ async def test_a_tab_that_closes_while_its_frame_is_asked_again_is_framed_as_the
|
|
|
324
330
|
assert framed[:3] == held[:3] and held[2] == "T1" and [s for s, _, _ in pipe.captured] == ["s-T1", "s-T2"]
|
|
325
331
|
|
|
326
332
|
|
|
333
|
+
@pytest.mark.asyncio
|
|
334
|
+
async def test_a_frame_whose_session_is_gone_is_taken_on_the_session_its_tab_was_attached_on_anew():
|
|
335
|
+
pipe = RefusingPipe(refusals=1, why="Page.captureScreenshot: Session with given id not found")
|
|
336
|
+
control = _one_tab(pipe)
|
|
337
|
+
|
|
338
|
+
def reattach() -> None:
|
|
339
|
+
pipe.emit("Target.detachedFromTarget", {"sessionId": "s-T1"})
|
|
340
|
+
pipe.emit("Target.attachedToTarget", {"sessionId": "s-T1b", "targetInfo": {"targetId": "T1", "type": "page"}})
|
|
341
|
+
asyncio.get_running_loop().call_later(0.05, reattach)
|
|
342
|
+
|
|
343
|
+
_, _, tab, _ = await control.frame("T1", load_wait_s=0)
|
|
344
|
+
|
|
345
|
+
assert tab == "T1" and [s for s, _, _ in pipe.captured] == ["s-T1", "s-T1b"]
|
|
346
|
+
|
|
347
|
+
|
|
348
|
+
@pytest.mark.asyncio
|
|
349
|
+
async def test_a_frame_whose_only_tab_is_attached_anew_only_after_a_retry_waits_for_it_within_its_budget():
|
|
350
|
+
pipe = RefusingPipe(refusals=1, why="Page.captureScreenshot: Session with given id not found")
|
|
351
|
+
control = _one_tab(pipe)
|
|
352
|
+
loop = asyncio.get_running_loop()
|
|
353
|
+
loop.call_later(0.05, pipe.emit, "Target.detachedFromTarget", {"sessionId": "s-T1"})
|
|
354
|
+
loop.call_later(0.6, pipe.emit, "Target.attachedToTarget",
|
|
355
|
+
{"sessionId": "s-T1b", "targetInfo": {"targetId": "T1", "type": "page"}})
|
|
356
|
+
|
|
357
|
+
_, _, tab, _ = await control.frame("T1", load_wait_s=0)
|
|
358
|
+
|
|
359
|
+
assert tab == "T1" and [s for s, _, _ in pipe.captured] == ["s-T1", "s-T1b"]
|
|
360
|
+
|
|
361
|
+
|
|
327
362
|
@pytest.mark.asyncio
|
|
328
363
|
async def test_a_frame_the_browser_refuses_for_another_reason_is_missing_at_once():
|
|
329
364
|
pipe = RefusingPipe(refusals=5, why="Page.captureScreenshot: Internal error")
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"""A computer's side of clock/v1: the driver serves sync_time where the base runs the clock follower and it isn't a disk
|
|
2
|
+
guest, the method every server that follows the clock serves; it checks the task's zone against the one the computer
|
|
3
|
+
booted with and answers once the follower shows the gateway's current version, or says why it doesn't."""
|
|
4
|
+
from __future__ import annotations
|
|
5
|
+
|
|
6
|
+
import json
|
|
7
|
+
|
|
8
|
+
import pytest
|
|
9
|
+
|
|
10
|
+
pytest.importorskip("mcp.server.fastmcp")
|
|
11
|
+
pytest.importorskip("PIL")
|
|
12
|
+
|
|
13
|
+
from computer_fake import FakeDriver, http_client # noqa: E402
|
|
14
|
+
|
|
15
|
+
from agentenv_protocol.computer import clock # noqa: E402
|
|
16
|
+
from agentenv_protocol.computer.errors import InvalidArgument, TargetUnavailable # noqa: E402
|
|
17
|
+
|
|
18
|
+
CLOCK = "urn:agentenv:clock/v1"
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
@pytest.fixture
|
|
22
|
+
def base(tmp_path, monkeypatch):
|
|
23
|
+
"""A base that runs the follower, its status at ``tmp_path/status.json``, the session in Europe/Paris."""
|
|
24
|
+
follower = tmp_path / "clock-follower"
|
|
25
|
+
follower.write_text("")
|
|
26
|
+
monkeypatch.setattr(clock, "FOLLOWER", str(follower))
|
|
27
|
+
monkeypatch.setattr(clock, "DISK_GUEST", str(tmp_path / "image.env"))
|
|
28
|
+
monkeypatch.setattr(clock, "STATUS", str(tmp_path / "status.json"))
|
|
29
|
+
monkeypatch.setattr(clock, "CONNECT_WAIT_S", 0.3)
|
|
30
|
+
monkeypatch.setenv("TZ", "Europe/Paris")
|
|
31
|
+
monkeypatch.setattr(clock, "gateway_version", lambda url: "b:3")
|
|
32
|
+
return tmp_path
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
async def _clock_extension(driver) -> dict | None:
|
|
36
|
+
async with http_client(driver) as http:
|
|
37
|
+
card = (await http.get("/.well-known/agent-env.json")).json()
|
|
38
|
+
return next((e for e in card["capabilities"]["extensions"] if e["uri"] == CLOCK), None)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
@pytest.mark.asyncio
|
|
42
|
+
async def test_the_card_serves_sync_time_where_the_base_runs_the_follower_and_it_isnt_a_disk_guest(base, monkeypatch):
|
|
43
|
+
served = await _clock_extension(FakeDriver())
|
|
44
|
+
(base / "image.env").write_text("user=root\n")
|
|
45
|
+
on_a_disk = await _clock_extension(FakeDriver())
|
|
46
|
+
monkeypatch.setattr(clock, "FOLLOWER", str(base / "absent"))
|
|
47
|
+
|
|
48
|
+
assert set(served["params"]["methods"]) == {"sync_time"}
|
|
49
|
+
assert set(served["params"]["methods"]["sync_time"]["request"]["properties"]) == {"env_get_time_url", "timezone"}
|
|
50
|
+
assert on_a_disk is None and await _clock_extension(FakeDriver()) is None
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
@pytest.mark.asyncio
|
|
54
|
+
async def test_sync_time_answers_once_the_follower_shows_the_gateways_current_version(base):
|
|
55
|
+
(base / "status.json").write_text(json.dumps({"connected": True, "url": "http://gw/clock/watch", "name": "desktop",
|
|
56
|
+
"version": "b:3", "armed": True, "token": "never read"}))
|
|
57
|
+
|
|
58
|
+
synced = await clock.sync_time("http://gw/clock/time", " Europe/Paris ")
|
|
59
|
+
|
|
60
|
+
assert synced == {"synced": True, "timezone": "Europe/Paris", "env_get_time_url": "http://gw/clock/time",
|
|
61
|
+
"follower": {"name": "desktop", "url": "http://gw/clock/watch", "version": "b:3", "armed": True}}
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
@pytest.mark.parametrize("version, why", [
|
|
65
|
+
("b:3", "it shows the gateway's version 'b:2', and the gateway is at 'b:3'"),
|
|
66
|
+
(OSError("refused"), "this computer can't read the gateway's version at http://gw/clock/watch: OSError: refused"),
|
|
67
|
+
])
|
|
68
|
+
@pytest.mark.asyncio
|
|
69
|
+
async def test_a_follower_behind_the_gateways_version_or_a_gateway_it_cant_read_is_named(base, monkeypatch, version,
|
|
70
|
+
why):
|
|
71
|
+
def answer(url):
|
|
72
|
+
assert url == "http://gw/clock/watch"
|
|
73
|
+
if isinstance(version, Exception):
|
|
74
|
+
raise version
|
|
75
|
+
return version
|
|
76
|
+
|
|
77
|
+
monkeypatch.setattr(clock, "gateway_version", answer)
|
|
78
|
+
(base / "status.json").write_text(json.dumps({"connected": True, "url": "http://gw/clock/watch", "version": "b:2"}))
|
|
79
|
+
|
|
80
|
+
with pytest.raises(TargetUnavailable, match="isn't following the gateway: " + why.replace("(", r"\(")):
|
|
81
|
+
await clock.sync_time("http://gw/clock/time")
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
@pytest.mark.asyncio
|
|
85
|
+
async def test_a_task_in_another_zone_is_refused_naming_the_setting_to_change(base):
|
|
86
|
+
with pytest.raises(InvalidArgument, match="deploy it with computer_settings.timezone = 'America/Chicago'"):
|
|
87
|
+
await clock.sync_time("http://gw/clock/time", "America/Chicago")
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
@pytest.mark.parametrize("status, why", [
|
|
91
|
+
(None, "core hasn't written its config"),
|
|
92
|
+
({"connected": False, "url": "http://gw/clock/watch", "error": "URLError: refused"},
|
|
93
|
+
"it can't reach the gateway at http://gw/clock/watch: URLError: refused"),
|
|
94
|
+
({"connected": False, "url": "http://gw/clock/watch", "error": None}, "it hasn't heard from the gateway"),
|
|
95
|
+
])
|
|
96
|
+
@pytest.mark.asyncio
|
|
97
|
+
async def test_a_follower_that_isnt_connected_is_named_with_why(base, status, why):
|
|
98
|
+
if status is not None:
|
|
99
|
+
(base / "status.json").write_text(json.dumps(status))
|
|
100
|
+
|
|
101
|
+
with pytest.raises(TargetUnavailable, match="this computer's clock follower isn't following the gateway: " + why):
|
|
102
|
+
await clock.sync_time("http://gw/clock/time")
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
@pytest.mark.asyncio
|
|
106
|
+
async def test_a_computer_whose_base_doesnt_follow_the_clock_says_so(base, monkeypatch):
|
|
107
|
+
monkeypatch.setattr(clock, "FOLLOWER", str(base / "absent"))
|
|
108
|
+
|
|
109
|
+
with pytest.raises(TargetUnavailable, match="doesn't follow the universe clock"):
|
|
110
|
+
await clock.sync_time("http://gw/clock/time")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/THIRD_PARTY_NOTICES.md
RENAMED
|
File without changes
|
{agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/examples/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{agentenv_framework_protocol-0.1.536 → agentenv_framework_protocol-0.1.537}/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
|