fleet-python 0.2.105__tar.gz → 0.2.107__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 (122) hide show
  1. {fleet_python-0.2.105/fleet_python.egg-info → fleet_python-0.2.107}/PKG-INFO +1 -1
  2. {fleet_python-0.2.105 → fleet_python-0.2.107}/examples/export_tasks.py +4 -5
  3. {fleet_python-0.2.105 → fleet_python-0.2.107}/examples/import_tasks.py +13 -130
  4. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/__init__.py +1 -1
  5. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/_async/__init__.py +1 -1
  6. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/_async/base.py +1 -1
  7. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/_async/client.py +6 -20
  8. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/_async/instance/client.py +14 -0
  9. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/_async/models.py +0 -11
  10. fleet_python-0.2.107/fleet/_async/resources/filesystem.py +397 -0
  11. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/_async/tasks.py +6 -33
  12. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/agent/gemini_cua/agent.py +159 -377
  13. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/base.py +1 -1
  14. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/client.py +6 -20
  15. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/instance/client.py +14 -0
  16. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/instance/models.py +74 -0
  17. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/models.py +0 -13
  18. fleet_python-0.2.107/fleet/resources/filesystem.py +397 -0
  19. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/tasks.py +2 -25
  20. {fleet_python-0.2.105 → fleet_python-0.2.107/fleet_python.egg-info}/PKG-INFO +1 -1
  21. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet_python.egg-info/SOURCES.txt +2 -1
  22. {fleet_python-0.2.105 → fleet_python-0.2.107}/pyproject.toml +1 -1
  23. fleet_python-0.2.105/examples/export_tasks_filtered.py +0 -245
  24. {fleet_python-0.2.105 → fleet_python-0.2.107}/LICENSE +0 -0
  25. {fleet_python-0.2.105 → fleet_python-0.2.107}/README.md +0 -0
  26. {fleet_python-0.2.105 → fleet_python-0.2.107}/examples/diff_example.py +0 -0
  27. {fleet_python-0.2.105 → fleet_python-0.2.107}/examples/dsl_example.py +0 -0
  28. {fleet_python-0.2.105 → fleet_python-0.2.107}/examples/example.py +0 -0
  29. {fleet_python-0.2.105 → fleet_python-0.2.107}/examples/exampleResume.py +0 -0
  30. {fleet_python-0.2.105 → fleet_python-0.2.107}/examples/example_account.py +0 -0
  31. {fleet_python-0.2.105 → fleet_python-0.2.107}/examples/example_action_log.py +0 -0
  32. {fleet_python-0.2.105 → fleet_python-0.2.107}/examples/example_client.py +0 -0
  33. {fleet_python-0.2.105 → fleet_python-0.2.107}/examples/example_mcp_anthropic.py +0 -0
  34. {fleet_python-0.2.105 → fleet_python-0.2.107}/examples/example_mcp_openai.py +0 -0
  35. {fleet_python-0.2.105 → fleet_python-0.2.107}/examples/example_sync.py +0 -0
  36. {fleet_python-0.2.105 → fleet_python-0.2.107}/examples/example_task.py +0 -0
  37. {fleet_python-0.2.105 → fleet_python-0.2.107}/examples/example_tasks.py +0 -0
  38. {fleet_python-0.2.105 → fleet_python-0.2.107}/examples/example_verifier.py +0 -0
  39. {fleet_python-0.2.105 → fleet_python-0.2.107}/examples/fetch_tasks.py +0 -0
  40. {fleet_python-0.2.105 → fleet_python-0.2.107}/examples/gemini_example.py +0 -0
  41. {fleet_python-0.2.105 → fleet_python-0.2.107}/examples/iterate_verifiers.py +0 -0
  42. {fleet_python-0.2.105 → fleet_python-0.2.107}/examples/json_tasks_example.py +0 -0
  43. {fleet_python-0.2.105 → fleet_python-0.2.107}/examples/nova_act_example.py +0 -0
  44. {fleet_python-0.2.105 → fleet_python-0.2.107}/examples/openai_example.py +0 -0
  45. {fleet_python-0.2.105 → fleet_python-0.2.107}/examples/openai_simple_example.py +0 -0
  46. {fleet_python-0.2.105 → fleet_python-0.2.107}/examples/query_builder_example.py +0 -0
  47. {fleet_python-0.2.105 → fleet_python-0.2.107}/examples/quickstart.py +0 -0
  48. {fleet_python-0.2.105 → fleet_python-0.2.107}/examples/test_cdp_logging.py +0 -0
  49. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/_async/env/__init__.py +0 -0
  50. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/_async/env/client.py +0 -0
  51. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/_async/exceptions.py +0 -0
  52. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/_async/global_client.py +0 -0
  53. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/_async/instance/__init__.py +0 -0
  54. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/_async/instance/base.py +0 -0
  55. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/_async/resources/__init__.py +0 -0
  56. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/_async/resources/api.py +0 -0
  57. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/_async/resources/base.py +0 -0
  58. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/_async/resources/browser.py +0 -0
  59. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/_async/resources/mcp.py +0 -0
  60. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/_async/resources/sqlite.py +0 -0
  61. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/_async/verifiers/__init__.py +0 -0
  62. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/_async/verifiers/bundler.py +0 -0
  63. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/_async/verifiers/verifier.py +0 -0
  64. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/agent/__init__.py +0 -0
  65. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/agent/gemini_cua/Dockerfile +0 -0
  66. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/agent/gemini_cua/__init__.py +0 -0
  67. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/agent/gemini_cua/mcp/main.py +0 -0
  68. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/agent/gemini_cua/mcp_server/__init__.py +0 -0
  69. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/agent/gemini_cua/mcp_server/main.py +0 -0
  70. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/agent/gemini_cua/mcp_server/tools.py +0 -0
  71. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/agent/gemini_cua/requirements.txt +0 -0
  72. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/agent/gemini_cua/start.sh +0 -0
  73. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/agent/orchestrator.py +0 -0
  74. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/agent/types.py +0 -0
  75. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/agent/utils.py +0 -0
  76. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/cli.py +0 -0
  77. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/config.py +0 -0
  78. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/env/__init__.py +0 -0
  79. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/env/client.py +0 -0
  80. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/eval/__init__.py +0 -0
  81. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/eval/uploader.py +0 -0
  82. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/exceptions.py +0 -0
  83. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/global_client.py +0 -0
  84. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/instance/__init__.py +0 -0
  85. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/instance/base.py +0 -0
  86. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/proxy/__init__.py +0 -0
  87. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/proxy/proxy.py +0 -0
  88. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/proxy/whitelist.py +0 -0
  89. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/resources/__init__.py +0 -0
  90. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/resources/api.py +0 -0
  91. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/resources/base.py +0 -0
  92. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/resources/browser.py +0 -0
  93. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/resources/mcp.py +0 -0
  94. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/resources/sqlite.py +0 -0
  95. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/types.py +0 -0
  96. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/utils/__init__.py +0 -0
  97. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/utils/http_logging.py +0 -0
  98. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/utils/logging.py +0 -0
  99. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/utils/playwright.py +0 -0
  100. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/verifiers/__init__.py +0 -0
  101. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/verifiers/bundler.py +0 -0
  102. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/verifiers/code.py +0 -0
  103. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/verifiers/db.py +0 -0
  104. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/verifiers/decorator.py +0 -0
  105. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/verifiers/parse.py +0 -0
  106. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/verifiers/sql_differ.py +0 -0
  107. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet/verifiers/verifier.py +0 -0
  108. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet_python.egg-info/dependency_links.txt +0 -0
  109. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet_python.egg-info/entry_points.txt +0 -0
  110. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet_python.egg-info/requires.txt +0 -0
  111. {fleet_python-0.2.105 → fleet_python-0.2.107}/fleet_python.egg-info/top_level.txt +0 -0
  112. {fleet_python-0.2.105 → fleet_python-0.2.107}/scripts/fix_sync_imports.py +0 -0
  113. {fleet_python-0.2.105 → fleet_python-0.2.107}/scripts/unasync.py +0 -0
  114. {fleet_python-0.2.105 → fleet_python-0.2.107}/setup.cfg +0 -0
  115. {fleet_python-0.2.105 → fleet_python-0.2.107}/tests/__init__.py +0 -0
  116. {fleet_python-0.2.105 → fleet_python-0.2.107}/tests/test_app_method.py +0 -0
  117. {fleet_python-0.2.105 → fleet_python-0.2.107}/tests/test_expect_exactly.py +0 -0
  118. {fleet_python-0.2.105 → fleet_python-0.2.107}/tests/test_expect_only.py +0 -0
  119. {fleet_python-0.2.105 → fleet_python-0.2.107}/tests/test_instance_dispatch.py +0 -0
  120. {fleet_python-0.2.105 → fleet_python-0.2.107}/tests/test_sqlite_resource_dual_mode.py +0 -0
  121. {fleet_python-0.2.105 → fleet_python-0.2.107}/tests/test_sqlite_shared_memory_behavior.py +0 -0
  122. {fleet_python-0.2.105 → fleet_python-0.2.107}/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.105
