agentenv-framework-protocol 0.1.544__tar.gz → 0.1.548__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.544 → agentenv_framework_protocol-0.1.548}/PKG-INFO +48 -1
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/README.md +47 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/examples/website/notes/Dockerfile +0 -1
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/examples/website/notes/README.md +1 -1
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/pyproject.toml +1 -1
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/computer/conformance/checks.py +25 -13
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/computer/svc.py +1 -13
- agentenv_framework_protocol-0.1.548/src/agentenv_protocol/passthrough.py +19 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/website/__init__.py +11 -5
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/website/conformance.py +43 -18
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/website/environment.py +52 -19
- agentenv_framework_protocol-0.1.548/src/agentenv_protocol/website/forwarding.py +185 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/website/readiness.py +16 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/website_browser/environment.py +2 -9
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/tests/test_computer_app_server.py +7 -4
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/tests/test_computer_conformance.py +33 -0
- agentenv_framework_protocol-0.1.548/tests/test_computer_conformance_attempts.py +55 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/tests/test_computer_conformance_checks.py +10 -1
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/tests/test_computer_queue.py +3 -2
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/tests/test_website_conformance.py +19 -2
- agentenv_framework_protocol-0.1.548/tests/test_website_forwarding.py +394 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/.gitignore +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/LICENSE +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/NOTICE +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/THIRD_PARTY_NOTICES.md +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/examples/__init__.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/examples/advanced_agent.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/examples/basic_agent.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/examples/custom_extensions_agent.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/examples/multimodal_agent.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/examples/reference_model.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/examples/streaming_agent.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/examples/website/notes/.gitignore +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/examples/website/notes/Dockerfile.dockerignore +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/examples/website/notes/data/seed.json +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/examples/website/notes/env.toml +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/examples/website/notes/site.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/examples/website/notes/web/index.html +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/examples/website/notes/web/package-lock.json +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/examples/website/notes/web/package.json +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/examples/website/notes/web/src/main.js +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/examples/website/notes/web/src/style.css +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/examples/website/notes/web/vite.config.js +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/__init__.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/a2a_agent/__init__.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/a2a_agent/_trajectory_log.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/a2a_agent/_triggers.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/a2a_agent/extensions.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/a2a_agent/framework.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/a2a_agent/peer_agents.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/a2a_agent/proxy.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/a2a_agent/registry.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/a2a_agent/staging.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/a2a_agent/tasks/__init__.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/a2a_agent/tasks/v1.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/agent_env_environment.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/client.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/computer/__init__.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/computer/_declare.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/computer/_desktop.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/computer/_job.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/computer/_linux.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/computer/_load.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/computer/_macos.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/computer/_reaping.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/computer/_session_posix.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/computer/_session_windows.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/computer/_windows.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/computer/_with_fds.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/computer/_x11.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/computer/app.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/computer/app_data.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/computer/app_runtime.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/computer/apps.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/computer/card.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/computer/checks.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/computer/clock.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/computer/conformance/__init__.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/computer/conformance/__main__.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/computer/conformance/client.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/computer/conformance/desk.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/computer/conformance/fixture.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/computer/conformance/mp4.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/computer/conformance/page_fixture.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/computer/conformance/report.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/computer/conformance/wayland_fixture.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/computer/dataplane.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/computer/driver.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/computer/errors.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/computer/extensions.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/computer/frames.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/computer/keys.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/computer/launch.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/computer/manifest.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/computer/operations.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/computer/platform.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/computer/prefix.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/computer/queue.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/computer/recording.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/computer/results.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/computer/run_install_step.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/computer/runtime.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/computer/seed.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/computer/serve.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/computer/serve_app.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/computer/served.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/computer/session.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/computer/settings.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/computer/skill.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/computer/spaces.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/computer/tools.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/errors.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/manifest.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/preflight.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/tool_access.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/tool_client.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/tool_context.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/transfers.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/types.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/website/clock.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/website/errors.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/website/routes.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/website/session.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/website_browser/__init__.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/website_browser/cdp.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/website_browser/contexts.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/website_browser/control.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/website_browser/data.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/website_browser/devtools.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/website_browser/log.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/website_browser/network.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/website_browser/recording.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/website_browser/scope.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/src/agentenv_protocol/website_browser/shapes.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/tests/computer_fake.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/tests/probe_fake.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/tests/test_a2a_agent.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/tests/test_a2a_agent_examples.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/tests/test_a2a_cdp_config.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/tests/test_a2a_object_transfers.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/tests/test_a2a_peer_agents.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/tests/test_a2a_proxy.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/tests/test_a2a_staging.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/tests/test_a2a_trajectory_log.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/tests/test_agent_env_environment.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/tests/test_browser_cdp.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/tests/test_browser_contexts.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/tests/test_browser_data.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/tests/test_browser_log.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/tests/test_browser_network.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/tests/test_browser_recording.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/tests/test_browser_state.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/tests/test_client.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/tests/test_computer_app_data.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/tests/test_computer_clock.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/tests/test_computer_conformance_page.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/tests/test_computer_conformance_recording.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/tests/test_computer_dataplane.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/tests/test_computer_declare.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/tests/test_computer_driver.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/tests/test_computer_driver_keys.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/tests/test_computer_extensions.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/tests/test_computer_frames.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/tests/test_computer_macos.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/tests/test_computer_page.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/tests/test_computer_recording.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/tests/test_computer_seed.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/tests/test_computer_serve.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/tests/test_computer_served.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/tests/test_computer_session_windows.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/tests/test_computer_spaces.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/tests/test_computer_svc_forward.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/tests/test_computer_tool_prefix.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/tests/test_computer_windows_driver.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/tests/test_control_token.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/tests/test_data_objects.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/tests/test_devtools_pipe.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/tests/test_errors.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/tests/test_extension_methods.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/tests/test_intake.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/tests/test_manifest.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/tests/test_preflight.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/tests/test_tool_access.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/tests/test_tool_annotations.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/tests/test_tool_client.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/tests/test_tool_context.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/tests/test_tool_context_fastmcp.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/tests/test_tool_context_injection.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/tests/test_website_api.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/tests/test_website_browser.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/tests/test_website_environment.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/tests/test_website_live.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/tests/test_website_mcp.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/tests/test_website_notes_example.py +0 -0
- {agentenv_framework_protocol-0.1.544 → agentenv_framework_protocol-0.1.548}/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.548
|
|
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
|
|
@@ -615,6 +615,53 @@ class GitHub(WebsiteEnvironment):
|
|
|
615
615
|
- **The run:** a run that deploys a live site is marked live. The deploy record says `live`, and the run's metadata lists
|
|
616
616
|
its live sites with `reproducible: false`, because the real site may change between runs.
|
|
617
617
|
|
|
618
|
+
A third-party site is an app someone else wrote, such as a web store, that serves its own pages, wrapped so agentenv
|
|
619
|
+
deploys it like any site. `ForwardingSite` runs in the app's container beside it: it answers the card, the data plane
|
|
620
|
+
and `website/v1` itself, and forwards every other request to the app.
|
|
621
|
+
|
|
622
|
+
```python
|
|
623
|
+
from agentenv_protocol.website import ForwardingSite, session_state, website
|
|
624
|
+
|
|
625
|
+
|
|
626
|
+
@website(domains=["store.localhost"], builtin_routes=False, clock="real", ready_timeout_s=600)
|
|
627
|
+
class Store(ForwardingSite):
|
|
628
|
+
upstream = "http://127.0.0.1:80" # the app, in the same container
|
|
629
|
+
ready_path = "/admin" # ready once the app answers this below 500
|
|
630
|
+
sign_in_headers = ("X-Auto-Login",) # only the site's own calls send these; logged with values removed
|
|
631
|
+
|
|
632
|
+
@session_state
|
|
633
|
+
async def signed_in(self, user: str | None) -> dict:
|
|
634
|
+
answer = await self.ask_app("/admin", headers={"X-Auto-Login": "..."})
|
|
635
|
+
... # return the cookies the app answered with
|
|
636
|
+
```
|
|
637
|
+
|
|
638
|
+
- **Forwarding:** a request goes to the app as it came: its method, the site's own path with its encoding intact (an
|
|
639
|
+
escaped `/` stays escaped, and a forwarded prefix is taken off), its query, the `Host` the browser named and its
|
|
640
|
+
body, streamed, with no header or cookie of the forwarder's own. The hop-by-hop headers and `sign_in_headers` stay
|
|
641
|
+
behind. The answer comes back as the app gave it, streamed and still encoded, a redirect unfollowed, but a cookie
|
|
642
|
+
the app ties to one of the site's names (`Domain`) comes back the host's alone, as agentenv sets a sign-in's
|
|
643
|
+
cookies, so a sign-in replaces the app's session cookie rather than setting a second one beside it. An app not
|
|
644
|
+
answering is a 502 (`upstream_unavailable`). It forwards HTTP alone, and refuses a WebSocket with close code 1011.
|
|
645
|
+
- **`builtin_routes=False`** serves none of agentenv's own site routes, so `/api/session` reaches the app too, and the
|
|
646
|
+
card names no `session_path` or `session_cookie`. Any `WebsiteEnvironment` may set it.
|
|
647
|
+
- **`clock="real"`** declares a site that keeps real time, as an app that reads the system clock does: its card serves
|
|
648
|
+
no `clock/v1`, its `website/v1` params say `clock: "real"` (`WEBSITE_CLOCK_PARAM`), its answers carry no
|
|
649
|
+
`X-Universe-Now`, and `sync_env_clock` passes it over. The conformance check skips its two clock checks.
|
|
650
|
+
`@website` refuses `clock_patch` with it, since there's no universe time to put in a page.
|
|
651
|
+
- **Its data plane:** the app keeps its own data, so the site serves `data/get` alone, which exports nothing. It takes
|
|
652
|
+
no load and can't reset: agentenv's reset passes over a card serving no `data/reset`, and the conformance check
|
|
653
|
+
passes a card serving `data/get` alone once `data/get` answers.
|
|
654
|
+
- **Its session:** `@session_state` signs the browser in with whatever cookies the app sets, for example from one
|
|
655
|
+
server-side request carrying a sign-in header, which `sign_in_headers` then keeps the browser from sending. The
|
|
656
|
+
card names them too (`WEBSITE_SIGN_IN_HEADERS_PARAM`), so should a browser's request carry one, the browser's
|
|
657
|
+
network log, and so `network.har`, keeps it with its value taken out.
|
|
658
|
+
- **Its own calls:** `ask_app(path, method=..., headers=..., content=...)` asks the app as the site does, under its
|
|
659
|
+
first name as `Host`, through the forwarder's client, which keeps no cookie and follows no redirect. Its session
|
|
660
|
+
and ready checks use it, as `ForwardingSite`'s own ready check does.
|
|
661
|
+
- **Its names:** an app with a fixed base URL answers any other `Host` with a redirect to its own name. A browser
|
|
662
|
+
reaches it by that name alone, the site proxy naming it, and the conformance check's `any_host` passes `/` redirecting
|
|
663
|
+
to one of the card's `domains` as it does `/` serving HTML.
|
|
664
|
+
|
|
618
665
|
## Computer drivers
|
|
619
666
|
|
|
620
667
|
A computer driver is what runs inside a computer an agent uses through screenshots and input. Write
|
|
@@ -544,6 +544,53 @@ class GitHub(WebsiteEnvironment):
|
|
|
544
544
|
- **The run:** a run that deploys a live site is marked live. The deploy record says `live`, and the run's metadata lists
|
|
545
545
|
its live sites with `reproducible: false`, because the real site may change between runs.
|
|
546
546
|
|
|
547
|
+
A third-party site is an app someone else wrote, such as a web store, that serves its own pages, wrapped so agentenv
|
|
548
|
+
deploys it like any site. `ForwardingSite` runs in the app's container beside it: it answers the card, the data plane
|
|
549
|
+
and `website/v1` itself, and forwards every other request to the app.
|
|
550
|
+
|
|
551
|
+
```python
|
|
552
|
+
from agentenv_protocol.website import ForwardingSite, session_state, website
|
|
553
|
+
|
|
554
|
+
|
|
555
|
+
@website(domains=["store.localhost"], builtin_routes=False, clock="real", ready_timeout_s=600)
|
|
556
|
+
class Store(ForwardingSite):
|
|
557
|
+
upstream = "http://127.0.0.1:80" # the app, in the same container
|
|
558
|
+
ready_path = "/admin" # ready once the app answers this below 500
|
|
559
|
+
sign_in_headers = ("X-Auto-Login",) # only the site's own calls send these; logged with values removed
|
|
560
|
+
|
|
561
|
+
@session_state
|
|
562
|
+
async def signed_in(self, user: str | None) -> dict:
|
|
563
|
+
answer = await self.ask_app("/admin", headers={"X-Auto-Login": "..."})
|
|
564
|
+
... # return the cookies the app answered with
|
|
565
|
+
```
|
|
566
|
+
|
|
567
|
+
- **Forwarding:** a request goes to the app as it came: its method, the site's own path with its encoding intact (an
|
|
568
|
+
escaped `/` stays escaped, and a forwarded prefix is taken off), its query, the `Host` the browser named and its
|
|
569
|
+
body, streamed, with no header or cookie of the forwarder's own. The hop-by-hop headers and `sign_in_headers` stay
|
|
570
|
+
behind. The answer comes back as the app gave it, streamed and still encoded, a redirect unfollowed, but a cookie
|
|
571
|
+
the app ties to one of the site's names (`Domain`) comes back the host's alone, as agentenv sets a sign-in's
|
|
572
|
+
cookies, so a sign-in replaces the app's session cookie rather than setting a second one beside it. An app not
|
|
573
|
+
answering is a 502 (`upstream_unavailable`). It forwards HTTP alone, and refuses a WebSocket with close code 1011.
|
|
574
|
+
- **`builtin_routes=False`** serves none of agentenv's own site routes, so `/api/session` reaches the app too, and the
|
|
575
|
+
card names no `session_path` or `session_cookie`. Any `WebsiteEnvironment` may set it.
|
|
576
|
+
- **`clock="real"`** declares a site that keeps real time, as an app that reads the system clock does: its card serves
|
|
577
|
+
no `clock/v1`, its `website/v1` params say `clock: "real"` (`WEBSITE_CLOCK_PARAM`), its answers carry no
|
|
578
|
+
`X-Universe-Now`, and `sync_env_clock` passes it over. The conformance check skips its two clock checks.
|
|
579
|
+
`@website` refuses `clock_patch` with it, since there's no universe time to put in a page.
|
|
580
|
+
- **Its data plane:** the app keeps its own data, so the site serves `data/get` alone, which exports nothing. It takes
|
|
581
|
+
no load and can't reset: agentenv's reset passes over a card serving no `data/reset`, and the conformance check
|
|
582
|
+
passes a card serving `data/get` alone once `data/get` answers.
|
|
583
|
+
- **Its session:** `@session_state` signs the browser in with whatever cookies the app sets, for example from one
|
|
584
|
+
server-side request carrying a sign-in header, which `sign_in_headers` then keeps the browser from sending. The
|
|
585
|
+
card names them too (`WEBSITE_SIGN_IN_HEADERS_PARAM`), so should a browser's request carry one, the browser's
|
|
586
|
+
network log, and so `network.har`, keeps it with its value taken out.
|
|
587
|
+
- **Its own calls:** `ask_app(path, method=..., headers=..., content=...)` asks the app as the site does, under its
|
|
588
|
+
first name as `Host`, through the forwarder's client, which keeps no cookie and follows no redirect. Its session
|
|
589
|
+
and ready checks use it, as `ForwardingSite`'s own ready check does.
|
|
590
|
+
- **Its names:** an app with a fixed base URL answers any other `Host` with a redirect to its own name. A browser
|
|
591
|
+
reaches it by that name alone, the site proxy naming it, and the conformance check's `any_host` passes `/` redirecting
|
|
592
|
+
to one of the card's `domains` as it does `/` serving HTML.
|
|
593
|
+
|
|
547
594
|
## Computer drivers
|
|
548
595
|
|
|
549
596
|
A computer driver is what runs inside a computer an agent uses through screenshots and input. Write
|
|
@@ -7,7 +7,6 @@ RUN npm run build
|
|
|
7
7
|
|
|
8
8
|
FROM mirror.gcr.io/library/python:3.12-slim@sha256:423ed6ab25b1921a477529254bfeeabf5855151dc2c3141699a1bfc852199fbf
|
|
9
9
|
WORKDIR /app
|
|
10
|
-
RUN apt-get update && apt-get install -y --no-install-recommends curl && rm -rf /var/lib/apt/lists/*
|
|
11
10
|
RUN pip install --no-cache-dir "agentenv-framework-protocol>=0.1.466" "uvicorn>=0.30"
|
|
12
11
|
COPY site.py /app/site.py
|
|
13
12
|
COPY data /app/data
|
|
@@ -9,7 +9,7 @@ them. The page shows the universe's time.
|
|
|
9
9
|
| `site.py` | The server: the `Notes` WebsiteEnvironment, its `@api` routes, and `serve()` on `PORT` (8000). |
|
|
10
10
|
| `data/seed.json` | The seed data: two users (`ann`, `ben`), their notes, and `current_user`, the acting user. |
|
|
11
11
|
| `web/` | A minimal Vite app (`index.html`, `src/main.js`, `src/style.css`). Its assets (`base: "./"`) and API calls are relative to the page, so it works at `/` and under the gateway's `/website/notes/` alike; opened at a path without its final slash, such as `/website/notes` or `/website/notes/index.html`, the page first reloads itself at its folder's address. |
|
|
12
|
-
| `Dockerfile` | The server image, built with this folder as its context: Node builds `web/`, then Python installs the released protocol (`agentenv-framework-protocol`) with uvicorn.
|
|
12
|
+
| `Dockerfile` | The server image, built with this folder as its context: Node builds `web/`, then Python installs the released protocol (`agentenv-framework-protocol`) with uvicorn. |
|
|
13
13
|
| `env.toml` | The website env as a bundle entry. |
|
|
14
14
|
|
|
15
15
|
## What it exercises
|
|
@@ -64,6 +64,9 @@ FIXTURE_START_S = 30.0
|
|
|
64
64
|
NORM = 1000
|
|
65
65
|
#: How long the probe records, and the frame rate it asks for.
|
|
66
66
|
RECORD_S = 2.0
|
|
67
|
+
#: How many times a check whose effect a busy desk can miss is tried before it fails: a desk starved through a drag
|
|
68
|
+
#: sees its motion as one event, and keys sent while the click that focuses a box waits go wherever focus was.
|
|
69
|
+
BUSY_DESK_ATTEMPTS = 2
|
|
67
70
|
RECORD_FPS = 5
|
|
68
71
|
#: Prints a file's size and SHA-256 as JSON, run with ``python3 -c`` on the computer.
|
|
69
72
|
READ_DIGEST = ("import hashlib,json,sys;d=open(sys.argv[1],'rb').read();"
|
|
@@ -165,15 +168,22 @@ class Probe:
|
|
|
165
168
|
|
|
166
169
|
# Recording
|
|
167
170
|
|
|
168
|
-
async def check(self, check: str, name: str, test: Test, *extensions: str) -> bool:
|
|
169
|
-
try
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
171
|
+
async def check(self, check: str, name: str, test: Test, *extensions: str, attempts: int = 1) -> bool:
|
|
172
|
+
"""Run ``test`` up to ``attempts`` times until it passes; a pass after a failed try says what that try found."""
|
|
173
|
+
tried: list[str] = []
|
|
174
|
+
while True:
|
|
175
|
+
try:
|
|
176
|
+
problem = await test()
|
|
177
|
+
except NotApplicable as e:
|
|
178
|
+
self._record(check, name, "not_applicable", str(e), extensions)
|
|
179
|
+
return True
|
|
180
|
+
except Exception as e:
|
|
181
|
+
problem = f"{type(e).__name__}: {e}"
|
|
182
|
+
if problem is None or len(tried) + 1 == attempts:
|
|
183
|
+
break
|
|
184
|
+
tried.append(problem)
|
|
185
|
+
detail = problem or (f"passed on try {len(tried) + 1} of {attempts}; before: {'; '.join(tried)}" if tried else "")
|
|
186
|
+
self._record(check, name, "failed" if problem else "passed", detail, extensions)
|
|
177
187
|
return problem is None
|
|
178
188
|
|
|
179
189
|
async def _guarded(self, check: str, section: Callable[[], Awaitable[None]]) -> None:
|
|
@@ -837,7 +847,7 @@ class Probe:
|
|
|
837
847
|
|
|
838
848
|
await self.check("P6", "Unicode and mixed-case text arrives whole", unicode)
|
|
839
849
|
await self.check("P6", "typed text arrives as key events", events)
|
|
840
|
-
await self.check("P6", "a chord selects all, and Backspace clears it", chord)
|
|
850
|
+
await self.check("P6", "a chord selects all, and Backspace clears it", chord, attempts=BUSY_DESK_ATTEMPTS)
|
|
841
851
|
await self.check("P6", "a repeated key presses that many times", repeat)
|
|
842
852
|
await self.check("P6", "tabs and newlines arrive as typed", whitespace)
|
|
843
853
|
await self.check("P6", "typing leaves the clipboard as it was", clipboard)
|
|
@@ -865,8 +875,9 @@ class Probe:
|
|
|
865
875
|
start, end, waypoint = (50, 50), (300, 250), (200, 100)
|
|
866
876
|
points = [start, waypoint, end] if int(self.features.get("max_drag_points", 2)) >= 3 else [start, end]
|
|
867
877
|
path = [list(self._at("pad", scale, x, y)) for x, y in points]
|
|
878
|
+
before = (await self.state())["drags"]
|
|
868
879
|
await self.act("computer_drag", {"path": path, "duration_ms": 400, "frame_id": frame})
|
|
869
|
-
ok, state = await self.until(lambda s:
|
|
880
|
+
ok, state = await self.until(lambda s: s["drags"] != before)
|
|
870
881
|
if not ok:
|
|
871
882
|
return "no drag reached the pad"
|
|
872
883
|
stroke = state["drags"][-1]
|
|
@@ -878,7 +889,8 @@ class Probe:
|
|
|
878
889
|
|
|
879
890
|
await self.check("P7", "a scroll moves a list", scroll_list)
|
|
880
891
|
await self.check("P7", "scrolls up, down, left and right each arrive that many times", directions)
|
|
881
|
-
await self.check("P7", "a drag starts and ends where it says, through its waypoints", drag
|
|
892
|
+
await self.check("P7", "a drag starts and ends where it says, through its waypoints", drag,
|
|
893
|
+
attempts=BUSY_DESK_ATTEMPTS)
|
|
882
894
|
|
|
883
895
|
async def _pointer_input(self) -> None:
|
|
884
896
|
if not self.driver.declares(COMPUTER_POINTER):
|
|
@@ -1063,7 +1075,7 @@ class Probe:
|
|
|
1063
1075
|
return f"segments {unmeasured} lack their times, size, frame count or digest"
|
|
1064
1076
|
span = (_when(segments[-1].ended_at) - _when(segments[0].started_at)).total_seconds()
|
|
1065
1077
|
frames = sum(s.frames for s in segments)
|
|
1066
|
-
if span < RECORD_S
|
|
1078
|
+
if span < RECORD_S / 2 or frames < fps * RECORD_S / 2:
|
|
1067
1079
|
return f"{frames} frames over {span:.2f} s of a {RECORD_S:g} s recording at {fps} fps"
|
|
1068
1080
|
for before, after in zip(segments, segments[1:]):
|
|
1069
1081
|
gap = (_when(after.started_at) - _when(before.ended_at)).total_seconds()
|
|
@@ -21,14 +21,12 @@ from starlette.websockets import WebSocket, WebSocketDisconnect
|
|
|
21
21
|
from websockets.asyncio.client import ClientConnection
|
|
22
22
|
|
|
23
23
|
from ..agent_env_environment import _error_response
|
|
24
|
+
from ..passthrough import passed_on
|
|
24
25
|
from .errors import DeliveryFailed
|
|
25
26
|
from .served import TOKEN_HEADER, served
|
|
26
27
|
|
|
27
28
|
#: The methods the route forwards.
|
|
28
29
|
METHODS = ["GET", "HEAD", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"]
|
|
29
|
-
#: The headers that belong to one connection, which a proxy doesn't pass on.
|
|
30
|
-
HOP_HEADERS = frozenset({"connection", "keep-alive", "proxy-authenticate", "proxy-authorization", "proxy-connection",
|
|
31
|
-
"te", "trailer", "transfer-encoding", "upgrade"})
|
|
32
30
|
#: The address a request reached the driver at, which the driver sets for the app in place of any the caller sent.
|
|
33
31
|
FORWARDED = ("x-forwarded-host", "x-forwarded-proto", "x-forwarded-prefix")
|
|
34
32
|
#: A WebSocket close code that means the connection ended without one, which a close can't send on.
|
|
@@ -45,16 +43,6 @@ REDACTED = "<redacted>"
|
|
|
45
43
|
FORWARDER_LOGGER = "httpx"
|
|
46
44
|
|
|
47
45
|
|
|
48
|
-
def passed_on(headers: Iterable[tuple[str, str]], *dropped: str) -> list[tuple[str, str]]:
|
|
49
|
-
"""``headers`` as a proxy passes them on: without the hop-by-hop ones, those a ``Connection`` header names, and
|
|
50
|
-
``dropped``."""
|
|
51
|
-
headers = list(headers)
|
|
52
|
-
named = {token.strip().lower() for name, value in headers if name.lower() == "connection"
|
|
53
|
-
for token in value.split(",")}
|
|
54
|
-
skipped = HOP_HEADERS | named | set(dropped)
|
|
55
|
-
return [(name, value) for name, value in headers if name.lower() not in skipped]
|
|
56
|
-
|
|
57
|
-
|
|
58
46
|
def to_app(headers: Iterable[tuple[str, str]], host: str, scheme: str, prefix: str) -> list[tuple[str, str]]:
|
|
59
47
|
"""A caller's headers as the app gets them: passed on without the control token's ``Authorization`` or any address
|
|
60
48
|
the caller forwarded, nor any app token, which the driver sets itself where the app takes one, and with the
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"""What a proxy passes on of the headers it relays, shared by the driver's ``/svc/<name>/`` route and a website that
|
|
2
|
+
forwards to an app beside it."""
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from collections.abc import Iterable
|
|
6
|
+
|
|
7
|
+
#: The headers that belong to one connection, which a proxy doesn't pass on.
|
|
8
|
+
HOP_HEADERS = frozenset({"connection", "keep-alive", "proxy-authenticate", "proxy-authorization", "proxy-connection",
|
|
9
|
+
"te", "trailer", "transfer-encoding", "upgrade"})
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def passed_on(headers: Iterable[tuple[str, str]], *dropped: str) -> list[tuple[str, str]]:
|
|
13
|
+
"""``headers`` as a proxy passes them on: without the hop-by-hop ones, those a ``Connection`` header names, and
|
|
14
|
+
``dropped``, each matched without regard to case."""
|
|
15
|
+
headers = list(headers)
|
|
16
|
+
named = {token.strip().lower() for name, value in headers if name.lower() == "connection"
|
|
17
|
+
for token in value.split(",")}
|
|
18
|
+
skipped = HOP_HEADERS | named | {name.lower() for name in dropped}
|
|
19
|
+
return [(name, value) for name, value in headers if name.lower() not in skipped]
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"""The website SDK: a site's server, meeting ``urn:agentenv:website/v1``. Subclass WebsiteEnvironment, declare the
|
|
2
2
|
site with ``@website(domains=[...], static="dist/")``, mark its API with ``@api.get/post/put/patch/delete(path)``, and
|
|
3
|
-
``serve()`` it
|
|
4
|
-
that meets the contract works, which ``python -m
|
|
5
|
-
is ready is its ``WebsiteReadiness`` answer to ``ready``, which ``website_readiness`` reads of one site and
|
|
3
|
+
``serve()`` it, or wrap an app that serves its own pages with ``ForwardingSite``; it needs only the plain package, and
|
|
4
|
+
uvicorn to serve. The class is optional: a server in any language that meets the contract works, which ``python -m
|
|
5
|
+
agentenv_protocol.website.conformance <url>`` checks. Whether a site is ready is its ``WebsiteReadiness`` answer to ``ready``, which ``website_readiness`` reads of one site and
|
|
6
6
|
``env_readiness`` of every site of an env. What a task left a site with is its data plane's ``data/get``."""
|
|
7
7
|
|
|
8
8
|
from __future__ import annotations
|
|
@@ -19,15 +19,20 @@ from .environment import (
|
|
|
19
19
|
website,
|
|
20
20
|
)
|
|
21
21
|
from .errors import ApiError, BadRequest, Conflict, Forbidden, NotFound, Unauthorized
|
|
22
|
+
from .forwarding import ForwardingSite
|
|
22
23
|
from .readiness import (
|
|
23
24
|
DEFAULT_HEALTH_PATH,
|
|
24
25
|
READY_TIMEOUT_S,
|
|
26
|
+
REAL_CLOCK,
|
|
25
27
|
SITE_READY_TIMEOUT_S,
|
|
28
|
+
UNIVERSE_CLOCK,
|
|
26
29
|
WEBSITE_ALLOW_HOSTS_PARAM,
|
|
27
30
|
WEBSITE_BROWSE_URL_PARAM,
|
|
31
|
+
WEBSITE_CLOCK_PARAM,
|
|
28
32
|
WEBSITE_EXTENSION_URI,
|
|
29
33
|
WEBSITE_LIVE_PARAM,
|
|
30
34
|
WEBSITE_READY_OP,
|
|
35
|
+
WEBSITE_SIGN_IN_HEADERS_PARAM,
|
|
31
36
|
WebsiteReadiness,
|
|
32
37
|
env_readiness,
|
|
33
38
|
website_readiness,
|
|
@@ -38,9 +43,10 @@ from .session import SESSION_COOKIE, SESSION_SECRET_ENV, SessionSigner
|
|
|
38
43
|
__all__ = [
|
|
39
44
|
"WebsiteEnvironment", "WebsiteDeclaration", "website", "api", "ApiContext", "ApiRoute", "ready_check", "session_state", "host_problem",
|
|
40
45
|
"ApiError", "BadRequest", "Unauthorized", "Forbidden", "NotFound", "Conflict",
|
|
41
|
-
"UniverseClock", "ClockUnavailable", "SessionSigner", "reserved_path",
|
|
46
|
+
"UniverseClock", "ClockUnavailable", "SessionSigner", "reserved_path", "ForwardingSite",
|
|
42
47
|
"WEBSITE_EXTENSION_URI", "CLOCK_EXTENSION_URI", "UNIVERSE_NOW_HEADER", "DEFAULT_HEALTH_PATH", "SESSION_PATH",
|
|
43
48
|
"SESSION_COOKIE", "SESSION_SECRET_ENV", "ROLE_KEY_ENV", "ROLE_KEY_HEADER",
|
|
44
|
-
"WEBSITE_READY_OP", "WEBSITE_BROWSE_URL_PARAM", "WEBSITE_LIVE_PARAM", "WEBSITE_ALLOW_HOSTS_PARAM", "
|
|
49
|
+
"WEBSITE_READY_OP", "WEBSITE_BROWSE_URL_PARAM", "WEBSITE_LIVE_PARAM", "WEBSITE_ALLOW_HOSTS_PARAM", "WEBSITE_CLOCK_PARAM",
|
|
50
|
+
"WEBSITE_SIGN_IN_HEADERS_PARAM", "UNIVERSE_CLOCK", "REAL_CLOCK", "WEBSITE_SETTINGS_ENV", "READY_TIMEOUT_S", "SITE_READY_TIMEOUT_S", "WebsiteReadiness",
|
|
45
51
|
"website_readiness", "env_readiness",
|
|
46
52
|
]
|
|
@@ -3,16 +3,19 @@ agentenv_protocol.website.conformance <url>`` prints each check and exits 1 when
|
|
|
3
3
|
``--strict``, when a recommended one warned), 2 when the server couldn't be reached. Everything goes over HTTP.
|
|
4
4
|
|
|
5
5
|
The required checks are the contract, what agentenv, the gateway and a browser rely on of a website env's server: a
|
|
6
|
-
card declaring the site's domains, readiness and routes; ``/`` serving HTML under a made-up host
|
|
7
|
-
the card's ``website/v1`` ``ready``, whose answer must be a
|
|
8
|
-
deprecated, for a card without it); the data plane's and card's
|
|
9
|
-
card advertises, whose round trip at the card's ``url`` (data/get,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
6
|
+
card declaring the site's domains, readiness and routes; ``/`` serving HTML under a made-up host, or redirecting to
|
|
7
|
+
one of the site's own names; the site ready, by the card's ``website/v1`` ``ready``, whose answer must be a
|
|
8
|
+
``WebsiteReadiness`` (by the declared health path, deprecated, for a card without it); the data plane's and card's
|
|
9
|
+
paths not the site's pages; and the data plane the card advertises, whose round trip at the card's ``url`` (data/get,
|
|
10
|
+
data/reset, data/get, which no longer returns the exported data, data/add of what the first data/get returned,
|
|
11
|
+
data/get again) returns what it was given, or, for a card serving ``data/get`` alone, a site whose app keeps its own
|
|
12
|
+
data and so takes no load and can't reset, which answers it; and, for a card declaring an ``mcp`` interface, a site
|
|
13
|
+
that is an MCP server too, that endpoint answering ``initialize`` and listing, every page of ``tools/list`` read, no
|
|
14
|
+
tool its card doesn't (streamable HTTP, ``MCP_PROTOCOL_VERSION``); a card's tool it doesn't list is warned, since a
|
|
15
|
+
hidden-by-default tool is listed to no caller until one enables it. A failed one is ``failed``. The recommended checks
|
|
16
|
+
are what an SDK site does and the gateway uses when a server offers it: ``X-Universe-Now`` on every answer the other
|
|
17
|
+
checks got, ``clock/v1``'s ``sync_time`` against a clock the checker serves (both skipped for a site whose
|
|
18
|
+
``website/v1`` params declare ``clock: "real"``, a third-party app that keeps real time), the forwarded headers
|
|
16
19
|
wherever an answer shows them (on ``/`` and on a GET route with its trailing slash toggled, which a server may
|
|
17
20
|
redirect), and the cookies those answers set: none tied to a domain, the session path's the one the card names, and
|
|
18
21
|
none whose lifetime is an absolute ``Expires`` with no ``Max-Age``. A failed one is ``warned``.
|
|
@@ -36,6 +39,7 @@ import time
|
|
|
36
39
|
import uuid
|
|
37
40
|
from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer
|
|
38
41
|
from typing import Callable, Iterator, Literal
|
|
42
|
+
from urllib.parse import urlsplit
|
|
39
43
|
|
|
40
44
|
import httpx
|
|
41
45
|
from pydantic import ValidationError
|
|
@@ -43,9 +47,12 @@ from pydantic import ValidationError
|
|
|
43
47
|
from ..client import find_extension, find_extension_method
|
|
44
48
|
from ..types import MCP_TRANSPORT, METHOD_ADD, METHOD_GET, METHOD_RESET, RPC_PATH, WELL_KNOWN_PATH
|
|
45
49
|
from .clock import CLOCK_EXTENSION_URI, UNIVERSE_NOW_HEADER, iso, parse_time
|
|
46
|
-
from .readiness import DEFAULT_HEALTH_PATH, WEBSITE_EXTENSION_URI, WEBSITE_READY_OP,
|
|
50
|
+
from .readiness import (DEFAULT_HEALTH_PATH, REAL_CLOCK, WEBSITE_CLOCK_PARAM, WEBSITE_EXTENSION_URI, WEBSITE_READY_OP,
|
|
51
|
+
WebsiteReadiness, names_host)
|
|
47
52
|
|
|
48
53
|
Status = Literal["passed", "failed", "skipped", "warned"]
|
|
54
|
+
#: The checks of a site's clock, which a card declaring a real clock skips.
|
|
55
|
+
CLOCK_CHECKS = ("universe_now", "clock")
|
|
49
56
|
CLOCK_START = datetime.datetime(2031, 5, 6, 7, 8, 9, tzinfo=datetime.timezone.utc)
|
|
50
57
|
CLOCK_SLACK_S = 120
|
|
51
58
|
MCP_PROTOCOL_VERSION = "2025-06-18"
|
|
@@ -114,14 +121,21 @@ class _Checker:
|
|
|
114
121
|
site = (find_extension(card, WEBSITE_EXTENSION_URI) or {}).get("params") or {}
|
|
115
122
|
health = site.get("health") if isinstance(site.get("health"), str) else DEFAULT_HEALTH_PATH
|
|
116
123
|
# (name, required, check): a recommended check's failure is warned.
|
|
117
|
-
steps = (("card", True, lambda: self._card(response, card, site)), ("any_host", True, self._any_host),
|
|
124
|
+
steps = (("card", True, lambda: self._card(response, card, site)), ("any_host", True, lambda: self._any_host(site)),
|
|
118
125
|
("health", True, lambda: self._health(card, health)), ("universe_now", False, self._universe_now),
|
|
119
126
|
("reserved_paths", True, self._reserved_paths), ("data_plane", True, lambda: self._data_plane(card)),
|
|
120
127
|
("mcp", True, lambda: self._mcp(card)),
|
|
121
128
|
("clock", False, lambda: self._clock(card)), ("forwarded", False, lambda: self._forwarded(site)),
|
|
122
129
|
("cookies", False, lambda: self._cookies(site)))
|
|
123
|
-
|
|
124
|
-
|
|
130
|
+
real_clock = site.get(WEBSITE_CLOCK_PARAM) == REAL_CLOCK
|
|
131
|
+
|
|
132
|
+
def outcome(name: str, step: Callable[[], tuple[Status, str]]) -> tuple[Status, str]:
|
|
133
|
+
if real_clock and name in CLOCK_CHECKS:
|
|
134
|
+
return "skipped", "the card declares a real clock, which nothing moves"
|
|
135
|
+
return _outcome(step)
|
|
136
|
+
|
|
137
|
+
outcomes = {name: outcome(name, step) for name, _required, step in steps if name != "universe_now"}
|
|
138
|
+
outcomes["universe_now"] = outcome("universe_now", self._universe_now)
|
|
125
139
|
results = []
|
|
126
140
|
for name, required, _step in steps:
|
|
127
141
|
status, detail = outcomes[name]
|
|
@@ -145,13 +159,20 @@ class _Checker:
|
|
|
145
159
|
problems.append("its params' routes aren't a list of {method, path, name}")
|
|
146
160
|
return ("failed" if problems else "passed"), "; ".join(problems)
|
|
147
161
|
|
|
148
|
-
def _any_host(self) -> tuple[Status, str]:
|
|
162
|
+
def _any_host(self, site: dict) -> tuple[Status, str]:
|
|
163
|
+
"""``/`` under a made-up Host serves HTML, or redirects to one of the site's own names: an app with a fixed
|
|
164
|
+
base URL, which a browser reaches only by its name."""
|
|
149
165
|
host = f"conformance-{uuid.uuid4().hex[:8]}.invalid"
|
|
150
|
-
response = self.get("/", headers={"Host": host})
|
|
166
|
+
response = self.get("/", headers={"Host": host}, follow_redirects=False)
|
|
151
167
|
kind = response.headers.get("content-type", "")
|
|
152
168
|
if response.status_code == 200 and kind.startswith("text/html"):
|
|
153
169
|
return "passed", f"/ served HTML for Host {host}"
|
|
154
|
-
|
|
170
|
+
to = (urlsplit(response.headers.get("location", "")).hostname or "") if response.is_redirect else ""
|
|
171
|
+
domains = site.get("domains") if isinstance(site.get("domains"), list) else []
|
|
172
|
+
if to and any(isinstance(domain, str) and names_host(domain.lower(), to) for domain in domains):
|
|
173
|
+
return "passed", f"/ for Host {host} redirected to the site's own name {to}"
|
|
174
|
+
return "failed", (f"/ for Host {host} answered {response.status_code} {kind or 'without a content type'}"
|
|
175
|
+
+ (f", redirecting to {to}, not one of the site's names" if to else ""))
|
|
155
176
|
|
|
156
177
|
def _health(self, card: dict, health: str) -> tuple[Status, str]:
|
|
157
178
|
ready = find_extension_method(card, WEBSITE_EXTENSION_URI, WEBSITE_READY_OP)
|
|
@@ -208,11 +229,15 @@ class _Checker:
|
|
|
208
229
|
operations = (card.get("capabilities") or {}).get("operations")
|
|
209
230
|
operations = operations if isinstance(operations, list) else []
|
|
210
231
|
missing = [m for m in (METHOD_GET, METHOD_RESET, METHOD_ADD) if m not in operations]
|
|
211
|
-
|
|
232
|
+
get_alone = set(missing) == {METHOD_RESET, METHOD_ADD}
|
|
233
|
+
if missing and not get_alone:
|
|
212
234
|
return "failed", f"the card's operations lack {', '.join(missing)}"
|
|
213
235
|
url = card.get("url")
|
|
214
236
|
self.rpc_url = self._url(url if isinstance(url, str) and url else RPC_PATH)
|
|
215
237
|
exported = self._rpc(METHOD_GET).get("parts") or []
|
|
238
|
+
if get_alone:
|
|
239
|
+
return "passed", (f"the card serves {METHOD_GET} alone, which answered with {len(exported)} part(s): a site "
|
|
240
|
+
"whose app keeps its own data, which takes no load and can't reset")
|
|
216
241
|
self._rpc(METHOD_RESET)
|
|
217
242
|
added_back = False
|
|
218
243
|
try:
|