agentenv-framework-protocol 0.1.465__tar.gz → 0.1.467__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.465 → agentenv_framework_protocol-0.1.467}/PKG-INFO +26 -1
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/README.md +25 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/pyproject.toml +1 -1
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/computer/app_runtime.py +14 -4
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/computer/apps.py +7 -4
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/website/__init__.py +2 -1
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/website/readiness.py +4 -1
- agentenv_framework_protocol-0.1.467/src/agentenv_protocol/website_browser/__init__.py +23 -0
- agentenv_framework_protocol-0.1.467/src/agentenv_protocol/website_browser/control.py +649 -0
- agentenv_framework_protocol-0.1.467/src/agentenv_protocol/website_browser/devtools.py +121 -0
- agentenv_framework_protocol-0.1.467/src/agentenv_protocol/website_browser/environment.py +490 -0
- agentenv_framework_protocol-0.1.467/src/agentenv_protocol/website_browser/shapes.py +161 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/tests/test_browser_cdp.py +1 -1
- agentenv_framework_protocol-0.1.467/tests/test_browser_state.py +314 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/tests/test_computer_app_server.py +19 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/tests/test_website_browser.py +2 -2
- agentenv_framework_protocol-0.1.465/src/agentenv_protocol/website_browser.py +0 -984
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/.gitignore +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/LICENSE +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/NOTICE +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/THIRD_PARTY_NOTICES.md +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/examples/__init__.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/examples/advanced_agent.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/examples/basic_agent.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/examples/custom_extensions_agent.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/examples/multimodal_agent.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/examples/reference_model.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/examples/streaming_agent.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/__init__.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/a2a_agent/__init__.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/a2a_agent/_trajectory_log.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/a2a_agent/_triggers.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/a2a_agent/extensions.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/a2a_agent/framework.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/a2a_agent/peer_agents.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/a2a_agent/proxy.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/a2a_agent/registry.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/a2a_agent/staging.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/a2a_agent/tasks/__init__.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/a2a_agent/tasks/v1.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/agent_env_environment.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/browser_cdp.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/client.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/computer/__init__.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/computer/_declare.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/computer/_linux.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/computer/_load.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/computer/_macos.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/computer/_with_fds.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/computer/app.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/computer/app_data.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/computer/card.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/computer/checks.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/computer/conformance/__init__.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/computer/conformance/__main__.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/computer/conformance/checks.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/computer/conformance/client.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/computer/conformance/fixture.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/computer/conformance/mp4.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/computer/conformance/page_fixture.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/computer/conformance/report.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/computer/dataplane.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/computer/driver.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/computer/errors.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/computer/extensions.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/computer/frames.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/computer/keys.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/computer/launch.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/computer/manifest.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/computer/operations.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/computer/platform.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/computer/queue.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/computer/recording.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/computer/results.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/computer/run_install_step.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/computer/runtime.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/computer/seed.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/computer/serve.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/computer/serve_app.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/computer/session.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/computer/settings.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/computer/skill.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/computer/spaces.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/computer/svc.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/computer/tools.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/errors.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/manifest.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/preflight.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/tool_access.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/tool_client.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/tool_context.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/transfers.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/types.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/website/clock.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/website/conformance.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/website/environment.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/website/errors.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/website/routes.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/src/agentenv_protocol/website/session.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/tests/computer_fake.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/tests/probe_fake.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/tests/test_a2a_agent.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/tests/test_a2a_agent_examples.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/tests/test_a2a_cdp_config.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/tests/test_a2a_object_transfers.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/tests/test_a2a_peer_agents.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/tests/test_a2a_proxy.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/tests/test_a2a_staging.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/tests/test_a2a_trajectory_log.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/tests/test_agent_env_environment.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/tests/test_client.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/tests/test_computer_app_data.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/tests/test_computer_conformance.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/tests/test_computer_conformance_checks.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/tests/test_computer_conformance_page.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/tests/test_computer_conformance_recording.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/tests/test_computer_dataplane.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/tests/test_computer_declare.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/tests/test_computer_driver.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/tests/test_computer_extensions.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/tests/test_computer_frames.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/tests/test_computer_macos.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/tests/test_computer_page.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/tests/test_computer_queue.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/tests/test_computer_recording.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/tests/test_computer_seed.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/tests/test_computer_serve.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/tests/test_computer_spaces.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/tests/test_computer_svc_forward.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/tests/test_control_token.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/tests/test_data_objects.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/tests/test_errors.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/tests/test_extension_methods.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/tests/test_intake.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/tests/test_manifest.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/tests/test_preflight.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/tests/test_tool_access.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/tests/test_tool_annotations.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/tests/test_tool_client.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/tests/test_tool_context.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/tests/test_tool_context_fastmcp.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/tests/test_tool_context_injection.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/tests/test_website_api.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/tests/test_website_conformance.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/tests/test_website_environment.py +0 -0
- {agentenv_framework_protocol-0.1.465 → agentenv_framework_protocol-0.1.467}/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.467
|
|
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
|
|
@@ -969,6 +969,31 @@ are the profile's template. The base class adds:
|
|
|
969
969
|
- `files/choose {paths}`, files in `~/Uploads` for the file chooser open on it, which headless, and so
|
|
970
970
|
alone, it intercepts;
|
|
971
971
|
- `page/state`, the active tab's id, URL and title and the dialog or file chooser open on it.
|
|
972
|
+
- `cookies/get {urls?}`, `cookies/set {cookies}` and `cookies/delete {name?, domain?, path?}`, on its default
|
|
973
|
+
context, each cookie as Playwright's `storageState` has it, CDP's `Network.Cookie` fields (`name`, `value`,
|
|
974
|
+
`domain`, `path`, `expires`, `httpOnly`, `secure`, `sameSite`), so a storage state exported from Playwright loads
|
|
975
|
+
as is, and a partitioned cookie's `partitionKey` (`{topLevelSite, hasCrossSiteAncestor}`), without which it would
|
|
976
|
+
be another cookie. `get` returns the cookies a request to any of `urls` would send, as Playwright picks them, else
|
|
977
|
+
every one; `set` takes a `url`, or a `domain` and a `path` (`/` by default), and may carry `max_age` in place of
|
|
978
|
+
`expires`: seconds from when it's set, on the computer's clock, which the browser's cookies are judged by. It sets
|
|
979
|
+
them all at once, so a cookie the browser refuses leaves none set. `delete` removes every cookie with all the
|
|
980
|
+
fields it's given, every cookie with none, partitioned or not, and says how many. A cookie refused names its
|
|
981
|
+
fields, never its value;
|
|
982
|
+
- `local_storage/get {origins?}`, `local_storage/set {origins}` and `local_storage/clear {origins?}`, each origin
|
|
983
|
+
as `storageState` has it, `{origin, localStorage: [{name, value}]}`. CDP reaches an origin's local storage only
|
|
984
|
+
through a page of it, so each goes through a hidden page agentenv sends to the origin and serves itself, past any
|
|
985
|
+
service worker of the origin: the site gets no request and runs no script. The origins answered are as the browser
|
|
986
|
+
names them (`https://xn--bcher-kva.de` for `https://bücher.de`). With no `origins`, every origin a page or a
|
|
987
|
+
same-site frame loaded since its server started, and those agentenv set. A cross-site iframe's local storage is
|
|
988
|
+
partitioned under the site that embeds it, and isn't read, as Playwright's `storageState` doesn't read it either.
|
|
989
|
+
Agents' CDP connections see each hidden page come and go as a target of type `other`;
|
|
990
|
+
- `downloads/list` and `downloads/get {guid, write_namespace?}`, a download and, completed, its file: uploaded
|
|
991
|
+
under the `write_namespace` grant when there is one, else inline, as `data/get` returns files. Inline, the whole
|
|
992
|
+
file is read into memory and sent base64 in one answer, so a large one belongs under a grant.
|
|
993
|
+
|
|
994
|
+
The record's entries are the models in `agentenv_protocol.website_browser` (`OpenTab`, with the tab that opened
|
|
995
|
+
it as `opener`; `ClosedTab`; `Download`; `Dialog`; `LaunchEntry`; `BrowserRecord`), every field present and null
|
|
996
|
+
until it's known.
|
|
972
997
|
- `cdp {user}`, `user`'s CDP address once the browser is ready, `http_url` to discover from and
|
|
973
998
|
`ws_url` to connect to, both at the address the call reached it at with a token agentenv mints in
|
|
974
999
|
the path: the same one each time it's asked for. Through the driver they're under
|
|
@@ -907,6 +907,31 @@ are the profile's template. The base class adds:
|
|
|
907
907
|
- `files/choose {paths}`, files in `~/Uploads` for the file chooser open on it, which headless, and so
|
|
908
908
|
alone, it intercepts;
|
|
909
909
|
- `page/state`, the active tab's id, URL and title and the dialog or file chooser open on it.
|
|
910
|
+
- `cookies/get {urls?}`, `cookies/set {cookies}` and `cookies/delete {name?, domain?, path?}`, on its default
|
|
911
|
+
context, each cookie as Playwright's `storageState` has it, CDP's `Network.Cookie` fields (`name`, `value`,
|
|
912
|
+
`domain`, `path`, `expires`, `httpOnly`, `secure`, `sameSite`), so a storage state exported from Playwright loads
|
|
913
|
+
as is, and a partitioned cookie's `partitionKey` (`{topLevelSite, hasCrossSiteAncestor}`), without which it would
|
|
914
|
+
be another cookie. `get` returns the cookies a request to any of `urls` would send, as Playwright picks them, else
|
|
915
|
+
every one; `set` takes a `url`, or a `domain` and a `path` (`/` by default), and may carry `max_age` in place of
|
|
916
|
+
`expires`: seconds from when it's set, on the computer's clock, which the browser's cookies are judged by. It sets
|
|
917
|
+
them all at once, so a cookie the browser refuses leaves none set. `delete` removes every cookie with all the
|
|
918
|
+
fields it's given, every cookie with none, partitioned or not, and says how many. A cookie refused names its
|
|
919
|
+
fields, never its value;
|
|
920
|
+
- `local_storage/get {origins?}`, `local_storage/set {origins}` and `local_storage/clear {origins?}`, each origin
|
|
921
|
+
as `storageState` has it, `{origin, localStorage: [{name, value}]}`. CDP reaches an origin's local storage only
|
|
922
|
+
through a page of it, so each goes through a hidden page agentenv sends to the origin and serves itself, past any
|
|
923
|
+
service worker of the origin: the site gets no request and runs no script. The origins answered are as the browser
|
|
924
|
+
names them (`https://xn--bcher-kva.de` for `https://bücher.de`). With no `origins`, every origin a page or a
|
|
925
|
+
same-site frame loaded since its server started, and those agentenv set. A cross-site iframe's local storage is
|
|
926
|
+
partitioned under the site that embeds it, and isn't read, as Playwright's `storageState` doesn't read it either.
|
|
927
|
+
Agents' CDP connections see each hidden page come and go as a target of type `other`;
|
|
928
|
+
- `downloads/list` and `downloads/get {guid, write_namespace?}`, a download and, completed, its file: uploaded
|
|
929
|
+
under the `write_namespace` grant when there is one, else inline, as `data/get` returns files. Inline, the whole
|
|
930
|
+
file is read into memory and sent base64 in one answer, so a large one belongs under a grant.
|
|
931
|
+
|
|
932
|
+
The record's entries are the models in `agentenv_protocol.website_browser` (`OpenTab`, with the tab that opened
|
|
933
|
+
it as `opener`; `ClosedTab`; `Download`; `Dialog`; `LaunchEntry`; `BrowserRecord`), every field present and null
|
|
934
|
+
until it's known.
|
|
910
935
|
- `cdp {user}`, `user`'s CDP address once the browser is ready, `http_url` to discover from and
|
|
911
936
|
`ws_url` to connect to, both at the address the call reached it at with a token agentenv mints in
|
|
912
937
|
the path: the same one each time it's asked for. Through the driver they're under
|
|
@@ -38,6 +38,7 @@ LAUNCHES = Path(".agentenv/launches")
|
|
|
38
38
|
EXIT_WAIT_S = 5.0
|
|
39
39
|
#: How long a stopped app may take to exit before it's killed.
|
|
40
40
|
STOP_TIMEOUT_S = 10.0
|
|
41
|
+
HOLD_BOOT_LAUNCH_ENV = "AGENTENV_HOLD_BOOT_LAUNCH"
|
|
41
42
|
|
|
42
43
|
|
|
43
44
|
class AppReadiness(BaseModel):
|
|
@@ -76,9 +77,10 @@ class AppRuntime:
|
|
|
76
77
|
|
|
77
78
|
async def start(self) -> None:
|
|
78
79
|
"""Once its X display is up, when it has one, add the app's menu launcher on a desktop and launch a boot app,
|
|
79
|
-
unless the computer has launched it since it booted, at boot or on demand
|
|
80
|
-
app be, or with ``relaunch_on_start``, for an app
|
|
81
|
-
launches it again, whether it was launched at boot
|
|
80
|
+
unless the computer has launched it since it booted, at boot or on demand, or its boot launch is held
|
|
81
|
+
(``boot_launch_held``): a server that restarts leaves the app be, or with ``relaunch_on_start``, for an app
|
|
82
|
+
only the server that launched it can talk to, stops it and launches it again, whether it was launched at boot
|
|
83
|
+
or on demand."""
|
|
82
84
|
if self.launch is None:
|
|
83
85
|
return
|
|
84
86
|
if os.environ.get("DISPLAY"):
|
|
@@ -87,7 +89,7 @@ class AppRuntime:
|
|
|
87
89
|
session.add_launcher(os.environ["ENVIRONMENT_NAME"], Path.cwd())
|
|
88
90
|
launched = _launched_at() is not None
|
|
89
91
|
relaunch = self.relaunch_on_start and launched
|
|
90
|
-
if relaunch or (self.launch.at == "boot" and not launched):
|
|
92
|
+
if relaunch or (self.launch.at == "boot" and not launched and not boot_launch_held()):
|
|
91
93
|
try:
|
|
92
94
|
if relaunch:
|
|
93
95
|
await self.stop_app()
|
|
@@ -192,6 +194,14 @@ class AppRuntime:
|
|
|
192
194
|
return None if passed else f"@ready_check {name} returned {passed!r}"
|
|
193
195
|
|
|
194
196
|
|
|
197
|
+
def boot_launch_held() -> bool:
|
|
198
|
+
"""Whether the computer holds its boot apps' launches (``HOLD_BOOT_LAUNCH_ENV`` is ``1`` in its environment): each
|
|
199
|
+
app's server then leaves its boot app unlaunched, the driver counts it ready until something launches it, and
|
|
200
|
+
whoever booted the computer launches each one through ``computer-app/v1``'s ``launch`` once it has set the computer
|
|
201
|
+
up for them, as a deploy routing the run's websites does once their names, CA and proxy are in place."""
|
|
202
|
+
return os.environ.get(HOLD_BOOT_LAUNCH_ENV) == "1"
|
|
203
|
+
|
|
204
|
+
|
|
195
205
|
def _mark() -> Path:
|
|
196
206
|
return LAUNCHED / Path.cwd().name
|
|
197
207
|
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"""The apps composed onto a computer, as its driver finds them, whether each is ready, and how the driver fronts them.
|
|
2
2
|
Each app's own server answers on its folder's socket (``serve_app``): its card says how the app launches and which
|
|
3
3
|
paths it owns, and its ``computer-app/v1`` ``ready`` whether it's ready. Every app's server must answer before the
|
|
4
|
-
computer is ready; an app that starts with the computer must also be ready, and a ``demand`` app
|
|
5
|
-
|
|
6
|
-
``/svc/<name>/``, where it forwards each
|
|
4
|
+
computer is ready; an app that starts with the computer must also be ready, and a ``demand`` app, or a boot app
|
|
5
|
+
while the computer holds its launch (``boot_launch_held``), is checked once something launches it. The driver lists
|
|
6
|
+
each app as a child environment named for its folder, its card's paths under ``/svc/<name>/``, where it forwards each
|
|
7
|
+
request to the app's server (``svc``)."""
|
|
7
8
|
from __future__ import annotations
|
|
8
9
|
|
|
9
10
|
import asyncio
|
|
@@ -17,7 +18,7 @@ import httpx
|
|
|
17
18
|
from .. import client
|
|
18
19
|
from ..types import RPC_PATH, WELL_KNOWN_PATH, EnvironmentCard
|
|
19
20
|
from .app import COMPUTER_APP, FAILURE, SOCKET
|
|
20
|
-
from .app_runtime import CHECK_TIMEOUT_S, LAUNCHES, AppReadiness
|
|
21
|
+
from .app_runtime import CHECK_TIMEOUT_S, LAUNCHES, AppReadiness, boot_launch_held
|
|
21
22
|
from .operations import ReadyCheck
|
|
22
23
|
|
|
23
24
|
#: Where a composed computer installs its apps, a folder each.
|
|
@@ -45,6 +46,8 @@ async def check(folder: Path) -> ReadyCheck:
|
|
|
45
46
|
return ReadyCheck(f"app {name}", False, _unanswered(folder))
|
|
46
47
|
if launch is not None and launch["at"] == "demand" and not answer.launched:
|
|
47
48
|
return ReadyCheck(f"app {name}", True, "its server answers; it launches on demand")
|
|
49
|
+
if launch is not None and boot_launch_held() and not answer.launched:
|
|
50
|
+
return ReadyCheck(f"app {name}", True, "its server answers; its boot launch is held")
|
|
48
51
|
if answer.ready:
|
|
49
52
|
return ReadyCheck(f"app {name}", True, "ready")
|
|
50
53
|
when = (f"not ready after {answer.timeout_s:.0f} s" if answer.waited_s > answer.timeout_s
|
|
@@ -21,6 +21,7 @@ from .readiness import (
|
|
|
21
21
|
DEFAULT_HEALTH_PATH,
|
|
22
22
|
READY_TIMEOUT_S,
|
|
23
23
|
SITE_READY_TIMEOUT_S,
|
|
24
|
+
WEBSITE_BROWSE_URL_PARAM,
|
|
24
25
|
WEBSITE_EXTENSION_URI,
|
|
25
26
|
WEBSITE_READY_OP,
|
|
26
27
|
WebsiteReadiness,
|
|
@@ -36,6 +37,6 @@ __all__ = [
|
|
|
36
37
|
"UniverseClock", "ClockUnavailable", "SessionSigner", "reserved_path",
|
|
37
38
|
"WEBSITE_EXTENSION_URI", "CLOCK_EXTENSION_URI", "UNIVERSE_NOW_HEADER", "DEFAULT_HEALTH_PATH", "SESSION_PATH",
|
|
38
39
|
"SESSION_COOKIE", "SESSION_SECRET_ENV", "ROLE_KEY_ENV", "ROLE_KEY_HEADER",
|
|
39
|
-
"WEBSITE_READY_OP", "READY_TIMEOUT_S", "SITE_READY_TIMEOUT_S", "WebsiteReadiness",
|
|
40
|
+
"WEBSITE_READY_OP", "WEBSITE_BROWSE_URL_PARAM", "READY_TIMEOUT_S", "SITE_READY_TIMEOUT_S", "WebsiteReadiness",
|
|
40
41
|
"website_readiness", "env_readiness",
|
|
41
42
|
]
|
|
@@ -4,7 +4,9 @@ it is usable now through its card's ``urn:agentenv:website/v1`` ``ready`` (``WEB
|
|
|
4
4
|
of an env, a composed card's children or a single site's own card, and answers for the env as a whole; asking one
|
|
5
5
|
site may take ``READY_TIMEOUT_S`` by default. A site may say how long it may take to be ready (``timeout_s``,
|
|
6
6
|
``SITE_READY_TIMEOUT_S`` when it says nothing). A server whose card has no ``ready`` is asked at its health path,
|
|
7
|
-
``DEFAULT_HEALTH_PATH`` unless it names one, which is deprecated.
|
|
7
|
+
``DEFAULT_HEALTH_PATH`` unless it names one, which is deprecated. A composer serving a site to a browser at a route of
|
|
8
|
+
its own, as the env gateway serves ``/website/<name>/``, says where on the site's ``website/v1`` params, as
|
|
9
|
+
``WEBSITE_BROWSE_URL_PARAM``: a path joined onto the composed card's address, or a full URL."""
|
|
8
10
|
from __future__ import annotations
|
|
9
11
|
|
|
10
12
|
import asyncio
|
|
@@ -17,6 +19,7 @@ from ..client import find_extension_method, invoke_extension
|
|
|
17
19
|
|
|
18
20
|
WEBSITE_EXTENSION_URI = "urn:agentenv:website/v1"
|
|
19
21
|
WEBSITE_READY_OP = "ready"
|
|
22
|
+
WEBSITE_BROWSE_URL_PARAM = "browse_url"
|
|
20
23
|
READY_TIMEOUT_S = 10.0
|
|
21
24
|
SITE_READY_TIMEOUT_S = 300.0
|
|
22
25
|
DEFAULT_HEALTH_PATH = "/api/health"
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"""WebsiteBrowserEnvironment: a website browser as a computer app, run inside a computer or alone. A subclass says how
|
|
2
|
+
its build installs and starts; this class adds what agentenv owns, the same in both: its flags after the subclass's
|
|
3
|
+
command, the unattended-use policies, a CDP connection over the browser's debugging pipe, the settings every browser
|
|
4
|
+
takes, a fresh cache and the deploy's prompt answers at every launch, another window for a launch while it runs, its
|
|
5
|
+
skill and ``browser/v1`` on its card. It runs alone, headless, on a computer with no display, a browser computer's,
|
|
6
|
+
whose screen is its page; which site proxy it goes through comes from a variable agentenv sets, never from its
|
|
7
|
+
settings."""
|
|
8
|
+
from .control import (ACTIVE_CHECK_TIMEOUT_S, AGENT, AGENTENV, CAPTURE_TIMEOUT_S, DOWNLOADS, EXIT, HASH_CHUNK_BYTES,
|
|
9
|
+
PAGE_INPUT, PAGES, PIN_TIMEOUT_S, STOP, UNKNOWN, UNNAVIGATED_CAPTURE_TIMEOUT_S, UPLOADS,
|
|
10
|
+
BrowserControl)
|
|
11
|
+
from .devtools import MAX_MESSAGE_BYTES, PIPE_IN, PIPE_OUT, DevToolsError, DevToolsPipe
|
|
12
|
+
from .environment import (ALONE_BYPASS, BLOCK, BROWSER, COMPUTER_BYPASS, OWNED_FLAGS, POLICIES, READY_POLL_S,
|
|
13
|
+
SHM_MIN_BYTES, SITE_PROXY_ENV, SKILL, BrowserSettings, WebsiteBrowserEnvironment, Window)
|
|
14
|
+
from .shapes import (BrowserRecord, ClosedTab, Cookie, CookieToSet, Dialog, Download, LaunchEntry, OpenTab,
|
|
15
|
+
OriginStorage, PartitionKey, StorageItem, origin_of)
|
|
16
|
+
|
|
17
|
+
__all__ = ["ACTIVE_CHECK_TIMEOUT_S", "AGENT", "AGENTENV", "ALONE_BYPASS", "BLOCK", "BROWSER", "CAPTURE_TIMEOUT_S",
|
|
18
|
+
"COMPUTER_BYPASS", "DOWNLOADS", "EXIT", "HASH_CHUNK_BYTES", "MAX_MESSAGE_BYTES", "OWNED_FLAGS", "PAGE_INPUT",
|
|
19
|
+
"PAGES", "PIN_TIMEOUT_S", "PIPE_IN", "PIPE_OUT", "POLICIES", "READY_POLL_S", "SHM_MIN_BYTES",
|
|
20
|
+
"SITE_PROXY_ENV", "SKILL", "STOP", "UNKNOWN", "UNNAVIGATED_CAPTURE_TIMEOUT_S", "UPLOADS", "BrowserControl",
|
|
21
|
+
"BrowserSettings", "DevToolsError", "DevToolsPipe", "WebsiteBrowserEnvironment", "Window",
|
|
22
|
+
"BrowserRecord", "ClosedTab", "Cookie", "CookieToSet", "Dialog", "Download", "LaunchEntry", "OpenTab",
|
|
23
|
+
"OriginStorage", "PartitionKey", "StorageItem", "origin_of"]
|