fleet-python 0.2.109__tar.gz → 0.2.111__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.109/fleet_python.egg-info → fleet_python-0.2.111}/PKG-INFO +1 -1
  2. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/__init__.py +1 -1
  3. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/_async/__init__.py +1 -1
  4. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/_async/base.py +1 -1
  5. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/_async/resources/filesystem.py +19 -38
  6. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/base.py +1 -1
  7. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/instance/models.py +1 -0
  8. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/resources/filesystem.py +19 -38
  9. {fleet_python-0.2.109 → fleet_python-0.2.111/fleet_python.egg-info}/PKG-INFO +1 -1
  10. {fleet_python-0.2.109 → fleet_python-0.2.111}/pyproject.toml +1 -1
  11. {fleet_python-0.2.109 → fleet_python-0.2.111}/LICENSE +0 -0
  12. {fleet_python-0.2.109 → fleet_python-0.2.111}/README.md +0 -0
  13. {fleet_python-0.2.109 → fleet_python-0.2.111}/examples/diff_example.py +0 -0
  14. {fleet_python-0.2.109 → fleet_python-0.2.111}/examples/dsl_example.py +0 -0
  15. {fleet_python-0.2.109 → fleet_python-0.2.111}/examples/example.py +0 -0
  16. {fleet_python-0.2.109 → fleet_python-0.2.111}/examples/exampleResume.py +0 -0
  17. {fleet_python-0.2.109 → fleet_python-0.2.111}/examples/example_account.py +0 -0
  18. {fleet_python-0.2.109 → fleet_python-0.2.111}/examples/example_action_log.py +0 -0
  19. {fleet_python-0.2.109 → fleet_python-0.2.111}/examples/example_client.py +0 -0
  20. {fleet_python-0.2.109 → fleet_python-0.2.111}/examples/example_mcp_anthropic.py +0 -0
  21. {fleet_python-0.2.109 → fleet_python-0.2.111}/examples/example_mcp_openai.py +0 -0
  22. {fleet_python-0.2.109 → fleet_python-0.2.111}/examples/example_sync.py +0 -0
  23. {fleet_python-0.2.109 → fleet_python-0.2.111}/examples/example_task.py +0 -0
  24. {fleet_python-0.2.109 → fleet_python-0.2.111}/examples/example_tasks.py +0 -0
  25. {fleet_python-0.2.109 → fleet_python-0.2.111}/examples/example_verifier.py +0 -0
  26. {fleet_python-0.2.109 → fleet_python-0.2.111}/examples/export_tasks.py +0 -0
  27. {fleet_python-0.2.109 → fleet_python-0.2.111}/examples/export_tasks_filtered.py +0 -0
  28. {fleet_python-0.2.109 → fleet_python-0.2.111}/examples/fetch_tasks.py +0 -0
  29. {fleet_python-0.2.109 → fleet_python-0.2.111}/examples/gemini_example.py +0 -0
  30. {fleet_python-0.2.109 → fleet_python-0.2.111}/examples/import_tasks.py +0 -0
  31. {fleet_python-0.2.109 → fleet_python-0.2.111}/examples/iterate_verifiers.py +0 -0
  32. {fleet_python-0.2.109 → fleet_python-0.2.111}/examples/json_tasks_example.py +0 -0
  33. {fleet_python-0.2.109 → fleet_python-0.2.111}/examples/nova_act_example.py +0 -0
  34. {fleet_python-0.2.109 → fleet_python-0.2.111}/examples/openai_example.py +0 -0
  35. {fleet_python-0.2.109 → fleet_python-0.2.111}/examples/openai_simple_example.py +0 -0
  36. {fleet_python-0.2.109 → fleet_python-0.2.111}/examples/query_builder_example.py +0 -0
  37. {fleet_python-0.2.109 → fleet_python-0.2.111}/examples/quickstart.py +0 -0
  38. {fleet_python-0.2.109 → fleet_python-0.2.111}/examples/test_cdp_logging.py +0 -0
  39. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/_async/client.py +0 -0
  40. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/_async/env/__init__.py +0 -0
  41. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/_async/env/client.py +0 -0
  42. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/_async/exceptions.py +0 -0
  43. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/_async/global_client.py +0 -0
  44. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/_async/instance/__init__.py +0 -0
  45. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/_async/instance/base.py +0 -0
  46. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/_async/instance/client.py +0 -0
  47. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/_async/models.py +0 -0
  48. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/_async/resources/__init__.py +0 -0
  49. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/_async/resources/api.py +0 -0
  50. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/_async/resources/base.py +0 -0
  51. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/_async/resources/browser.py +0 -0
  52. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/_async/resources/mcp.py +0 -0
  53. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/_async/resources/sqlite.py +0 -0
  54. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/_async/tasks.py +0 -0
  55. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/_async/verifiers/__init__.py +0 -0
  56. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/_async/verifiers/bundler.py +0 -0
  57. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/_async/verifiers/verifier.py +0 -0
  58. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/agent/__init__.py +0 -0
  59. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/agent/gemini_cua/Dockerfile +0 -0
  60. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/agent/gemini_cua/__init__.py +0 -0
  61. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/agent/gemini_cua/agent.py +0 -0
  62. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/agent/gemini_cua/mcp/main.py +0 -0
  63. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/agent/gemini_cua/mcp_server/__init__.py +0 -0
  64. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/agent/gemini_cua/mcp_server/main.py +0 -0
  65. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/agent/gemini_cua/mcp_server/tools.py +0 -0
  66. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/agent/gemini_cua/requirements.txt +0 -0
  67. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/agent/gemini_cua/start.sh +0 -0
  68. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/agent/orchestrator.py +0 -0
  69. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/agent/types.py +0 -0
  70. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/agent/utils.py +0 -0
  71. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/cli.py +0 -0
  72. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/client.py +0 -0
  73. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/config.py +0 -0
  74. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/env/__init__.py +0 -0
  75. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/env/client.py +0 -0
  76. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/eval/__init__.py +0 -0
  77. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/eval/uploader.py +0 -0
  78. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/exceptions.py +0 -0
  79. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/global_client.py +0 -0
  80. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/instance/__init__.py +0 -0
  81. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/instance/base.py +0 -0
  82. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/instance/client.py +0 -0
  83. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/models.py +0 -0
  84. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/proxy/__init__.py +0 -0
  85. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/proxy/proxy.py +0 -0
  86. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/proxy/whitelist.py +0 -0
  87. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/resources/__init__.py +0 -0
  88. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/resources/api.py +0 -0
  89. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/resources/base.py +0 -0
  90. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/resources/browser.py +0 -0
  91. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/resources/mcp.py +0 -0
  92. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/resources/sqlite.py +0 -0
  93. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/tasks.py +0 -0
  94. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/types.py +0 -0
  95. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/utils/__init__.py +0 -0
  96. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/utils/http_logging.py +0 -0
  97. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/utils/logging.py +0 -0
  98. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/utils/playwright.py +0 -0
  99. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/verifiers/__init__.py +0 -0
  100. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/verifiers/bundler.py +0 -0
  101. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/verifiers/code.py +0 -0
  102. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/verifiers/db.py +0 -0
  103. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/verifiers/decorator.py +0 -0
  104. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/verifiers/parse.py +0 -0
  105. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/verifiers/sql_differ.py +0 -0
  106. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet/verifiers/verifier.py +0 -0
  107. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet_python.egg-info/SOURCES.txt +0 -0
  108. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet_python.egg-info/dependency_links.txt +0 -0
  109. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet_python.egg-info/entry_points.txt +0 -0
  110. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet_python.egg-info/requires.txt +0 -0
  111. {fleet_python-0.2.109 → fleet_python-0.2.111}/fleet_python.egg-info/top_level.txt +0 -0
  112. {fleet_python-0.2.109 → fleet_python-0.2.111}/scripts/fix_sync_imports.py +0 -0
  113. {fleet_python-0.2.109 → fleet_python-0.2.111}/scripts/unasync.py +0 -0
  114. {fleet_python-0.2.109 → fleet_python-0.2.111}/setup.cfg +0 -0
  115. {fleet_python-0.2.109 → fleet_python-0.2.111}/tests/__init__.py +0 -0
  116. {fleet_python-0.2.109 → fleet_python-0.2.111}/tests/test_app_method.py +0 -0
  117. {fleet_python-0.2.109 → fleet_python-0.2.111}/tests/test_expect_exactly.py +0 -0
  118. {fleet_python-0.2.109 → fleet_python-0.2.111}/tests/test_expect_only.py +0 -0
  119. {fleet_python-0.2.109 → fleet_python-0.2.111}/tests/test_instance_dispatch.py +0 -0
  120. {fleet_python-0.2.109 → fleet_python-0.2.111}/tests/test_sqlite_resource_dual_mode.py +0 -0
  121. {fleet_python-0.2.109 → fleet_python-0.2.111}/tests/test_sqlite_shared_memory_behavior.py +0 -0
  122. {fleet_python-0.2.109 → fleet_python-0.2.111}/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.109
