fleet-python 0.2.85__tar.gz → 0.2.87__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.
- {fleet_python-0.2.85/fleet_python.egg-info → fleet_python-0.2.87}/PKG-INFO +2 -1
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet/__init__.py +1 -1
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet/_async/__init__.py +1 -1
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet/_async/base.py +1 -1
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet/agent/gemini_cua/agent.py +26 -17
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet/agent/orchestrator.py +8 -1
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet/base.py +1 -1
- {fleet_python-0.2.85 → fleet_python-0.2.87/fleet_python.egg-info}/PKG-INFO +2 -1
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet_python.egg-info/requires.txt +3 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/pyproject.toml +2 -1
- {fleet_python-0.2.85 → fleet_python-0.2.87}/LICENSE +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/README.md +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/examples/diff_example.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/examples/dsl_example.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/examples/example.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/examples/exampleResume.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/examples/example_account.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/examples/example_action_log.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/examples/example_client.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/examples/example_mcp_anthropic.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/examples/example_mcp_openai.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/examples/example_sync.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/examples/example_task.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/examples/example_tasks.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/examples/example_verifier.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/examples/export_tasks.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/examples/fetch_tasks.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/examples/gemini_example.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/examples/import_tasks.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/examples/iterate_verifiers.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/examples/json_tasks_example.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/examples/nova_act_example.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/examples/openai_example.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/examples/openai_simple_example.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/examples/query_builder_example.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/examples/quickstart.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/examples/test_cdp_logging.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet/_async/client.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet/_async/env/__init__.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet/_async/env/client.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet/_async/exceptions.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet/_async/global_client.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet/_async/instance/__init__.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet/_async/instance/base.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet/_async/instance/client.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet/_async/models.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet/_async/resources/__init__.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet/_async/resources/base.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet/_async/resources/browser.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet/_async/resources/mcp.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet/_async/resources/sqlite.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet/_async/tasks.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet/_async/verifiers/__init__.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet/_async/verifiers/bundler.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet/_async/verifiers/verifier.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet/agent/__init__.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet/agent/gemini_cua/Dockerfile +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet/agent/gemini_cua/__init__.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet/agent/gemini_cua/mcp_server.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet/agent/gemini_cua/playwright_utils.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet/agent/gemini_cua/requirements.txt +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet/agent/gemini_cua/start.sh +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet/agent/types.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet/agent/utils.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet/cli.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet/client.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet/config.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet/env/__init__.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet/env/client.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet/eval/__init__.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet/eval/uploader.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet/exceptions.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet/global_client.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet/instance/__init__.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet/instance/base.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet/instance/client.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet/instance/models.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet/models.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet/proxy/__init__.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet/proxy/proxy.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet/proxy/whitelist.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet/resources/__init__.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet/resources/base.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet/resources/browser.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet/resources/mcp.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet/resources/sqlite.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet/tasks.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet/types.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet/utils/__init__.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet/utils/http_logging.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet/utils/logging.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet/utils/playwright.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet/verifiers/__init__.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet/verifiers/bundler.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet/verifiers/code.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet/verifiers/db.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet/verifiers/decorator.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet/verifiers/parse.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet/verifiers/sql_differ.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet/verifiers/verifier.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet_python.egg-info/SOURCES.txt +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet_python.egg-info/dependency_links.txt +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet_python.egg-info/entry_points.txt +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/fleet_python.egg-info/top_level.txt +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/scripts/fix_sync_imports.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/scripts/unasync.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/setup.cfg +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/tests/__init__.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/tests/test_app_method.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/tests/test_expect_only.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/tests/test_instance_dispatch.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/tests/test_sqlite_resource_dual_mode.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/tests/test_sqlite_shared_memory_behavior.py +0 -0
- {fleet_python-0.2.85 → fleet_python-0.2.87}/tests/test_verifier_from_string.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fleet-python
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.87
|
|
4
4
|
Summary: Python SDK for Fleet environments
|
|
5
5
|
Author-email: Fleet AI <nic@fleet.so>
|
|
6
6
|
License: Apache-2.0
|
|
@@ -45,6 +45,7 @@ Requires-Dist: playwright>=1.40.0; extra == "playwright"
|
|
|
45
45
|
Provides-Extra: eval
|
|
46
46
|
Requires-Dist: aiohttp>=3.9.0; extra == "eval"
|
|
47
47
|
Requires-Dist: google-genai>=1.0.0; extra == "eval"
|
|
48
|
+
Requires-Dist: mcp>=0.1.0; python_version >= "3.10" and extra == "eval"
|
|
48
49
|
Dynamic: license-file
|
|
49
50
|
|
|
50
51
|
# Fleet SDK
|
|
@@ -451,24 +451,33 @@ async def main():
|
|
|
451
451
|
print(json.dumps(result))
|
|
452
452
|
return result
|
|
453
453
|
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
async with MCP(config["url"]) as mcp:
|
|
465
|
-
agent = GeminiAgent(mcp, config["model"], session=session)
|
|
466
|
-
result = await agent.run(config["prompt"], config["max_steps"])
|
|
467
|
-
result["task_key"] = config["task_key"]
|
|
468
|
-
# Include session_id in result so orchestrator can complete it after verification
|
|
469
|
-
if session and session.session_id:
|
|
470
|
-
result["session_id"] = session.session_id
|
|
454
|
+
try:
|
|
455
|
+
# Create Fleet session for live logging
|
|
456
|
+
session = None
|
|
457
|
+
if os.environ.get("FLEET_API_KEY"):
|
|
458
|
+
session = fleet.session_async(
|
|
459
|
+
job_id=config["job_id"],
|
|
460
|
+
model=config["model"],
|
|
461
|
+
task_key=config["task_key"],
|
|
462
|
+
instance_id=config["instance_id"],
|
|
463
|
+
)
|
|
471
464
|
|
|
465
|
+
async with MCP(config["url"]) as mcp:
|
|
466
|
+
agent = GeminiAgent(mcp, config["model"], session=session)
|
|
467
|
+
result = await agent.run(config["prompt"], config["max_steps"])
|
|
468
|
+
result["task_key"] = config["task_key"]
|
|
469
|
+
# Include session_id in result so orchestrator can complete it after verification
|
|
470
|
+
if session and session.session_id:
|
|
471
|
+
result["session_id"] = session.session_id
|
|
472
|
+
|
|
473
|
+
print(json.dumps(result))
|
|
474
|
+
return result
|
|
475
|
+
except Exception as e:
|
|
476
|
+
import traceback
|
|
477
|
+
error_msg = f"{type(e).__name__}: {e}"
|
|
478
|
+
print(f"Agent exception: {error_msg}", file=sys.stderr)
|
|
479
|
+
traceback.print_exc(file=sys.stderr)
|
|
480
|
+
result = {"task_key": config["task_key"], "completed": False, "error": error_msg}
|
|
472
481
|
print(json.dumps(result))
|
|
473
482
|
return result
|
|
474
483
|
|
|
@@ -21,6 +21,7 @@ import asyncio
|
|
|
21
21
|
import json
|
|
22
22
|
import logging
|
|
23
23
|
import os
|
|
24
|
+
import sys
|
|
24
25
|
import time
|
|
25
26
|
from datetime import datetime
|
|
26
27
|
from pathlib import Path
|
|
@@ -418,7 +419,7 @@ class AgentOrchestrator:
|
|
|
418
419
|
env.update(self.config.api_keys)
|
|
419
420
|
|
|
420
421
|
proc = await asyncio.create_subprocess_exec(
|
|
421
|
-
|
|
422
|
+
sys.executable, str(agent_script),
|
|
422
423
|
stdout=asyncio.subprocess.PIPE,
|
|
423
424
|
stderr=asyncio.subprocess.PIPE,
|
|
424
425
|
env=env,
|
|
@@ -452,6 +453,12 @@ class AgentOrchestrator:
|
|
|
452
453
|
if stderr_str:
|
|
453
454
|
logger.debug(f"Agent stderr: {stderr_str[:500]}")
|
|
454
455
|
|
|
456
|
+
# Always show stderr if agent crashed (non-zero exit or has stderr)
|
|
457
|
+
if proc.returncode != 0 or stderr_str:
|
|
458
|
+
short_key = task_key[:20]
|
|
459
|
+
if stderr_str:
|
|
460
|
+
print(f"[{short_key}] Agent stderr: {stderr_str[:500]}")
|
|
461
|
+
|
|
455
462
|
result_json = None
|
|
456
463
|
for line in stdout_str.split("\n"):
|
|
457
464
|
line = line.strip()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fleet-python
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.87
|
|
4
4
|
Summary: Python SDK for Fleet environments
|
|
5
5
|
Author-email: Fleet AI <nic@fleet.so>
|
|
6
6
|
License: Apache-2.0
|
|
@@ -45,6 +45,7 @@ Requires-Dist: playwright>=1.40.0; extra == "playwright"
|
|
|
45
45
|
Provides-Extra: eval
|
|
46
46
|
Requires-Dist: aiohttp>=3.9.0; extra == "eval"
|
|
47
47
|
Requires-Dist: google-genai>=1.0.0; extra == "eval"
|
|
48
|
+
Requires-Dist: mcp>=0.1.0; python_version >= "3.10" and extra == "eval"
|
|
48
49
|
Dynamic: license-file
|
|
49
50
|
|
|
50
51
|
# Fleet SDK
|
|
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "fleet-python"
|
|
7
7
|
|
|
8
|
-
version = "0.2.
|
|
8
|
+
version = "0.2.87"
|
|
9
9
|
description = "Python SDK for Fleet environments"
|
|
10
10
|
authors = [
|
|
11
11
|
{name = "Fleet AI", email = "nic@fleet.so"},
|
|
@@ -59,6 +59,7 @@ playwright = [
|
|
|
59
59
|
eval = [
|
|
60
60
|
"aiohttp>=3.9.0",
|
|
61
61
|
"google-genai>=1.0.0",
|
|
62
|
+
"mcp>=0.1.0; python_version >= '3.10'"
|
|
62
63
|
]
|
|
63
64
|
|
|
64
65
|
[project.urls]
|
|
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
|
|
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
|