fleet-python 0.2.92__tar.gz → 0.2.93__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.
Files changed (114) hide show
  1. {fleet_python-0.2.92/fleet_python.egg-info → fleet_python-0.2.93}/PKG-INFO +1 -1
  2. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet/__init__.py +1 -1
  3. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet/_async/__init__.py +1 -1
  4. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet/_async/base.py +1 -1
  5. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet/agent/orchestrator.py +3 -3
  6. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet/base.py +1 -1
  7. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet/cli.py +76 -2
  8. {fleet_python-0.2.92 → fleet_python-0.2.93/fleet_python.egg-info}/PKG-INFO +1 -1
  9. {fleet_python-0.2.92 → fleet_python-0.2.93}/pyproject.toml +1 -1
  10. {fleet_python-0.2.92 → fleet_python-0.2.93}/LICENSE +0 -0
  11. {fleet_python-0.2.92 → fleet_python-0.2.93}/README.md +0 -0
  12. {fleet_python-0.2.92 → fleet_python-0.2.93}/examples/diff_example.py +0 -0
  13. {fleet_python-0.2.92 → fleet_python-0.2.93}/examples/dsl_example.py +0 -0
  14. {fleet_python-0.2.92 → fleet_python-0.2.93}/examples/example.py +0 -0
  15. {fleet_python-0.2.92 → fleet_python-0.2.93}/examples/exampleResume.py +0 -0
  16. {fleet_python-0.2.92 → fleet_python-0.2.93}/examples/example_account.py +0 -0
  17. {fleet_python-0.2.92 → fleet_python-0.2.93}/examples/example_action_log.py +0 -0
  18. {fleet_python-0.2.92 → fleet_python-0.2.93}/examples/example_client.py +0 -0
  19. {fleet_python-0.2.92 → fleet_python-0.2.93}/examples/example_mcp_anthropic.py +0 -0
  20. {fleet_python-0.2.92 → fleet_python-0.2.93}/examples/example_mcp_openai.py +0 -0
  21. {fleet_python-0.2.92 → fleet_python-0.2.93}/examples/example_sync.py +0 -0
  22. {fleet_python-0.2.92 → fleet_python-0.2.93}/examples/example_task.py +0 -0
  23. {fleet_python-0.2.92 → fleet_python-0.2.93}/examples/example_tasks.py +0 -0
  24. {fleet_python-0.2.92 → fleet_python-0.2.93}/examples/example_verifier.py +0 -0
  25. {fleet_python-0.2.92 → fleet_python-0.2.93}/examples/export_tasks.py +0 -0
  26. {fleet_python-0.2.92 → fleet_python-0.2.93}/examples/fetch_tasks.py +0 -0
  27. {fleet_python-0.2.92 → fleet_python-0.2.93}/examples/gemini_example.py +0 -0
  28. {fleet_python-0.2.92 → fleet_python-0.2.93}/examples/import_tasks.py +0 -0
  29. {fleet_python-0.2.92 → fleet_python-0.2.93}/examples/iterate_verifiers.py +0 -0
  30. {fleet_python-0.2.92 → fleet_python-0.2.93}/examples/json_tasks_example.py +0 -0
  31. {fleet_python-0.2.92 → fleet_python-0.2.93}/examples/nova_act_example.py +0 -0
  32. {fleet_python-0.2.92 → fleet_python-0.2.93}/examples/openai_example.py +0 -0
  33. {fleet_python-0.2.92 → fleet_python-0.2.93}/examples/openai_simple_example.py +0 -0
  34. {fleet_python-0.2.92 → fleet_python-0.2.93}/examples/query_builder_example.py +0 -0
  35. {fleet_python-0.2.92 → fleet_python-0.2.93}/examples/quickstart.py +0 -0
  36. {fleet_python-0.2.92 → fleet_python-0.2.93}/examples/test_cdp_logging.py +0 -0
  37. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet/_async/client.py +0 -0
  38. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet/_async/env/__init__.py +0 -0
  39. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet/_async/env/client.py +0 -0
  40. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet/_async/exceptions.py +0 -0
  41. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet/_async/global_client.py +0 -0
  42. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet/_async/instance/__init__.py +0 -0
  43. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet/_async/instance/base.py +0 -0
  44. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet/_async/instance/client.py +0 -0
  45. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet/_async/models.py +0 -0
  46. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet/_async/resources/__init__.py +0 -0
  47. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet/_async/resources/base.py +0 -0
  48. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet/_async/resources/browser.py +0 -0
  49. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet/_async/resources/mcp.py +0 -0
  50. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet/_async/resources/sqlite.py +0 -0
  51. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet/_async/tasks.py +0 -0
  52. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet/_async/verifiers/__init__.py +0 -0
  53. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet/_async/verifiers/bundler.py +0 -0
  54. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet/_async/verifiers/verifier.py +0 -0
  55. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet/agent/__init__.py +0 -0
  56. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet/agent/gemini_cua/Dockerfile +0 -0
  57. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet/agent/gemini_cua/__init__.py +0 -0
  58. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet/agent/gemini_cua/agent.py +0 -0
  59. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet/agent/gemini_cua/mcp_server.py +0 -0
  60. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet/agent/gemini_cua/playwright_utils.py +0 -0
  61. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet/agent/gemini_cua/requirements.txt +0 -0
  62. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet/agent/gemini_cua/start.sh +0 -0
  63. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet/agent/types.py +0 -0
  64. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet/agent/utils.py +0 -0
  65. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet/client.py +0 -0
  66. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet/config.py +0 -0
  67. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet/env/__init__.py +0 -0
  68. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet/env/client.py +0 -0
  69. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet/eval/__init__.py +0 -0
  70. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet/eval/uploader.py +0 -0
  71. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet/exceptions.py +0 -0
  72. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet/global_client.py +0 -0
  73. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet/instance/__init__.py +0 -0
  74. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet/instance/base.py +0 -0
  75. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet/instance/client.py +0 -0
  76. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet/instance/models.py +0 -0
  77. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet/models.py +0 -0
  78. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet/proxy/__init__.py +0 -0
  79. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet/proxy/proxy.py +0 -0
  80. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet/proxy/whitelist.py +0 -0
  81. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet/resources/__init__.py +0 -0
  82. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet/resources/base.py +0 -0
  83. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet/resources/browser.py +0 -0
  84. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet/resources/mcp.py +0 -0
  85. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet/resources/sqlite.py +0 -0
  86. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet/tasks.py +0 -0
  87. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet/types.py +0 -0
  88. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet/utils/__init__.py +0 -0
  89. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet/utils/http_logging.py +0 -0
  90. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet/utils/logging.py +0 -0
  91. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet/utils/playwright.py +0 -0
  92. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet/verifiers/__init__.py +0 -0
  93. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet/verifiers/bundler.py +0 -0
  94. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet/verifiers/code.py +0 -0
  95. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet/verifiers/db.py +0 -0
  96. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet/verifiers/decorator.py +0 -0
  97. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet/verifiers/parse.py +0 -0
  98. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet/verifiers/sql_differ.py +0 -0
  99. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet/verifiers/verifier.py +0 -0
  100. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet_python.egg-info/SOURCES.txt +0 -0
  101. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet_python.egg-info/dependency_links.txt +0 -0
  102. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet_python.egg-info/entry_points.txt +0 -0
  103. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet_python.egg-info/requires.txt +0 -0
  104. {fleet_python-0.2.92 → fleet_python-0.2.93}/fleet_python.egg-info/top_level.txt +0 -0
  105. {fleet_python-0.2.92 → fleet_python-0.2.93}/scripts/fix_sync_imports.py +0 -0
  106. {fleet_python-0.2.92 → fleet_python-0.2.93}/scripts/unasync.py +0 -0
  107. {fleet_python-0.2.92 → fleet_python-0.2.93}/setup.cfg +0 -0
  108. {fleet_python-0.2.92 → fleet_python-0.2.93}/tests/__init__.py +0 -0
  109. {fleet_python-0.2.92 → fleet_python-0.2.93}/tests/test_app_method.py +0 -0
  110. {fleet_python-0.2.92 → fleet_python-0.2.93}/tests/test_expect_only.py +0 -0
  111. {fleet_python-0.2.92 → fleet_python-0.2.93}/tests/test_instance_dispatch.py +0 -0
  112. {fleet_python-0.2.92 → fleet_python-0.2.93}/tests/test_sqlite_resource_dual_mode.py +0 -0
  113. {fleet_python-0.2.92 → fleet_python-0.2.93}/tests/test_sqlite_shared_memory_behavior.py +0 -0
  114. {fleet_python-0.2.92 → fleet_python-0.2.93}/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.92