3
+ Version: 0.2.111
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.109"
76
+ __version__ = "0.2.111"
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.109"
47
+ __version__ = "0.2.111"
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.109"
29
+ __version__ = "0.2.111"
30
30
 
31
31
  logger = logging.getLogger(__name__)
32
32
 
@@ -1,7 +1,6 @@
1
1
  from typing import Any, Dict, List, Optional
2
2
  from ...instance.models import (
3
3
  Resource as ResourceModel,
4
- FsDiffRequest,
5
4
  FsDiffResponse,
6
5
  FsFileDiffEntry,
7
6
  FileStateRequest,
@@ -24,7 +23,11 @@ if TYPE_CHECKING:
24
23
  # Document extensions that need /fs/doc/text for readable content extraction
25
24
  _DOC_EXTENSIONS = {
26
25
  ".docx", ".doc", ".pptx", ".ppt", ".xlsx", ".xls",
27
- ".odt", ".ods", ".odp", ".rtf", ".pdf", ".epub",
26
+ ".xlsm", ".xltx", ".xltm",
27
+ ".odt", ".ott", ".odm", ".ods", ".ots", ".odp", ".otp",
28
+ ".odg", ".otg", ".odf",
29
+ ".rtf", ".pdf", ".epub",
30
+ ".xps", ".oxps", ".fb2", ".cbz", ".mobi",
28
31
  }
29
32
 
30
33
 
@@ -246,26 +249,23 @@ class AsyncFilesystemResource(Resource):
246
249
  include_content: bool = True,
247
250
  max_content_size: int = 102400,
248
251
  exclude_patterns: Optional[List[str]] = None,
252
+ extract_documents: bool = True,
249
253
  ) -> AsyncFilesystemDiff:
