fleet-python 0.2.55__tar.gz → 0.2.57__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.
Potentially problematic release.
This version of fleet-python might be problematic. Click here for more details.
- {fleet_python-0.2.55 → fleet_python-0.2.57}/PKG-INFO +1 -1
- {fleet_python-0.2.55 → fleet_python-0.2.57}/examples/export_tasks.py +18 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/fleet/_async/client.py +2 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/fleet/_async/tasks.py +36 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/fleet/client.py +2 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/fleet/tasks.py +34 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/fleet_python.egg-info/PKG-INFO +1 -1
- {fleet_python-0.2.55 → fleet_python-0.2.57}/pyproject.toml +1 -1
- {fleet_python-0.2.55 → fleet_python-0.2.57}/LICENSE +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/README.md +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/examples/diff_example.py +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/examples/dsl_example.py +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/examples/example.py +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/examples/exampleResume.py +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/examples/example_account.py +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/examples/example_action_log.py +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/examples/example_client.py +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/examples/example_mcp_anthropic.py +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/examples/example_mcp_openai.py +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/examples/example_sync.py +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/examples/example_task.py +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/examples/example_tasks.py +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/examples/example_verifier.py +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/examples/gemini_example.py +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/examples/import_tasks.py +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/examples/json_tasks_example.py +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/examples/nova_act_example.py +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/examples/openai_example.py +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/examples/openai_simple_example.py +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/examples/query_builder_example.py +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/examples/quickstart.py +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/examples/test_cdp_logging.py +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/fleet/__init__.py +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/fleet/_async/__init__.py +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/fleet/_async/base.py +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/fleet/_async/env/__init__.py +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/fleet/_async/env/client.py +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/fleet/_async/exceptions.py +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/fleet/_async/global_client.py +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/fleet/_async/instance/__init__.py +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/fleet/_async/instance/base.py +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/fleet/_async/instance/client.py +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/fleet/_async/models.py +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/fleet/_async/resources/__init__.py +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/fleet/_async/resources/base.py +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/fleet/_async/resources/browser.py +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/fleet/_async/resources/mcp.py +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/fleet/_async/resources/sqlite.py +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/fleet/_async/verifiers/__init__.py +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/fleet/_async/verifiers/bundler.py +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/fleet/_async/verifiers/verifier.py +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/fleet/base.py +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/fleet/config.py +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/fleet/env/__init__.py +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/fleet/env/client.py +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/fleet/exceptions.py +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/fleet/global_client.py +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/fleet/instance/__init__.py +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/fleet/instance/base.py +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/fleet/instance/client.py +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/fleet/instance/models.py +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/fleet/models.py +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/fleet/resources/__init__.py +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/fleet/resources/base.py +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/fleet/resources/browser.py +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/fleet/resources/mcp.py +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/fleet/resources/sqlite.py +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/fleet/types.py +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/fleet/verifiers/__init__.py +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/fleet/verifiers/bundler.py +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/fleet/verifiers/code.py +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/fleet/verifiers/db.py +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/fleet/verifiers/decorator.py +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/fleet/verifiers/parse.py +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/fleet/verifiers/sql_differ.py +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/fleet/verifiers/verifier.py +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/fleet_python.egg-info/SOURCES.txt +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/fleet_python.egg-info/dependency_links.txt +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/fleet_python.egg-info/requires.txt +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/fleet_python.egg-info/top_level.txt +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/scripts/fix_sync_imports.py +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/scripts/unasync.py +0 -0
- {fleet_python-0.2.55 → fleet_python-0.2.57}/setup.cfg +0 -0
|
@@ -14,6 +14,13 @@ def main():
|
|
|
14
14
|
help="Optional project key to filter tasks",
|
|
15
15
|
default=None,
|
|
16
16
|
)
|
|
17
|
+
parser.add_argument(
|
|
18
|
+
"--task-keys",
|
|
19
|
+
"-t",
|
|
20
|
+
nargs="+",
|
|
21
|
+
help="Optional list of task keys to export (space-separated)",
|
|
22
|
+
default=None,
|
|
23
|
+
)
|
|
17
24
|
parser.add_argument(
|
|
18
25
|
"--output",
|
|
19
26
|
"-o",
|
|
@@ -23,6 +30,12 @@ def main():
|
|
|
23
30
|
|
|
24
31
|
args = parser.parse_args()
|
|
25
32
|
|
|
33
|
+
# Validate that only one filter is specified
|
|
34
|
+
if args.project_key and args.task_keys:
|
|
35
|
+
parser.error(
|
|
36
|
+
"Cannot specify both --project-key and --task-keys. Use one or neither."
|
|
37
|
+
)
|
|
38
|
+
|
|
26
39
|
# Get account info
|
|
27
40
|
account = fleet.env.account()
|
|
28
41
|
print(f"Exporting from team: {account.team_name}")
|
|
@@ -31,6 +44,11 @@ def main():
|
|
|
31
44
|
if args.project_key:
|
|
32
45
|
print(f"Loading tasks from project: {args.project_key}")
|
|
33
46
|
tasks = fleet.load_tasks(project_key=args.project_key)
|
|
47
|
+
elif args.task_keys:
|
|
48
|
+
print(
|
|
49
|
+
f"Loading {len(args.task_keys)} specific task(s): {', '.join(args.task_keys)}"
|
|
50
|
+
)
|
|
51
|
+
tasks = fleet.load_tasks(keys=args.task_keys)
|
|
34
52
|
else:
|
|
35
53
|
print("Loading all tasks")
|
|
36
54
|
tasks = fleet.load_tasks()
|
|
@@ -377,6 +377,8 @@ class AsyncFleet:
|
|
|
377
377
|
env_variables=task_json.get("env_variables", {}),
|
|
378
378
|
verifier_func=verifier_code, # Set verifier code
|
|
379
379
|
verifier=verifier, # Use created verifier or None
|
|
380
|
+
verifier_id=verifier_id, # Set verifier_id so _rebuild_verifier works
|
|
381
|
+
verifier_sha=task_json.get("verifier_sha", ""), # Set verifier_sha
|
|
380
382
|
metadata=task_json.get("metadata", {}), # Default empty metadata
|
|
381
383
|
)
|
|
382
384
|
return task
|
|
@@ -218,6 +218,42 @@ class Task(BaseModel):
|
|
|
218
218
|
|
|
219
219
|
return await AsyncFleet().make(env_key=self.env_key, region=region)
|
|
220
220
|
|
|
221
|
+
async def make(
|
|
222
|
+
self, region: Optional[str] = None, image_type: Optional[str] = None
|
|
223
|
+
):
|
|
224
|
+
"""Create an environment instance with task's configuration.
|
|
225
|
+
|
|
226
|
+
Auto-populates environment creation with:
|
|
227
|
+
- env_key (env_id + version)
|
|
228
|
+
- data_key (data_id + data_version, if present)
|
|
229
|
+
- env_variables (if present)
|
|
230
|
+
|
|
231
|
+
Args:
|
|
232
|
+
region: Optional AWS region for the environment
|
|
233
|
+
image_type: Optional image type for the environment
|
|
234
|
+
|
|
235
|
+
Returns:
|
|
236
|
+
Environment instance configured for this task
|
|
237
|
+
|
|
238
|
+
Example:
|
|
239
|
+
task = fleet.Task(key="my-task", prompt="...", env_id="my-env",
|
|
240
|
+
data_id="my-data", data_version="v1.0")
|
|
241
|
+
env = await task.make(region="us-west-2")
|
|
242
|
+
"""
|
|
243
|
+
if not self.env_id:
|
|
244
|
+
raise ValueError("Task has no env_id defined")
|
|
245
|
+
|
|
246
|
+
# Deferred import to avoid circular dependencies
|
|
247
|
+
from fleet.env import make_async
|
|
248
|
+
|
|
249
|
+
return await make_async(
|
|
250
|
+
env_key=self.env_key,
|
|
251
|
+
data_key=self.data_key,
|
|
252
|
+
region=region,
|
|
253
|
+
env_variables=self.env_variables if self.env_variables else None,
|
|
254
|
+
image_type=image_type,
|
|
255
|
+
)
|
|
256
|
+
|
|
221
257
|
|
|
222
258
|
def verifier_from_string(
|
|
223
259
|
verifier_func: str, verifier_id: str, verifier_key: str, sha256: str = ""
|
|
@@ -375,6 +375,8 @@ class Fleet:
|
|
|
375
375
|
env_variables=task_json.get("env_variables", {}),
|
|
376
376
|
verifier_func=verifier_code, # Set verifier code
|
|
377
377
|
verifier=verifier, # Use created verifier or None
|
|
378
|
+
verifier_id=verifier_id, # Set verifier_id so _rebuild_verifier works
|
|
379
|
+
verifier_sha=task_json.get("verifier_sha", ""), # Set verifier_sha
|
|
378
380
|
metadata=task_json.get("metadata", {}), # Default empty metadata
|
|
379
381
|
)
|
|
380
382
|
return task
|
|
@@ -211,6 +211,40 @@ class Task(BaseModel):
|
|
|
211
211
|
|
|
212
212
|
return Fleet().make(env_key=self.env_key, region=region)
|
|
213
213
|
|
|
214
|
+
def make(self, region: Optional[str] = None, image_type: Optional[str] = None):
|
|
215
|
+
"""Create an environment instance with task's configuration.
|
|
216
|
+
|
|
217
|
+
Auto-populates environment creation with:
|
|
218
|
+
- env_key (env_id + version)
|
|
219
|
+
- data_key (data_id + data_version, if present)
|
|
220
|
+
- env_variables (if present)
|
|
221
|
+
|
|
222
|
+
Args:
|
|
223
|
+
region: Optional AWS region for the environment
|
|
224
|
+
image_type: Optional image type for the environment
|
|
225
|
+
|
|
226
|
+
Returns:
|
|
227
|
+
Environment instance configured for this task
|
|
228
|
+
|
|
229
|
+
Example:
|
|
230
|
+
task = fleet.Task(key="my-task", prompt="...", env_id="my-env",
|
|
231
|
+
data_id="my-data", data_version="v1.0")
|
|
232
|
+
env = task.make(region="us-west-2")
|
|
233
|
+
"""
|
|
234
|
+
if not self.env_id:
|
|
235
|
+
raise ValueError("Task has no env_id defined")
|
|
236
|
+
|
|
237
|
+
# Deferred import to avoid circular dependencies
|
|
238
|
+
from fleet.env import make
|
|
239
|
+
|
|
240
|
+
return make(
|
|
241
|
+
env_key=self.env_key,
|
|
242
|
+
data_key=self.data_key,
|
|
243
|
+
region=region,
|
|
244
|
+
env_variables=self.env_variables if self.env_variables else None,
|
|
245
|
+
image_type=image_type,
|
|
246
|
+
)
|
|
247
|
+
|
|
214
248
|
|
|
215
249
|
def verifier_from_string(
|
|
216
250
|
verifier_func: str, verifier_id: str, verifier_key: str, sha256: str = ""
|
|
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
|