authyouragent 0.3.0__tar.gz → 0.3.2__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.
- {authyouragent-0.3.0 → authyouragent-0.3.2}/PKG-INFO +1 -1
- {authyouragent-0.3.0 → authyouragent-0.3.2}/authyouragent/__init__.py +1 -1
- {authyouragent-0.3.0 → authyouragent-0.3.2}/authyouragent/mcp_server.py +22 -5
- {authyouragent-0.3.0 → authyouragent-0.3.2}/authyouragent.egg-info/PKG-INFO +1 -1
- {authyouragent-0.3.0 → authyouragent-0.3.2}/pyproject.toml +1 -1
- {authyouragent-0.3.0 → authyouragent-0.3.2}/README.md +0 -0
- {authyouragent-0.3.0 → authyouragent-0.3.2}/authyouragent/__main__.py +0 -0
- {authyouragent-0.3.0 → authyouragent-0.3.2}/authyouragent/agent.py +0 -0
- {authyouragent-0.3.0 → authyouragent-0.3.2}/authyouragent/site.py +0 -0
- {authyouragent-0.3.0 → authyouragent-0.3.2}/authyouragent/takeover.py +0 -0
- {authyouragent-0.3.0 → authyouragent-0.3.2}/authyouragent/vault_cli.py +0 -0
- {authyouragent-0.3.0 → authyouragent-0.3.2}/authyouragent/vault_seccomp.json +0 -0
- {authyouragent-0.3.0 → authyouragent-0.3.2}/authyouragent.egg-info/SOURCES.txt +0 -0
- {authyouragent-0.3.0 → authyouragent-0.3.2}/authyouragent.egg-info/dependency_links.txt +0 -0
- {authyouragent-0.3.0 → authyouragent-0.3.2}/authyouragent.egg-info/entry_points.txt +0 -0
- {authyouragent-0.3.0 → authyouragent-0.3.2}/authyouragent.egg-info/requires.txt +0 -0
- {authyouragent-0.3.0 → authyouragent-0.3.2}/authyouragent.egg-info/top_level.txt +0 -0
- {authyouragent-0.3.0 → authyouragent-0.3.2}/setup.cfg +0 -0
|
@@ -125,8 +125,12 @@ def _err(e):
|
|
|
125
125
|
|
|
126
126
|
@mcp.tool()
|
|
127
127
|
async def navigate(url: str) -> str:
|
|
128
|
-
"""Open a URL in the browser.
|
|
129
|
-
|
|
128
|
+
"""Open a URL in the vault's browser and wait for the page to load. Returns the
|
|
129
|
+
final URL and title, after any redirects (a redirect to a sign-in page means
|
|
130
|
+
you need check_login_wall, then request_takeover). Only public websites open:
|
|
131
|
+
local, private-network and internal addresses are refused with an error.
|
|
132
|
+
The page keeps any session the owner signed in to during a take over.
|
|
133
|
+
url: the full URL, e.g. "https://example.com/account"."""
|
|
130
134
|
try:
|
|
131
135
|
return f"page: {_where(await _call('POST', '/navigate', json={'url': url}))}"
|
|
132
136
|
except Exception as e:
|
|
@@ -135,7 +139,12 @@ async def navigate(url: str) -> str:
|
|
|
135
139
|
|
|
136
140
|
@mcp.tool()
|
|
137
141
|
async def click(selector: str) -> str:
|
|
138
|
-
"""Click an element on the page
|
|
142
|
+
"""Click an element on the current page and return the page's URL and title
|
|
143
|
+
afterwards. If the click would commit something (it submits a form, or the
|
|
144
|
+
button says create, send, save, delete, pay and the like), the vault first asks
|
|
145
|
+
the owner to approve it on their phone and waits up to about five minutes; a
|
|
146
|
+
denial returns an error and nothing is clicked. Sign-in and search forms are
|
|
147
|
+
not interrupted.
|
|
139
148
|
selector: a CSS or Playwright selector, e.g. "button[type=submit]" or "text=Add Server"."""
|
|
140
149
|
try:
|
|
141
150
|
return f"clicked: {selector}\npage: {_where(await _call('POST', '/click', json={'selector': selector}))}"
|
|
@@ -159,7 +168,10 @@ async def type_text(selector: str, text: str, submit: bool = False) -> str:
|
|
|
159
168
|
|
|
160
169
|
@mcp.tool()
|
|
161
170
|
async def read_page(max_chars: int = 5000) -> str:
|
|
162
|
-
"""Read the page
|
|
171
|
+
"""Read the current page: its URL, title and visible text, in reading order.
|
|
172
|
+
Use it after navigate or click to see what is on screen (no screenshot needed).
|
|
173
|
+
Text in form fields and hidden elements is not included.
|
|
174
|
+
max_chars: how much text to return, 200 to 20000 (default 5000)."""
|
|
163
175
|
try:
|
|
164
176
|
d = await _call('GET', '/read', params={'max_chars': max_chars})
|
|
165
177
|
return f"url: {d['url']}\ntitle: {d['title']}\n\n{d['text']}"
|
|
@@ -232,7 +244,12 @@ async def request_takeover(reason: str, wait_seconds: int = WAIT_DEFAULT, ctx: C
|
|
|
232
244
|
@mcp.tool()
|
|
233
245
|
async def wait_for_takeover(takeover_id: str, wait_seconds: int = WAIT_DEFAULT,
|
|
234
246
|
ctx: Context = None) -> str:
|
|
235
|
-
"""Keep waiting for a take over that request_takeover
|
|
247
|
+
"""Keep waiting for a take over that request_takeover returned as "waiting".
|
|
248
|
+
Returns the same results as request_takeover: done (continue on the signed-in
|
|
249
|
+
page), cancelled or expired (stop and tell your user), incomplete (the page
|
|
250
|
+
still asks for sign-in), or waiting again with the same takeover_id.
|
|
251
|
+
takeover_id: the id request_takeover returned, e.g. "tk_...".
|
|
252
|
+
wait_seconds: how long to wait this time (default as request_takeover)."""
|
|
236
253
|
try:
|
|
237
254
|
return await _wait(takeover_id, wait_seconds, ctx)
|
|
238
255
|
except Exception as e:
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "authyouragent"
|
|
7
|
-
version = "0.3.
|
|
7
|
+
version = "0.3.2"
|
|
8
8
|
description = "Auth Your Agent SDK: let AI agents act for a user on websites, with the user's approval on their phone."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.9"
|
|
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
|