250
254
  """Get filesystem diff from the environment.
251
255
 
252
256
  Args:
253
- include_content: Whether to include file contents (default True)
254
- max_content_size: Max file size to include content for (default 100KB)
255
- exclude_patterns: Optional list of glob patterns to exclude
257
+ include_content: Kept for backwards compatibility, ignored by server
258
+ max_content_size: Kept for backwards compatibility, ignored by server
259
+ exclude_patterns: Kept for backwards compatibility, ignored by server
260
+ extract_documents: Kept for backwards compatibility, ignored by server
256
261
 
257
262
  Returns:
258
263
  AsyncFilesystemDiff with assertion helpers
259
264
  """
260
- request = FsDiffRequest(
261
- include_content=include_content,
262
- max_content_size=max_content_size,
263
- exclude_patterns=exclude_patterns,
264
- )
265
265
  response = await self.client.request(
266
266
  "POST",
267
267
  "/diff/fs",
268
- json=request.model_dump(exclude_none=True),
268
+ json={},
269
269
  )
270
270
  result = response.json()
271
271
  fs_response = FsDiffResponse(**result)
@@ -275,33 +275,6 @@ class AsyncFilesystemResource(Resource):
275
275
  )
276
276
  return AsyncFilesystemDiff(fs_response, self)