3
+ Version: 0.2.93
4
4
  Summary: Python SDK for Fleet environments
5
5
  Author-email: Fleet AI <nic@fleet.so>
6
6
  License: Apache-2.0
@@ -73,7 +73,7 @@ from . import env
73
73
  from . import global_client as _global_client
74
74
  from ._async import global_client as _async_global_client
75
75
 
76
- __version__ = "0.2.92"
76
+ __version__ = "0.2.93"
77
77
 
78
78
  __all__ = [
79
79
  # Core classes
@@ -44,7 +44,7 @@ from ..types import VerifierFunction
44
44
  from .. import env
45
45
  from . import global_client as _async_global_client
46
46
 
47
- __version__ = "0.2.92"
47
+ __version__ = "0.2.93"
48
48
 
49
49
  __all__ = [
50
50
  # Core classes
@@ -26,7 +26,7 @@ from .exceptions import (
26
26
  try:
27
27
  from .. import __version__
28
28
  except ImportError:
29
- __version__ = "0.2.92"
29
+ __version__ = "0.2.93"
30
30
 
31
31
  logger = logging.getLogger(__name__)
32
32
 
@@ -329,7 +329,7 @@ class AgentOrchestrator:
329
329
  # Print summary statistics
330
330
  self._print_stats()
331
331
 
332
- return final
332
+ return final, self._job_id
333
333
 
334
334
  async def _build_docker_image(self, agent_path: Path):
335
335
  """Build Docker image for CUA server."""
@@ -773,7 +773,7 @@ async def run_agent(
773
773
  api_keys: Optional[Dict[str, str]] = None,
774
774
  headful: bool = False,
775
775
  verbose: bool = False,
776
- ) -> List[TaskResult]:
776
+ ) -> Tuple[List[TaskResult], str]:
777
777
  """Run agent on Fleet tasks.
778
778
 
779
779
  Args:
@@ -789,7 +789,7 @@ async def run_agent(
789
789
  verbose: Enable verbose agent logging
790
790
 
791
791
  Returns:
792
- List of TaskResult
792
+ Tuple of (List of TaskResult, job_id)
793
793
  """
794
794
  config = AgentConfig(
795
795
  project_key=project_key,
@@ -27,7 +27,7 @@ from .exceptions import (
27
27
  try:
28
28
  from . import __version__
29
29
  except ImportError:
30
- __version__ = "0.2.92"
30
+ __version__ = "0.2.93"
31
31
 
32
32
  logger = logging.getLogger(__name__)
33
33
 
@@ -94,6 +94,53 @@ def get_client() -> Fleet:
94
94
  return Fleet(api_key=api_key, base_url=base_url)
95
95
 
96
96
 
97
+ def _run_oversight(job_id: str, model: str = "anthropic/claude-sonnet-4"):
98
+ """Run oversight summarization on a completed job."""
99
+ import httpx
100
+
101
+ api_key = os.getenv("FLEET_API_KEY")
102
+ if not api_key:
103
+ console.print("[yellow]Warning:[/yellow] FLEET_API_KEY not set, skipping oversight")
104
+ return
105
+
106
+ base_url = os.getenv("FLEET_BASE_URL", CLI_DEFAULT_BASE_URL)
107
+ oversight_url = f"{base_url}/v1/summarize/job"
108
+
109
+ console.print()
110
+ console.print("[bold]Running Oversight Analysis...[/bold]")
111
+
112
+ try:
113
+ with httpx.Client(timeout=300) as client:
114
+ response = client.post(
115
+ oversight_url,
116
+ headers={
117
+ "accept": "application/json",
118
+ "Authorization": f"Bearer {api_key}",
119
+ "Content-Type": "application/json",
120
+ },
121
+ json={
122
+ "job_id": job_id,
123
+ "model": model,
124
+ "max_context_tokens": 180000,
125
+ "force_new_summary": False,
126
+ "max_concurrent": 20,
127
+ },
128
+ )
129
+
130
+ if response.status_code == 200:
131
+ result = response.json()
132
+ console.print(f"[green]✓[/green] Oversight analysis started")
133
+ if "summary_id" in result:
134
+ console.print(f" Summary ID: [cyan]{result['summary_id']}[/cyan]")
135
+ # Show link to dashboard
136
+ console.print(f" View: [cyan]https://fleetai.com/dashboard/jobs/{job_id}[/cyan]")
137
+ else:
138
+ console.print(f"[yellow]Warning:[/yellow] Oversight API returned {response.status_code}")
139
+ console.print(f" {response.text[:200]}")
140
+ except Exception as e:
141
+ console.print(f"[yellow]Warning:[/yellow] Oversight request failed: {e}")
142
+
143
+
97
144
  # Jobs commands
98
145
 
99
146
 
@@ -326,6 +373,15 @@ def list_job_sessions(
326
373
  console.print(f"[dim] Session transcript: flt sessions transcript {first_session_id}[/dim]")
327
374
 
328
375
 
376
+ @jobs_app.command("oversight")
377
+ def run_job_oversight(
378
+ job_id: str = typer.Argument(..., help="Job ID to analyze"),
379
+ model: str = typer.Option("anthropic/claude-sonnet-4", "--model", "-m", help="Model for oversight analysis"),
380
+ ):
381
+ """Run AI oversight analysis on a job."""
382
+ _run_oversight(job_id, model)
383
+
384
+
329
385
  # Sessions commands
330
386
 
331
387
 
@@ -488,6 +544,8 @@ def _run_local_agent(
488
544
  output_json: bool,
489
545
  verbose: bool = False,
490
546
  headful: bool = False,
547
+ oversight: bool = False,
548
+ oversight_model: str = "anthropic/claude-sonnet-4",
491
549
  ):
492
550
  """Run agent locally with Docker-based browser control."""
493
551
  import asyncio
@@ -563,8 +621,9 @@ def _run_local_agent(
563
621
  console.print("[dim]Starting agent...[/dim]")
564
622
  console.print()
565
623
 
624
+ job_id = None
566
625
  try:
567
- results = asyncio.run(run())
626
+ results, job_id = asyncio.run(run())
568
627
  except KeyboardInterrupt:
569
628
  console.print()
570
629
  console.print("[yellow]Cancelled.[/yellow]")
@@ -633,6 +692,10 @@ def _run_local_agent(
633
692
  console.print(f"[bold]Pass Rate:[/bold] [{color}]{passed}/{total} ({rate:.1f}%)[/{color}]")
634
693
  if errors:
635
694
  console.print(f"[bold]Errors:[/bold] [red]{errors}[/red]")
695
+
696
+ # Run oversight if requested
697
+ if oversight and job_id:
698
+ _run_oversight(job_id, oversight_model)
636
699
 
637
700
 
638
701
  def _listen_for_detach_key(stop_event: threading.Event):
@@ -688,6 +751,9 @@ def eval_run(
688
751
  local: Optional[str] = typer.Option(None, "--local", "-l", help="Run locally. Use 'gemini_cua' for built-in or path for custom agent"),
689
752
  headful: bool = typer.Option(False, "--headful", help="Show browser via noVNC (local mode)"),
690
753
  verbose: bool = typer.Option(False, "--verbose", "-v", help="Show debug output"),
754
+ # Oversight
755
+ oversight: bool = typer.Option(False, "--oversight", help="Run AI oversight analysis on job completion"),
756
+ oversight_model: str = typer.Option("anthropic/claude-sonnet-4", "--oversight-model", help="Model for oversight analysis"),
691
757
  ):
692
758
  """
693
759
  Run an evaluation on a project or specific tasks.
@@ -721,13 +787,15 @@ def eval_run(
721
787
  task_keys=task_keys,
722
788
  model=model[0] if model else "gemini-2.5-pro",
723
789
  agent=local if local else "gemini_cua",
724
- max_steps=max_steps or 100,
790
+ max_steps=max_steps or 200,
725
791
  max_duration=max_duration,
726
792
  max_concurrent=max_concurrent,
727
793
  byok=byok,
728
794
  output_json=output_json,
729
795
  verbose=verbose,
730
796
  headful=headful,
797
+ oversight=oversight,
798
+ oversight_model=oversight_model,
731
799
  )
732
800
  return
733
801
 
@@ -938,6 +1006,10 @@ def eval_run(
938
1006
  console.print(f" {task_name}: {tg.passed_sessions}/{tg.total_sessions} ({task_rate:.0f}%)")
939
1007
  except:
940
1008
  pass
1009
+
1010
+ # Run oversight if requested and job completed (not detached)
1011
+ if oversight and not detached:
1012
+ _run_oversight(job_id, oversight_model)
941
1013
 
942
1014
  finally:
943
1015
  # Signal the keyboard listener thread to stop
@@ -948,6 +1020,8 @@ def eval_run(
948
1020
  console.print()
949
1021
  console.print("[yellow]Detached. Eval continues running in background.[/yellow]")
950
1022
  console.print(f"[dim]Check status: flt jobs get {job_id}[/dim]")
1023
+ if oversight:
1024
+ console.print(f"[dim]Run oversight manually: flt jobs oversight {job_id}[/dim]")
951
1025
 
952
1026
 
953
1027
  def main():
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fleet-python
3
- Version: 0.2.92
3
+ Version: 0.2.93
4
4
  Summary: Python SDK for Fleet environments
5
5
  Author-email: Fleet AI <nic@fleet.so>
6
6
  License: Apache-2.0
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
5
5
  [project]
6
6
  name = "fleet-python"
7
7
 
8
- version = "0.2.92"
8
+ version = "0.2.93"
9
9
  description = "Python SDK for Fleet environments"
10
10
  authors = [
11
11
  {name = "Fleet AI", email = "nic@fleet.so"},
File without changes
File without changes
File without changes