agentenv-framework-protocol 0.1.449__tar.gz → 0.1.451__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.449 → agentenv_framework_protocol-0.1.451}/PKG-INFO +1 -1
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/pyproject.toml +1 -1
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/src/agentenv_protocol/computer/conformance/fixture.py +57 -12
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/tests/test_computer_conformance.py +26 -1
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/.gitignore +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/LICENSE +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/NOTICE +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/README.md +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/THIRD_PARTY_NOTICES.md +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/examples/__init__.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/examples/advanced_agent.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/examples/basic_agent.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/examples/custom_extensions_agent.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/examples/multimodal_agent.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/examples/reference_model.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/examples/streaming_agent.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/src/agentenv_protocol/__init__.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/src/agentenv_protocol/a2a_agent/__init__.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/src/agentenv_protocol/a2a_agent/_trajectory_log.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/src/agentenv_protocol/a2a_agent/_triggers.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/src/agentenv_protocol/a2a_agent/extensions.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/src/agentenv_protocol/a2a_agent/framework.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/src/agentenv_protocol/a2a_agent/peer_agents.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/src/agentenv_protocol/a2a_agent/proxy.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/src/agentenv_protocol/a2a_agent/registry.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/src/agentenv_protocol/a2a_agent/staging.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/src/agentenv_protocol/a2a_agent/tasks/__init__.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/src/agentenv_protocol/a2a_agent/tasks/v1.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/src/agentenv_protocol/agent_env_environment.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/src/agentenv_protocol/client.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/src/agentenv_protocol/computer/__init__.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/src/agentenv_protocol/computer/_declare.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/src/agentenv_protocol/computer/_linux.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/src/agentenv_protocol/computer/_load.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/src/agentenv_protocol/computer/_with_fds.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/src/agentenv_protocol/computer/app.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/src/agentenv_protocol/computer/app_data.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/src/agentenv_protocol/computer/app_runtime.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/src/agentenv_protocol/computer/apps.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/src/agentenv_protocol/computer/card.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/src/agentenv_protocol/computer/checks.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/src/agentenv_protocol/computer/conformance/__init__.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/src/agentenv_protocol/computer/conformance/__main__.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/src/agentenv_protocol/computer/conformance/checks.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/src/agentenv_protocol/computer/conformance/client.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/src/agentenv_protocol/computer/conformance/mp4.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/src/agentenv_protocol/computer/conformance/page_fixture.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/src/agentenv_protocol/computer/conformance/report.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/src/agentenv_protocol/computer/dataplane.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/src/agentenv_protocol/computer/driver.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/src/agentenv_protocol/computer/errors.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/src/agentenv_protocol/computer/extensions.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/src/agentenv_protocol/computer/frames.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/src/agentenv_protocol/computer/keys.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/src/agentenv_protocol/computer/launch.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/src/agentenv_protocol/computer/manifest.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/src/agentenv_protocol/computer/operations.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/src/agentenv_protocol/computer/platform.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/src/agentenv_protocol/computer/queue.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/src/agentenv_protocol/computer/recording.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/src/agentenv_protocol/computer/results.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/src/agentenv_protocol/computer/run_install_step.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/src/agentenv_protocol/computer/runtime.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/src/agentenv_protocol/computer/seed.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/src/agentenv_protocol/computer/serve.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/src/agentenv_protocol/computer/serve_app.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/src/agentenv_protocol/computer/session.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/src/agentenv_protocol/computer/settings.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/src/agentenv_protocol/computer/skill.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/src/agentenv_protocol/computer/spaces.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/src/agentenv_protocol/computer/svc.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/src/agentenv_protocol/computer/tools.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/src/agentenv_protocol/errors.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/src/agentenv_protocol/manifest.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/src/agentenv_protocol/preflight.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/src/agentenv_protocol/tool_access.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/src/agentenv_protocol/tool_client.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/src/agentenv_protocol/tool_context.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/src/agentenv_protocol/transfers.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/src/agentenv_protocol/types.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/src/agentenv_protocol/website_browser.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/tests/computer_fake.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/tests/probe_fake.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/tests/test_a2a_agent.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/tests/test_a2a_agent_examples.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/tests/test_a2a_cdp_config.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/tests/test_a2a_object_transfers.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/tests/test_a2a_peer_agents.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/tests/test_a2a_proxy.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/tests/test_a2a_staging.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/tests/test_a2a_trajectory_log.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/tests/test_agent_env_environment.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/tests/test_client.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/tests/test_computer_app_data.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/tests/test_computer_app_server.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/tests/test_computer_conformance_checks.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/tests/test_computer_conformance_page.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/tests/test_computer_conformance_recording.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/tests/test_computer_dataplane.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/tests/test_computer_declare.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/tests/test_computer_driver.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/tests/test_computer_extensions.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/tests/test_computer_frames.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/tests/test_computer_page.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/tests/test_computer_queue.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/tests/test_computer_recording.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/tests/test_computer_seed.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/tests/test_computer_serve.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/tests/test_computer_spaces.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/tests/test_computer_svc_forward.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/tests/test_control_token.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/tests/test_data_objects.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/tests/test_errors.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/tests/test_extension_methods.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/tests/test_intake.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/tests/test_manifest.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/tests/test_preflight.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/tests/test_tool_access.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/tests/test_tool_annotations.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/tests/test_tool_client.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/tests/test_tool_context.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/tests/test_tool_context_fastmcp.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/tests/test_tool_context_injection.py +0 -0
- {agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/tests/test_website_browser.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.451
|
|
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
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
"""The
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"""The fixture the conformance probe stages with data/add and launches with computer-exec: a Tk window, the Fixture
|
|
2
|
+
Desk, whose widgets' screen boxes are written to <state-dir>/layout.json and every effect that reaches it, with
|
|
3
|
+
whatever lands in <state-dir>/inbox.txt, to <state-dir>/state.json, so the probe can aim at it and read back what
|
|
4
|
+
arrived. It records the same effects under X11, macOS's Aqua and Windows, whose Tk names keys, binds select-all and
|
|
5
|
+
reports the wheel differently. Run as ``python3 fixture.py <state-dir>``; it needs a 1280x800 screen or larger."""
|
|
5
6
|
from __future__ import annotations
|
|
6
7
|
|
|
8
|
+
import ctypes
|
|
7
9
|
import json
|
|
8
10
|
import os
|
|
9
11
|
import sys
|
|
@@ -19,6 +21,14 @@ MARKERS = ((11, 11, "#ff0000"), (12, 11, "#00ff00"), (11, 12, "#0000ff"), (12, 1
|
|
|
19
21
|
(20, 37, "#00ffff"))
|
|
20
22
|
CLIPBOARD = "agentenv-probe clipboard"
|
|
21
23
|
MIN_SIZE = (1280, 800)
|
|
24
|
+
#: X11's keysyms for the keys Aqua's Tk names by their character.
|
|
25
|
+
KEYSYMS = {",": "comma", " ": "space"}
|
|
26
|
+
#: A wheel notch's <MouseWheel> delta where Tk scales the wheel: Windows', and Tk 9's everywhere.
|
|
27
|
+
NOTCH_DELTA = 120
|
|
28
|
+
#: Tk 9 packs a <TouchpadScroll>'s distances into its delta: y, a signed 16-bit number, in the low bits, x above.
|
|
29
|
+
Y_BITS = 16
|
|
30
|
+
#: The pixels of a scrolled line, macOS's for a scroll posted in lines.
|
|
31
|
+
LINE_PX = 10
|
|
22
32
|
|
|
23
33
|
|
|
24
34
|
def main(state_dir: Path) -> None:
|
|
@@ -32,7 +42,7 @@ def main(state_dir: Path) -> None:
|
|
|
32
42
|
state: dict = {"name": "", "notes": "", "keys": [], "saved_count": 0, "subscribed": False, "selected": None,
|
|
33
43
|
"scroll_top": 0.0, "cells": {}, "right_clicks": 0, "double_clicks": 0, "drags": [],
|
|
34
44
|
"wheel": {"up": 0, "down": 0, "left": 0, "right": 0}, "clipboard": None, "loaded": None,
|
|
35
|
-
"screen": [width, height]}
|
|
45
|
+
"screen": [width, height], "windowing": root.tk.call("tk", "windowingsystem")}
|
|
36
46
|
|
|
37
47
|
def save() -> None:
|
|
38
48
|
part = state_dir / ".state.json.part"
|
|
@@ -52,12 +62,20 @@ def main(state_dir: Path) -> None:
|
|
|
52
62
|
|
|
53
63
|
def key(event) -> None:
|
|
54
64
|
state["name"] = name.get()
|
|
55
|
-
state["keys"] = (state["keys"] + [event.keysym])[-100:]
|
|
65
|
+
state["keys"] = (state["keys"] + [KEYSYMS.get(event.keysym, event.keysym)])[-100:]
|
|
56
66
|
state["clipboard"] = _clipboard(root)
|
|
57
67
|
save()
|
|
58
68
|
|
|
59
69
|
name.bind("<KeyRelease>", key)
|
|
60
70
|
|
|
71
|
+
def select_all(event) -> str:
|
|
72
|
+
name.selection_range(0, "end")
|
|
73
|
+
name.icursor("end")
|
|
74
|
+
return "break"
|
|
75
|
+
|
|
76
|
+
# Tk binds Ctrl+/ to select-all on X11 alone; Aqua's is Cmd+A.
|
|
77
|
+
name.bind("<Control-slash>", select_all)
|
|
78
|
+
|
|
61
79
|
def on_save() -> None:
|
|
62
80
|
state["saved_count"] += 1
|
|
63
81
|
save()
|
|
@@ -157,14 +175,25 @@ def main(state_dir: Path) -> None:
|
|
|
157
175
|
wheel = tk.Canvas(root, width=200, height=120, bg="#e6f0ff", highlightthickness=0)
|
|
158
176
|
wheel.place(x=840, y=500)
|
|
159
177
|
|
|
160
|
-
def wheeled(
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
state["wheel"][("left" if horizontal else "up") if button == 4 else ("right" if horizontal else "down")] += 1
|
|
178
|
+
def wheeled(horizontal: bool, steps: int) -> None:
|
|
179
|
+
way = ("left" if horizontal else "up") if steps > 0 else ("right" if horizontal else "down")
|
|
180
|
+
state["wheel"][way] += abs(steps)
|
|
164
181
|
save()
|
|
165
182
|
|
|
166
|
-
|
|
167
|
-
|
|
183
|
+
def scrolled(delta: int) -> None:
|
|
184
|
+
if steps := touchpad_steps(delta):
|
|
185
|
+
wheeled(*steps)
|
|
186
|
+
|
|
187
|
+
# Tk 8.6 on X11 reports the wheel as buttons 4 and 5, Aqua, Windows and Tk 9 as <MouseWheel>, a horizontal scroll
|
|
188
|
+
# (X's buttons 6 and 7) as a vertical one with Shift held. Tk 9 reports a scroll in pixels, a trackpad's or one a
|
|
189
|
+
# driver posts as Aqua's do, as <TouchpadScroll>.
|
|
190
|
+
if root.tk.call("tk", "windowingsystem") == "x11" and tk.TkVersion < 8.7:
|
|
191
|
+
wheel.bind("<Button-4>", lambda e: wheeled(bool(e.state & 1), 1))
|
|
192
|
+
wheel.bind("<Button-5>", lambda e: wheeled(bool(e.state & 1), -1))
|
|
193
|
+
else:
|
|
194
|
+
wheel.bind("<MouseWheel>", lambda e: wheeled(bool(e.state & 1), wheel_steps(e.delta)))
|
|
195
|
+
if tk.TkVersion >= 8.7:
|
|
196
|
+
wheel.bind("<TouchpadScroll>", lambda e: scrolled(e.delta))
|
|
168
197
|
|
|
169
198
|
field = tk.Canvas(root, width=48, height=48, bg="#000000", highlightthickness=0, bd=0)
|
|
170
199
|
field.place(x=1080, y=500)
|
|
@@ -198,6 +227,22 @@ def main(state_dir: Path) -> None:
|
|
|
198
227
|
root.mainloop()
|
|
199
228
|
|
|
200
229
|
|
|
230
|
+
def wheel_steps(delta: int) -> int:
|
|
231
|
+
"""The wheel steps a <MouseWheel> event's ``delta`` holds, up positive: whole notches of 120 where Tk scales them
|
|
232
|
+
so (Windows, and Tk 9 everywhere), else one a unit (Aqua's Tk 8.6)."""
|
|
233
|
+
return int(delta / NOTCH_DELTA) if abs(delta) >= NOTCH_DELTA else delta
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
def touchpad_steps(delta: int) -> tuple[bool, int] | None:
|
|
237
|
+
"""The steps a <TouchpadScroll> event's ``delta`` holds, as horizontal or not and up or left positive, or None
|
|
238
|
+
when it moves nothing. A step is a line, LINE_PX, and macOS may coalesce several into one event."""
|
|
239
|
+
dx, dy = delta >> Y_BITS, ctypes.c_int16(delta).value
|
|
240
|
+
if not (dx or dy):
|
|
241
|
+
return None
|
|
242
|
+
distance = dy or dx
|
|
243
|
+
return not dy, (1 if distance > 0 else -1) * max(1, round(abs(distance) / LINE_PX))
|
|
244
|
+
|
|
245
|
+
|
|
201
246
|
def _clipboard(root: tk.Tk) -> str | None:
|
|
202
247
|
try:
|
|
203
248
|
return root.clipboard_get()
|
|
@@ -4,8 +4,10 @@ full needs gets those checks unverified; a driver broken one way fails the check
|
|
|
4
4
|
fronts that exports is asked for its export once; the report's verdicts and the CLI."""
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
7
|
+
import importlib
|
|
7
8
|
import json
|
|
8
|
-
|
|
9
|
+
import sys
|
|
10
|
+
from types import ModuleType, SimpleNamespace
|
|
9
11
|
|
|
10
12
|
import pytest
|
|
11
13
|
|
|
@@ -284,6 +286,29 @@ async def test_a_fixture_that_doesnt_start_leaves_full_unverified_and_is_cleaned
|
|
|
284
286
|
assert (["kill", "4243"] in probed.commands) is (driver is SilentFixture)
|
|
285
287
|
|
|
286
288
|
|
|
289
|
+
@pytest.mark.parametrize("delta, steps", [(1, 1), (-3, -3), (120, 1), (-360, -3), (240, 2)],
|
|
290
|
+
ids=["aqua-up", "aqua-down-3", "scaled-up", "scaled-down-3", "scaled-up-2"])
|
|
291
|
+
def test_the_fixture_counts_a_wheel_events_steps_whether_tk_scales_them_by_120_or_not(delta, steps, monkeypatch):
|
|
292
|
+
"""Aqua's Tk 8.6 reports a step as a delta of 1; Windows, and Tk 9 everywhere, as 120."""
|
|
293
|
+
assert _fixture(monkeypatch).wheel_steps(delta) == steps
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
@pytest.mark.parametrize("delta, steps", [(10, (False, 1)), (65526, (False, -1)), (65516, (False, -2)),
|
|
297
|
+
(655360, (True, 1)), (-655360, (True, -1)), (0, None)],
|
|
298
|
+
ids=["up", "down", "down-2-coalesced", "left", "right", "still"])
|
|
299
|
+
def test_the_fixture_counts_a_scroll_tk_9_reports_in_pixels_by_the_lines_it_moves(delta, steps, monkeypatch):
|
|
300
|
+
"""The deltas Tk 9 on macOS gave cua-driver's scrolls: 10 pixels a line, two lines at once where macOS coalesced
|
|
301
|
+
them."""
|
|
302
|
+
assert _fixture(monkeypatch).touchpad_steps(delta) == steps
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
def _fixture(monkeypatch):
|
|
306
|
+
"""The fixture module, which runs in the computer, read with Tk stood in for, as this Python may have none."""
|
|
307
|
+
monkeypatch.setitem(sys.modules, "tkinter", ModuleType("tkinter"))
|
|
308
|
+
monkeypatch.delitem(sys.modules, "agentenv_protocol.computer.conformance.fixture", raising=False)
|
|
309
|
+
return importlib.import_module("agentenv_protocol.computer.conformance.fixture")
|
|
310
|
+
|
|
311
|
+
|
|
287
312
|
def test_a_refusal_must_carry_the_code_and_applied_no():
|
|
288
313
|
def result(error: bool, **data) -> CallToolResult:
|
|
289
314
|
return CallToolResult(content=[TextContent(type="text", text="x")], structuredContent=data, isError=error)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/THIRD_PARTY_NOTICES.md
RENAMED
|
File without changes
|
{agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/examples/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/examples/basic_agent.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/tests/computer_fake.py
RENAMED
|
File without changes
|
{agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/tests/probe_fake.py
RENAMED
|
File without changes
|
{agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/tests/test_a2a_agent.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/tests/test_a2a_proxy.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/tests/test_client.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
|
{agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/tests/test_errors.py
RENAMED
|
File without changes
|
|
File without changes
|
{agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/tests/test_intake.py
RENAMED
|
File without changes
|
{agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/tests/test_manifest.py
RENAMED
|
File without changes
|
{agentenv_framework_protocol-0.1.449 → agentenv_framework_protocol-0.1.451}/tests/test_preflight.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
|