277
277
 
278
- async def diff_simple(
279
- self,
280
- include_content: bool = True,
281
- max_content_size: int = 102400,
282
- ) -> AsyncFilesystemDiff:
283
- """Get filesystem diff using the simple GET endpoint.
284
-
285
- Args:
286
- include_content: Whether to include file contents (default True)
287
- max_content_size: Max file size to include content for (default 100KB)
288
-
289
- Returns:
290
- AsyncFilesystemDiff with assertion helpers
291
- """
292
- params = {
293
- "include_content": include_content,
294
- "max_content_size": max_content_size,
295
- }
296
- response = await self.client.request("GET", "/diff/fs", params=params)
297
- result = response.json()
298
- fs_response = FsDiffResponse(**result)
299
- if not fs_response.success:
300
- raise RuntimeError(
301
- f"Filesystem diff failed: {fs_response.error or fs_response.message}"
302
- )
303
- return AsyncFilesystemDiff(fs_response, self)
304
-
305
278
  # ── Single file endpoints ─────────────────────────────────────────
306
279
 
307
280
  async def file(
@@ -328,6 +301,14 @@ class AsyncFilesystemResource(Resource):
328
301
  response = await self.client.request(
329
302
  "POST", "/fs/file", json=request.model_dump()
330
303
  )
304
+ if response.status_code == 404:
305
+ return FileStateResponse(
306
+ success=True, path=path, exists=False,
307
+ message=response.json().get("detail", "File not found"),
308
+ )
309
+ if response.status_code >= 400:
310
+ detail = response.json().get("detail", response.text)
311
+ raise RuntimeError(f"Failed to get file state for '{path}': {detail}")
331
312
  return FileStateResponse(**response.json())
332
313
 
333
314
  async def file_text(self, path: str, max_content_size: int = 102400) -> str:
@@ -27,7 +27,7 @@ from .exceptions import (
27
27
  try:
28
28
  from . import __version__
29
29
  except ImportError:
30
- __version__ = "0.2.109"
30
+ __version__ = "0.2.111"
31
31
 
32
32
  logger = logging.getLogger(__name__)
33
33
 
@@ -146,6 +146,7 @@ class FsDiffRequest(BaseModel):
146
146
  include_content: bool = Field(True, title="Include Content")
147
147
  max_content_size: int = Field(102400, title="Max Content Size")
148
148
  exclude_patterns: Optional[List[str]] = Field(None, title="Exclude Patterns")
149
+ extract_documents: bool = Field(True, title="Extract Documents")
149
150
 
150
151
 
151
152
  class FsFileDiffEntry(BaseModel):
@@ -1,7 +1,6 @@
1
1
  from typing import Any, Dict, List, Optional
2
2
  from ..instance.models import (
3
3
  Resource as ResourceModel,
4
- FsDiffRequest,
5
4
  FsDiffResponse,
6
5
  FsFileDiffEntry,
7
6
  FileStateRequest,
@@ -24,7 +23,11 @@ if TYPE_CHECKING:
24
23
  # Document extensions that need /fs/doc/text for readable content extraction
25
24
  _DOC_EXTENSIONS = {
26
25
  ".docx", ".doc", ".pptx", ".ppt", ".xlsx", ".xls",
27
- ".odt", ".ods", ".odp", ".rtf", ".pdf", ".epub",
26
+ ".xlsm", ".xltx", ".xltm",
27
+ ".odt", ".ott", ".odm", ".ods", ".ots", ".odp", ".otp",
28
+ ".odg", ".otg", ".odf",
29
+ ".rtf", ".pdf", ".epub",
30
+ ".xps", ".oxps", ".fb2", ".cbz", ".mobi",
28
31
  }
29
32
 
30
33
 
@@ -246,26 +249,23 @@ class FilesystemResource(Resource):
246
249
  include_content: bool = True,
247
250
  max_content_size: int = 102400,
248
251
  exclude_patterns: Optional[List[str]] = None,
252
+ extract_documents: bool = True,
249
253
  ) -> SyncFilesystemDiff:
250
254
  """Get filesystem diff from the environment.
251
255
 
252
256
  Args:
253
- include_content: Whether to include file contents (default True)
254
- max_content_size: Max file size to include content for (default 100KB)
255
- exclude_patterns: Optional list of glob patterns to exclude
257
+ include_content: Kept for backwards compatibility, ignored by server
258
+ max_content_size: Kept for backwards compatibility, ignored by server
259
+ exclude_patterns: Kept for backwards compatibility, ignored by server
260
+ extract_documents: Kept for backwards compatibility, ignored by server
256
261
 
257
262
  Returns:
258
263
  SyncFilesystemDiff with assertion helpers
259
264
  """
260
- request = FsDiffRequest(
261
- include_content=include_content,
262
- max_content_size=max_content_size,
263
- exclude_patterns=exclude_patterns,
264
- )
265
265
  response = self.client.request(
266
266
  "POST",
267
267
  "/diff/fs",
268
- json=request.model_dump(exclude_none=True),
268
+ json={},
269
269
  )
270
270
  result = response.json()
271
271
  fs_response = FsDiffResponse(**result)
@@ -275,33 +275,6 @@ class FilesystemResource(Resource):
275
275
  )
276
276
  return SyncFilesystemDiff(fs_response, self)
277
277
 
278
- def diff_simple(
279
- self,
280
- include_content: bool = True,
281
- max_content_size: int = 102400,
282
- ) -> SyncFilesystemDiff:
283
- """Get filesystem diff using the simple GET endpoint.
284
-
285
- Args:
286
- include_content: Whether to include file contents (default True)
287
- max_content_size: Max file size to include content for (default 100KB)
288
-
289
- Returns:
290
- SyncFilesystemDiff with assertion helpers
291
- """
292
- params = {
293
- "include_content": include_content,
294
- "max_content_size": max_content_size,
295
- }
296
- response = self.client.request("GET", "/diff/fs", params=params)
297
- result = response.json()
298
- fs_response = FsDiffResponse(**result)
299
- if not fs_response.success:
300
- raise RuntimeError(
301
- f"Filesystem diff failed: {fs_response.error or fs_response.message}"
302
- )
303
- return SyncFilesystemDiff(fs_response, self)
304
-
305
278
  # ── Single file endpoints ─────────────────────────────────────────
306
279
 
307
280
  def file(
@@ -328,6 +301,14 @@ class FilesystemResource(Resource):
328
301
  response = self.client.request(
329
302
  "POST", "/fs/file", json=request.model_dump()
330
303
  )
304
+ if response.status_code == 404:
305
+ return FileStateResponse(
306
+ success=True, path=path, exists=False,
307
+ message=response.json().get("detail", "File not found"),
308
+ )
309
+ if response.status_code >= 400:
310
+ detail = response.json().get("detail", response.text)
311
+ raise RuntimeError(f"Failed to get file state for '{path}': {detail}")
331
312
  return FileStateResponse(**response.json())
332
313
 
333
314
  def file_text(self, path: str, max_content_size: int = 102400) -> str:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fleet-python
3
- Version: 0.2.109
3
+ Version: 0.2.111
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.109"
8
+ version = "0.2.111"
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