fleet-python 0.2.103__tar.gz → 0.2.105__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.103/fleet_python.egg-info → fleet_python-0.2.105}/PKG-INFO +1 -1
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/_async/client.py +15 -1
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/_async/models.py +11 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/_async/tasks.py +33 -6
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/agent/gemini_cua/agent.py +377 -159
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/client.py +15 -1
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/models.py +13 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/tasks.py +25 -2
- {fleet_python-0.2.103 → fleet_python-0.2.105/fleet_python.egg-info}/PKG-INFO +1 -1
- {fleet_python-0.2.103 → fleet_python-0.2.105}/pyproject.toml +1 -1
- {fleet_python-0.2.103 → fleet_python-0.2.105}/LICENSE +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/README.md +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/examples/diff_example.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/examples/dsl_example.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/examples/example.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/examples/exampleResume.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/examples/example_account.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/examples/example_action_log.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/examples/example_client.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/examples/example_mcp_anthropic.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/examples/example_mcp_openai.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/examples/example_sync.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/examples/example_task.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/examples/example_tasks.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/examples/example_verifier.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/examples/export_tasks.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/examples/export_tasks_filtered.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/examples/fetch_tasks.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/examples/gemini_example.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/examples/import_tasks.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/examples/iterate_verifiers.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/examples/json_tasks_example.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/examples/nova_act_example.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/examples/openai_example.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/examples/openai_simple_example.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/examples/query_builder_example.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/examples/quickstart.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/examples/test_cdp_logging.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/__init__.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/_async/__init__.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/_async/base.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/_async/env/__init__.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/_async/env/client.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/_async/exceptions.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/_async/global_client.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/_async/instance/__init__.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/_async/instance/base.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/_async/instance/client.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/_async/resources/__init__.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/_async/resources/api.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/_async/resources/base.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/_async/resources/browser.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/_async/resources/mcp.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/_async/resources/sqlite.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/_async/verifiers/__init__.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/_async/verifiers/bundler.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/_async/verifiers/verifier.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/agent/__init__.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/agent/gemini_cua/Dockerfile +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/agent/gemini_cua/__init__.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/agent/gemini_cua/mcp/main.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/agent/gemini_cua/mcp_server/__init__.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/agent/gemini_cua/mcp_server/main.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/agent/gemini_cua/mcp_server/tools.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/agent/gemini_cua/requirements.txt +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/agent/gemini_cua/start.sh +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/agent/orchestrator.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/agent/types.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/agent/utils.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/base.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/cli.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/config.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/env/__init__.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/env/client.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/eval/__init__.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/eval/uploader.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/exceptions.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/global_client.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/instance/__init__.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/instance/base.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/instance/client.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/instance/models.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/proxy/__init__.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/proxy/proxy.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/proxy/whitelist.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/resources/__init__.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/resources/api.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/resources/base.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/resources/browser.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/resources/mcp.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/resources/sqlite.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/types.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/utils/__init__.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/utils/http_logging.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/utils/logging.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/utils/playwright.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/verifiers/__init__.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/verifiers/bundler.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/verifiers/code.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/verifiers/db.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/verifiers/decorator.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/verifiers/parse.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/verifiers/sql_differ.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet/verifiers/verifier.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet_python.egg-info/SOURCES.txt +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet_python.egg-info/dependency_links.txt +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet_python.egg-info/entry_points.txt +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet_python.egg-info/requires.txt +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/fleet_python.egg-info/top_level.txt +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/scripts/fix_sync_imports.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/scripts/unasync.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/setup.cfg +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/tests/__init__.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/tests/test_app_method.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/tests/test_expect_exactly.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/tests/test_expect_only.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/tests/test_instance_dispatch.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/tests/test_sqlite_resource_dual_mode.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/tests/test_sqlite_shared_memory_behavior.py +0 -0
- {fleet_python-0.2.103 → fleet_python-0.2.105}/tests/test_verifier_from_string.py +0 -0
|
@@ -941,6 +941,8 @@ class AsyncFleet:
|
|
|
941
941
|
verifier_sha=verifier_sha, # Set verifier_sha
|
|
942
942
|
verifier_runtime_version=verifier_runtime_version, # Set verifier_runtime_version
|
|
943
943
|
metadata=task_json.get("metadata", {}), # Default empty metadata
|
|
944
|
+
writer_metadata=task_json.get("writer_metadata"), # Writer metadata
|
|
945
|
+
qa_metadata=task_json.get("qa_metadata"), # QA metadata
|
|
944
946
|
output_json_schema=task_json.get("output_json_schema"), # JSON schema for output
|
|
945
947
|
)
|
|
946
948
|
return task
|
|
@@ -1115,6 +1117,8 @@ class AsyncFleet:
|
|
|
1115
1117
|
verifier_sha=verifier_sha, # Set verifier_sha
|
|
1116
1118
|
verifier_runtime_version=verifier_runtime_version, # Set verifier_runtime_version
|
|
1117
1119
|
metadata=metadata,
|
|
1120
|
+
writer_metadata=getattr(task_response, "writer_metadata", None), # Writer metadata
|
|
1121
|
+
qa_metadata=getattr(task_response, "qa_metadata", None), # QA metadata
|
|
1118
1122
|
output_json_schema=getattr(task_response, "output_json_schema", None), # Get output_json_schema if available
|
|
1119
1123
|
)
|
|
1120
1124
|
tasks.append(task)
|
|
@@ -1270,6 +1274,8 @@ class AsyncFleet:
|
|
|
1270
1274
|
prompt: Optional[str] = None,
|
|
1271
1275
|
verifier_code: Optional[str] = None,
|
|
1272
1276
|
metadata: Optional[Dict[str, Any]] = None,
|
|
1277
|
+
writer_metadata: Optional[Dict[str, Any]] = None,
|
|
1278
|
+
qa_metadata: Optional[Dict[str, Any]] = None,
|
|
1273
1279
|
) -> TaskResponse:
|
|
1274
1280
|
"""Update an existing task.
|
|
1275
1281
|
|
|
@@ -1278,11 +1284,19 @@ class AsyncFleet:
|
|
|
1278
1284
|
prompt: New prompt text for the task (optional)
|
|
1279
1285
|
verifier_code: Python code for task verification (optional)
|
|
1280
1286
|
metadata: Additional metadata for the task (optional)
|
|
1287
|
+
writer_metadata: Metadata filled by task writer (optional)
|
|
1288
|
+
qa_metadata: Metadata filled by QA reviewer (optional)
|
|
1281
1289
|
|
|
1282
1290
|
Returns:
|
|
1283
1291
|
TaskResponse containing the updated task details
|
|
1284
1292
|
"""
|
|
1285
|
-
payload = TaskUpdateRequest(
|
|
1293
|
+
payload = TaskUpdateRequest(
|
|
1294
|
+
prompt=prompt,
|
|
1295
|
+
verifier_code=verifier_code,
|
|
1296
|
+
metadata=metadata,
|
|
1297
|
+
writer_metadata=writer_metadata,
|
|
1298
|
+
qa_metadata=qa_metadata,
|
|
1299
|
+
)
|
|
1286
1300
|
response = await self.client.request(
|
|
1287
1301
|
"PUT", f"/v1/tasks/{task_key}", json=payload.model_dump(exclude_none=True)
|
|
1288
1302
|
)
|
|
@@ -157,6 +157,9 @@ class TaskRequest(BaseModel):
|
|
|
157
157
|
version: Optional[str] = Field(None, title="Version")
|
|
158
158
|
env_variables: Optional[Dict[str, Any]] = Field(None, title="Env Variables")
|
|
159
159
|
metadata: Optional[Dict[str, Any]] = Field(None, title="Metadata")
|
|
160
|
+
writer_metadata: Optional[Dict[str, Any]] = Field(
|
|
161
|
+
None, title="Writer Metadata", description="Metadata filled by task writer"
|
|
162
|
+
)
|
|
160
163
|
output_json_schema: Optional[Dict[str, Any]] = Field(None, title="Output Json Schema")
|
|
161
164
|
|
|
162
165
|
|
|
@@ -164,6 +167,12 @@ class TaskUpdateRequest(BaseModel):
|
|
|
164
167
|
prompt: Optional[str] = Field(None, title="Prompt")
|
|
165
168
|
verifier_code: Optional[str] = Field(None, title="Verifier Code")
|
|
166
169
|
metadata: Optional[Dict[str, Any]] = Field(None, title="Metadata")
|
|
170
|
+
writer_metadata: Optional[Dict[str, Any]] = Field(
|
|
171
|
+
None, title="Writer Metadata", description="Metadata filled by task writer"
|
|
172
|
+
)
|
|
173
|
+
qa_metadata: Optional[Dict[str, Any]] = Field(
|
|
174
|
+
None, title="QA Metadata", description="Metadata filled by QA reviewer"
|
|
175
|
+
)
|
|
167
176
|
|
|
168
177
|
|
|
169
178
|
class VerifierData(BaseModel):
|
|
@@ -190,6 +199,8 @@ class TaskResponse(BaseModel):
|
|
|
190
199
|
env_variables: Optional[Dict[str, Any]] = Field(None, title="Env Variables")
|
|
191
200
|
verifier: Optional[VerifierData] = Field(None, title="Verifier")
|
|
192
201
|
metadata: Optional[Dict[str, Any]] = Field(None, title="Metadata")
|
|
202
|
+
writer_metadata: Optional[Dict[str, Any]] = Field(None, title="Writer Metadata")
|
|
203
|
+
qa_metadata: Optional[Dict[str, Any]] = Field(None, title="QA Metadata")
|
|
193
204
|
output_json_schema: Optional[Dict[str, Any]] = Field(None, title="Output Json Schema")
|
|
194
205
|
|
|
195
206
|
|
|
@@ -38,6 +38,12 @@ class Task(BaseModel):
|
|
|
38
38
|
metadata: Optional[Dict[str, Any]] = Field(
|
|
39
39
|
default_factory=dict, description="Additional task metadata"
|
|
40
40
|
)
|
|
41
|
+
writer_metadata: Optional[Dict[str, Any]] = Field(
|
|
42
|
+
None, description="Metadata filled by task writer"
|
|
43
|
+
)
|
|
44
|
+
qa_metadata: Optional[Dict[str, Any]] = Field(
|
|
45
|
+
None, description="Metadata filled by QA reviewer"
|
|
46
|
+
)
|
|
41
47
|
output_json_schema: Optional[Dict[str, Any]] = Field(
|
|
42
48
|
None, description="JSON schema for expected output format"
|
|
43
49
|
)
|
|
@@ -346,8 +352,9 @@ def verifier_from_string(
|
|
|
346
352
|
return False
|
|
347
353
|
return target in numbers
|
|
348
354
|
|
|
349
|
-
# Create a
|
|
350
|
-
|
|
355
|
+
# Create a globals namespace with all required imports
|
|
356
|
+
exec_globals = globals().copy()
|
|
357
|
+
exec_globals.update({
|
|
351
358
|
"TASK_SUCCESSFUL_SCORE": TASK_SUCCESSFUL_SCORE,
|
|
352
359
|
"TASK_FAILED_SCORE": TASK_FAILED_SCORE,
|
|
353
360
|
"IgnoreConfig": IgnoreConfig,
|
|
@@ -358,10 +365,17 @@ def verifier_from_string(
|
|
|
358
365
|
"json": json,
|
|
359
366
|
"re": re,
|
|
360
367
|
"string": string,
|
|
361
|
-
}
|
|
368
|
+
})
|
|
369
|
+
|
|
370
|
+
# Create a local namespace for executing the code
|
|
371
|
+
local_namespace = {}
|
|
362
372
|
|
|
363
373
|
# Execute the cleaned verifier code in the namespace
|
|
364
|
-
exec(cleaned_code,
|
|
374
|
+
exec(cleaned_code, exec_globals, local_namespace)
|
|
375
|
+
|
|
376
|
+
# Merge local_namespace into exec_globals so helper functions are accessible
|
|
377
|
+
# from the main verifier function when it's called
|
|
378
|
+
exec_globals.update(local_namespace)
|
|
365
379
|
|
|
366
380
|
# Find the function that was defined (not imported)
|
|
367
381
|
# Functions defined via exec have co_filename == '<string>'
|
|
@@ -448,7 +462,12 @@ async def load_tasks(
|
|
|
448
462
|
|
|
449
463
|
|
|
450
464
|
async def update_task(
|
|
451
|
-
task_key: str,
|
|
465
|
+
task_key: str,
|
|
466
|
+
prompt: Optional[str] = None,
|
|
467
|
+
verifier_code: Optional[str] = None,
|
|
468
|
+
metadata: Optional[Dict[str, Any]] = None,
|
|
469
|
+
writer_metadata: Optional[Dict[str, Any]] = None,
|
|
470
|
+
qa_metadata: Optional[Dict[str, Any]] = None,
|
|
452
471
|
):
|
|
453
472
|
"""Convenience function to update an existing task.
|
|
454
473
|
|
|
@@ -457,6 +476,8 @@ async def update_task(
|
|
|
457
476
|
prompt: New prompt text for the task (optional)
|
|
458
477
|
verifier_code: Python code for task verification (optional)
|
|
459
478
|
metadata: Additional metadata for the task (optional)
|
|
479
|
+
writer_metadata: Metadata filled by task writer (optional)
|
|
480
|
+
qa_metadata: Metadata filled by QA reviewer (optional)
|
|
460
481
|
|
|
461
482
|
Returns:
|
|
462
483
|
TaskResponse containing the updated task details
|
|
@@ -465,12 +486,18 @@ async def update_task(
|
|
|
465
486
|
response = await fleet.update_task("my-task", prompt="New prompt text")
|
|
466
487
|
response = await fleet.update_task("my-task", verifier_code="def verify(env): return True")
|
|
467
488
|
response = await fleet.update_task("my-task", metadata={"seed": 42, "story": "Updated story"})
|
|
489
|
+
response = await fleet.update_task("my-task", writer_metadata={"author": "john"})
|
|
468
490
|
"""
|
|
469
491
|
from .global_client import get_client
|
|
470
492
|
|
|
471
493
|
client = get_client()
|
|
472
494
|
return await client.update_task(
|
|
473
|
-
task_key=task_key,
|
|
495
|
+
task_key=task_key,
|
|
496
|
+
prompt=prompt,
|
|
497
|
+
verifier_code=verifier_code,
|
|
498
|
+
metadata=metadata,
|
|
499
|
+
writer_metadata=writer_metadata,
|
|
500
|
+
qa_metadata=qa_metadata,
|
|
474
501
|
)
|
|
475
502
|
|
|
476
503
|
|