3
+ Version: 0.2.107
4
4
  Summary: Python SDK for Fleet environments
5
5
  Author-email: Fleet AI <nic@fleet.so>
6
6
  License: Apache-2.0
@@ -17,7 +17,8 @@ def main():
17
17
  parser.add_argument(
18
18
  "--task-keys",
19
19
  "-t",
20
- help="Optional list of task keys to export (comma-separated)",
20
+ nargs="+",
21
+ help="Optional list of task keys to export (space-separated)",
21
22
  default=None,
22
23
  )
23
24
  parser.add_argument(
@@ -65,12 +66,10 @@ def main():
65
66
  print(f"Loading tasks from project: {args.project_key}")
66
67
  tasks = fleet.load_tasks(project_key=args.project_key)
67
68
  elif args.task_keys:
68
- # Split comma-separated task keys and strip whitespace
69
- task_keys_list = [key.strip() for key in args.task_keys.split(",")]
70
69
  print(
71
- f"Loading {len(task_keys_list)} specific task(s): {', '.join(task_keys_list)}"
70
+ f"Loading {len(args.task_keys)} specific task(s): {', '.join(args.task_keys)}"
72
71
  )
73
- tasks = fleet.load_tasks(keys=task_keys_list)
72
+ tasks = fleet.load_tasks(keys=args.task_keys)
74
73
  elif args.task_project_key:
75
74
  print(f"Loading tasks from task project: {args.task_project_key}")
76
75
  tasks = fleet.load_tasks(task_project_key=args.task_project_key)
@@ -1,9 +1,7 @@
1
1
  import asyncio
2
2
  import argparse
3
3
  import json
4
- import os
5
4
  import sys
6
- import tempfile
7
5
  from collections import defaultdict
8
6
  from typing import Dict, List, Tuple
9
7
  import fleet
@@ -185,6 +183,7 @@ async def run_verifier_sanity_check(
185
183
  print(f" - {task_key}: {error_msg}")
186
184
  if len(errors) > 10:
187
185
  print(f" ... and {len(errors) - 10} more")
186
+ print("\nFix the verifiers and try again.")
188
187
  return False, errors
189
188
  else:
190
189
  print("✓ All verifiers passed!")
@@ -238,7 +237,6 @@ async def main():
238
237
  task_count = len(tasks_data)
239
238
  task_keys = []
240
239
  missing_verifier = []
241
- tasks_with_output_schema = []
242
240
  for task_data in tasks_data:
243
241
  task_key = task_data.get("key") or task_data.get("id")
244
242
  if task_key:
@@ -251,10 +249,6 @@ async def main():
251
249
  if not verifier_code:
252
250
  missing_verifier.append(task_key or "(no key)")
253
251
 
254
- # Check for output_json_schema
255
- if task_data.get("output_json_schema"):
256
- tasks_with_output_schema.append(task_key or "(no key)")
257
-
258
252
  # Validate all tasks have verifier_func
259
253
  if missing_verifier:
260
254
  print(f"✗ Error: {len(missing_verifier)} task(s) missing verifier_func:")
@@ -297,64 +291,21 @@ async def main():
297
291
  print(f"✓ Loaded {len(tasks)} tasks")
298
292
 
299
293
  # Run sanity check (unless skipped)
300
- already_confirmed = False # Track if user already confirmed import
301
294
  if not args.skip_sanity_check:
302
295
  success, errors = await run_verifier_sanity_check(tasks, client)
296
+ if not success:
297
+ sys.exit(1)
303
298
 
304
- # If only doing sanity check, exit here
299
+ # If only doing sanity check, exit successfully here
305
300
  if args.sanity_check_only:
306
- if success:
307
- print("\n✓ Sanity check complete! (--sanity-check-only)")
308
- print("Tasks are ready to import.")
309
- sys.exit(0)
310
- else:
311
- print("\n✗ Sanity check failed (--sanity-check-only)")
312
- print("Fix the verifiers and try again.")
313
- sys.exit(1)
314
-
315
- # Handle partial failures
316
- if not success:
317
- # Filter out failed tasks
318
- failed_keys = set(errors.keys())
319
- passed_tasks = [t for t in tasks if t.key not in failed_keys]
320
-
321
- print("\n" + "=" * 60)
322
- print("SANITY CHECK RESULTS")
323
- print("=" * 60)
324
- print(f"Passed: {len(passed_tasks)}/{len(tasks)} tasks")
325
- print(f"Failed: {len(failed_keys)}/{len(tasks)} tasks")
326
-
327
- if len(passed_tasks) == 0:
328
- print("\n✗ No tasks passed the sanity check.")
329
- print("Fix the verifiers and try again.")
330
- sys.exit(1)
331
-
332
- # Prompt user to import only passed tasks
333
- if not args.yes:
334
- print("\nWould you like to import only the tasks that passed?")
335
- response = input("Type 'YES' to import passed tasks only: ")
336
- if response != "YES":
337
- print("Import cancelled.")
338
- sys.exit(0)
339
- already_confirmed = True # User already confirmed import
340
- else:
341
- print("\n⚠️ Auto-importing only tasks that passed (--yes flag)")
342
-
343
- # Update tasks list and tasks_data to only include passed tasks
344
- tasks = passed_tasks
345
- passed_keys = {t.key for t in passed_tasks}
346
- tasks_data = [td for td in tasks_data if td.get("key") in passed_keys]
347
- # Also filter tasks_with_output_schema
348
- tasks_with_output_schema = [
349
- k for k in tasks_with_output_schema if k in passed_keys
350
- ]
351
-
352
- print(f"\nProceeding with {len(tasks)} tasks that passed sanity check")
301
+ print("\n✓ Sanity check complete! (--sanity-check-only)")
302
+ print("Tasks are ready to import.")
303
+ sys.exit(0)
353
304
  else:
354
305
  print("\n⚠️ Skipping sanity check (--skip-sanity-check)")
355
306
 
356
- # Confirmation prompt (unless --yes flag is provided or already confirmed)
357
- if not args.yes and not already_confirmed:
307
+ # Confirmation prompt (unless --yes flag is provided)
308
+ if not args.yes:
358
309
  print("\n" + "=" * 60)
359
310
  response = input("Type 'YES' to proceed with import: ")
360
311
  if response != "YES":
@@ -364,78 +315,10 @@ async def main():
364
315
  # Import tasks
365
316
  print("\nImporting tasks...")
366
317
  try:
367
- # If tasks were filtered, write to a temporary file for import
368
- if len(tasks_data) < task_count:
369
- # Create temporary file with filtered tasks
370
- with tempfile.NamedTemporaryFile(
371
- mode="w", suffix=".json", delete=False, encoding="utf-8"
372
- ) as temp_file:
373
- json.dump(tasks_data, temp_file, indent=2, ensure_ascii=False)
374
- temp_filename = temp_file.name
375
-
376
- try:
377
- results = await fleet.import_tasks_async(
378
- temp_filename, project_key=args.project_key
379
- )
380
- finally:
381
- # Clean up temporary file
382
- os.unlink(temp_filename)
383
- else:
384
- # Import from original file if no filtering occurred
385
- results = await fleet.import_tasks_async(
386
- args.json_file, project_key=args.project_key
387
- )
388
-
389
- # Print success summary
390
- print("\n" + "=" * 60)
391
- print("IMPORT COMPLETE")
392
- print("=" * 60)
393
- print(f"✓ Successfully imported {len(results)} task(s)")
394
-
395
- if args.project_key:
396
- print(f"✓ Associated with project: {args.project_key}")
397
-
398
- print(f"✓ Team: {account.team_name}")
399
-
400
- # Print HUGE warning if any tasks have output_json_schema
401
- if tasks_with_output_schema:
402
- print("\n")
403
- print("!" * 80)
404
- print("!" * 80)
405
- print("!" * 80)
406
- print(
407
- "!!! !!!"
408
- )
409
- print(
410
- "!!! ⚠️ WARNING WARNING WARNING ⚠️ !!!"
411
- )
412
- print(
413
- "!!! !!!"
414
- )
415
- print(
416
- f"!!! {len(tasks_with_output_schema)} TASK(S) HAVE OUTPUT_JSON_SCHEMA THAT NEED MANUAL COPYING! !!!"
417
- )
418
- print(
419
- "!!! !!!"
420
- )
421
- print(
422
- "!!! The output_json_schema field is NOT automatically imported! !!!"
423
- )
424
- print(
425
- "!!! You MUST manually copy the output schemas to each task! !!!"
426
- )
427
- print(
428
- "!!! !!!"
429
- )
430
- print("!" * 80)
431
- print("!" * 80)
432
- print("!" * 80)
433
- print("\nTasks with output_json_schema:")
434
- for i, key in enumerate(tasks_with_output_schema[:20], 1):
435
- print(f" {i}. {key}")
436
- if len(tasks_with_output_schema) > 20:
437
- print(f" ... and {len(tasks_with_output_schema) - 20} more")
438
- print("\n⚠️ REMEMBER TO MANUALLY COPY OUTPUT SCHEMAS! ⚠️\n")
318
+ results = await fleet.import_tasks_async(
319
+ args.json_file, project_key=args.project_key
320
+ )
321
+ print(f"\n✓ Successfully imported {len(results)} task(s)")
439
322
  except Exception as e:
440
323
  print(f"\n✗ Error importing tasks: {e}")
441
324
  sys.exit(1)
@@ -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.103"
76
+ __version__ = "0.2.107"
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.103"
47
+ __version__ = "0.2.107"
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.103"
29
+ __version__ = "0.2.107"
30
30
 
31
31
  logger = logging.getLogger(__name__)
32
32
 
@@ -171,6 +171,7 @@ from .instance.client import ValidatorType
171
171
  from .resources.base import Resource
172
172
  from .resources.sqlite import AsyncSQLiteResource
173
173
  from .resources.browser import AsyncBrowserResource
174
+ from .resources.filesystem import AsyncFilesystemResource
174
175
  from .resources.mcp import AsyncMCPResource
175
176
  from .resources.api import AsyncAPIResource
176
177
 
@@ -386,6 +387,10 @@ class AsyncEnv(EnvironmentBase):
386
387
  def browser(self, name: str = "cdp") -> AsyncBrowserResource:
387
388
  return self.instance.browser(name)
388
389
 
390
+ def fs(self) -> AsyncFilesystemResource:
391
+ """Get a filesystem diff resource for inspecting file changes."""
392
+ return self.instance.fs()
393
+
389
394
  def api(self, name: str = "api") -> AsyncAPIResource:
390
395
  """Get an API resource for making HTTP requests to the app's API.
391
396
 
@@ -400,11 +405,6 @@ class AsyncEnv(EnvironmentBase):
400
405
  base_url = self.urls.api
401
406
  elif self.urls and self.urls.root:
402
407
  base_url = f"{self.urls.root.rstrip('/')}/raw"
403
- elif self._manager_url_override and self._manager_url_override != "local://":
404
- # URL mode: strip /api/v1/env suffix to get root URL
405
- base_url = self._manager_url_override.rstrip('/')
406
- if base_url.endswith('/api/v1/env'):
407
- base_url = base_url[:-len('/api/v1/env')]
408
408
  else:
409
409
  raise ValueError("No API URL configured for this environment")
410
410
  return self.instance.api(name, base_url)
@@ -941,8 +941,6 @@ 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
946
944
  output_json_schema=task_json.get("output_json_schema"), # JSON schema for output
947
945
  )
948
946
  return task
@@ -1117,8 +1115,6 @@ class AsyncFleet:
1117
1115
  verifier_sha=verifier_sha, # Set verifier_sha
1118
1116
  verifier_runtime_version=verifier_runtime_version, # Set verifier_runtime_version
1119
1117
  metadata=metadata,
1120
- writer_metadata=getattr(task_response, "writer_metadata", None), # Writer metadata
1121
- qa_metadata=getattr(task_response, "qa_metadata", None), # QA metadata
1122
1118
  output_json_schema=getattr(task_response, "output_json_schema", None), # Get output_json_schema if available
1123
1119
  )
1124
1120
  tasks.append(task)
@@ -1274,8 +1270,6 @@ class AsyncFleet:
1274
1270
  prompt: Optional[str] = None,
1275
1271
  verifier_code: Optional[str] = None,
1276
1272
  metadata: Optional[Dict[str, Any]] = None,
1277
- writer_metadata: Optional[Dict[str, Any]] = None,
1278
- qa_metadata: Optional[Dict[str, Any]] = None,
1279
1273
  ) -> TaskResponse:
1280
1274
  """Update an existing task.
1281
1275
 
@@ -1284,19 +1278,11 @@ class AsyncFleet:
1284
1278
  prompt: New prompt text for the task (optional)
1285
1279
  verifier_code: Python code for task verification (optional)
1286
1280
  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)
1289
1281
 
1290
1282
  Returns:
1291
1283
  TaskResponse containing the updated task details
1292
1284
  """
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
- )
1285
+ payload = TaskUpdateRequest(prompt=prompt, verifier_code=verifier_code, metadata=metadata)
1300
1286
  response = await self.client.request(
1301
1287
  "PUT", f"/v1/tasks/{task_key}", json=payload.model_dump(exclude_none=True)
1302
1288
  )
@@ -10,6 +10,7 @@ from urllib.parse import urlparse
10
10
  from ..resources.sqlite import AsyncSQLiteResource
11
11
  from ..resources.browser import AsyncBrowserResource
12
12
  from ..resources.api import AsyncAPIResource
13
+ from ..resources.filesystem import AsyncFilesystemResource
13
14
  from ..resources.base import Resource
14
15
 
15
16
  from fleet.verifiers import DatabaseSnapshot
@@ -105,6 +106,19 @@ class AsyncInstanceClient:
105
106
  self._resources_state[ResourceType.cdp.value][name], self.client
106
107
  )
107
108
 
109
+ def fs(self) -> AsyncFilesystemResource:
110
+ """Returns a filesystem diff resource for inspecting file changes.
111
+
112
+ Returns:
113
+ An AsyncFilesystemResource for querying filesystem diffs
114
+ """
115
+ resource_model = ResourceModel(
116
+ name="fs",
117
+ type=ResourceType.db, # Reuse existing type; fs is not a registered resource type
118
+ mode=ResourceMode.ro,
119
+ )
120
+ return AsyncFilesystemResource(resource_model, self.client)
121
+
108
122
  def api(self, name: str, base_url: str) -> AsyncAPIResource:
109
123
  """
110
124
  Returns an API resource for making HTTP requests.
@@ -157,9 +157,6 @@ 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
- )
163
160
  output_json_schema: Optional[Dict[str, Any]] = Field(None, title="Output Json Schema")
164
161
 
165
162
 
@@ -167,12 +164,6 @@ class TaskUpdateRequest(BaseModel):
167
164
  prompt: Optional[str] = Field(None, title="Prompt")
168
165
  verifier_code: Optional[str] = Field(None, title="Verifier Code")
169
166
  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
- )
176
167
 
177
168
 
178
169
  class VerifierData(BaseModel):
@@ -199,8 +190,6 @@ class TaskResponse(BaseModel):
199
190
  env_variables: Optional[Dict[str, Any]] = Field(None, title="Env Variables")
200
191
  verifier: Optional[VerifierData] = Field(None, title="Verifier")
201
192
  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")
204
193
  output_json_schema: Optional[Dict[str, Any]] = Field(None, title="Output Json Schema")
205
194
 
206
195