smooth-py 0.2.5.dev20250922__py3-none-any.whl → 0.2.6.dev20250922__py3-none-any.whl

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 smooth-py might be problematic. Click here for more details.

smooth/__init__.py CHANGED
@@ -60,12 +60,16 @@ class TaskRequest(BaseModel):
60
60
  metadata: dict[str, str | int | float | bool] | None = Field(
61
61
  default=None, description="A dictionary containing variables or parameters that will be passed to the agent."
62
62
  )
63
- files: list[str] | None = Field(
64
- default=None, description="A list of file ids to pass to the agent."
65
- )
63
+ files: list[str] | None = Field(default=None, description="A list of file ids to pass to the agent.")
66
64
  agent: Literal["smooth"] = Field(default="smooth", description="The agent to use for the task.")
67
65
  max_steps: int = Field(default=32, ge=2, le=128, description="Maximum number of steps the agent can take (min 2, max 128).")
68
66
  device: Literal["desktop", "mobile"] = Field(default="mobile", description="Device type for the task. Default is mobile.")
67
+ allowed_urls: list[str] | None = Field(
68
+ default=None,
69
+ description=(
70
+ "List of allowed URL patterns using wildcard syntax (e.g., https://example.com/*). If None, all URLs are allowed."
71
+ ),
72
+ )
69
73
  enable_recording: bool = Field(default=True, description="Enable video recording of the task execution. Default is True")
70
74
  session_id: str | None = Field(
71
75
  default=None,
@@ -107,6 +111,7 @@ class BrowserSessionsResponse(BaseModel):
107
111
 
108
112
  class UploadFileResponse(BaseModel):
109
113
  """Response model for uploading a file."""
114
+
110
115
  id: str = Field(description="The ID assigned to the uploaded file.")
111
116
 
112
117
 
@@ -313,6 +318,7 @@ class SmoothClient(BaseClient):
313
318
  agent: Literal["smooth"] = "smooth",
314
319
  max_steps: int = 32,
315
320
  device: Literal["desktop", "mobile"] = "mobile",
321
+ allowed_urls: list[str] | None = None,
316
322
  enable_recording: bool = False,
317
323
  session_id: str | None = None,
318
324
  stealth_mode: bool = False,
@@ -334,6 +340,8 @@ class SmoothClient(BaseClient):
334
340
  agent: The agent to use for the task.
335
341
  max_steps: Maximum number of steps the agent can take (max 64).
336
342
  device: Device type for the task. Default is mobile.
343
+ allowed_urls: List of allowed URL patterns using wildcard syntax (e.g., https://example.com/*).
344
+ If None, all URLs are allowed.
337
345
  enable_recording: Enable video recording of the task execution.
338
346
  session_id: Browser session ID to use.
339
347
  stealth_mode: Run the browser in stealth mode.
@@ -356,6 +364,7 @@ class SmoothClient(BaseClient):
356
364
  agent=agent,
357
365
  max_steps=max_steps,
358
366
  device=device,
367
+ allowed_urls=allowed_urls,
359
368
  enable_recording=enable_recording,
360
369
  session_id=session_id,
361
370
  stealth_mode=stealth_mode,
@@ -422,8 +431,8 @@ class SmoothClient(BaseClient):
422
431
 
423
432
  Args:
424
433
  file: File object to be uploaded.
425
- name: A custom name to assign to the uploaded file.
426
- purpose: An optional short description of the file to describe its purpose.
434
+ name: Optional custom name for the file. If not provided, the original file name will be used.
435
+ purpose: Optional short description of the file to describe its purpose (i.e., 'the bank statement pdf').
427
436
 
428
437
  Returns:
429
438
  The file ID assigned to the uploaded file.
@@ -438,15 +447,11 @@ class SmoothClient(BaseClient):
438
447
  raise ValueError("File name must be provided or the file object must have a 'name' attribute.")
439
448
 
440
449
  if purpose:
441
- data = {
442
- "file_purpose": purpose
443
- }
450
+ data = {"file_purpose": purpose}
444
451
  else:
445
452
  data = None
446
453
 
447
- files = {
448
- "file": (Path(name).name, file)
449
- }
454
+ files = {"file": (Path(name).name, file)}
450
455
  response = self._session.post(f"{self.base_url}/file", files=files, data=data)
451
456
  data = self._handle_response(response)
452
457
  return UploadFileResponse(**data["r"])
@@ -580,6 +585,7 @@ class SmoothAsyncClient(BaseClient):
580
585
  agent: Literal["smooth"] = "smooth",
581
586
  max_steps: int = 32,
582
587
  device: Literal["desktop", "mobile"] = "mobile",
588
+ allowed_urls: list[str] | None = None,
583
589
  enable_recording: bool = False,
584
590
  session_id: str | None = None,
585
591
  stealth_mode: bool = False,
@@ -601,6 +607,8 @@ class SmoothAsyncClient(BaseClient):
601
607
  agent: The agent to use for the task.
602
608
  max_steps: Maximum number of steps the agent can take (max 64).
603
609
  device: Device type for the task. Default is mobile.
610
+ allowed_urls: List of allowed URL patterns using wildcard syntax (e.g., https://example.com/*).
611
+ If None, all URLs are allowed.
604
612
  enable_recording: Enable video recording of the task execution.
605
613
  session_id: Browser session ID to use.
606
614
  stealth_mode: Run the browser in stealth mode.
@@ -625,6 +633,7 @@ class SmoothAsyncClient(BaseClient):
625
633
  agent=agent,
626
634
  max_steps=max_steps,
627
635
  device=device,
636
+ allowed_urls=allowed_urls,
628
637
  enable_recording=enable_recording,
629
638
  session_id=session_id,
630
639
  stealth_mode=stealth_mode,
@@ -691,8 +700,8 @@ class SmoothAsyncClient(BaseClient):
691
700
 
692
701
  Args:
693
702
  file: File object to be uploaded.
694
- name: A custom name to assign to the uploaded file.
695
- purpose: An optional short description of the file to describe its purpose.
703
+ name: Optional custom name for the file. If not provided, the original file name will be used.
704
+ purpose: Optional short description of the file to describe its purpose (i.e., 'the bank statement pdf').
696
705
 
697
706
  Returns:
698
707
  The file ID assigned to the uploaded file.
@@ -706,13 +715,9 @@ class SmoothAsyncClient(BaseClient):
706
715
  if name is None:
707
716
  raise ValueError("File name must be provided or the file object must have a 'name' attribute.")
708
717
 
709
- files = {
710
- "file": (Path(name).name, file)
711
- }
718
+ files = {"file": (Path(name).name, file)}
712
719
  if purpose:
713
- data = {
714
- "file_purpose": purpose
715
- }
720
+ data = {"file_purpose": purpose}
716
721
  else:
717
722
  data = None
718
723
  response = await self._client.post(f"{self.base_url}/file", files=files, data=data)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: smooth-py
3
- Version: 0.2.5.dev20250922
3
+ Version: 0.2.6.dev20250922
4
4
  Summary:
5
5
  Author: Luca Pinchetti
6
6
  Author-email: luca@circlemind.co
@@ -0,0 +1,6 @@
1
+ smooth/__init__.py,sha256=bXcOUIs3NIxt-4_0zXzAhFqDBeMWoJafmDrdQGZTB7Q,29166
2
+ smooth/mcp/__init__.py,sha256=0aJVFi2a8Ah3-5xtgyZ5UMbaaJsBWu2T8QLWoFQITk8,219
3
+ smooth/mcp/server.py,sha256=9SymTD4NOGTMN8P-LNGlvYNvv81yCIZfZeeuhEcAc6s,20068
4
+ smooth_py-0.2.6.dev20250922.dist-info/METADATA,sha256=WoVwb__4RMLpSD0iKN3Tngkg0hYVnmLv5HXpIY-GiPc,7485
5
+ smooth_py-0.2.6.dev20250922.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
6
+ smooth_py-0.2.6.dev20250922.dist-info/RECORD,,
@@ -1,6 +0,0 @@
1
- smooth/__init__.py,sha256=PvxlyFcQzuKuBZbuNoDE-cIcRes3r9ijc0rmByrvijM,28447
2
- smooth/mcp/__init__.py,sha256=0aJVFi2a8Ah3-5xtgyZ5UMbaaJsBWu2T8QLWoFQITk8,219
3
- smooth/mcp/server.py,sha256=9SymTD4NOGTMN8P-LNGlvYNvv81yCIZfZeeuhEcAc6s,20068
4
- smooth_py-0.2.5.dev20250922.dist-info/METADATA,sha256=MDsAhu1oJO_t-TIYOCl5imTtZAOpYKn4_z8OabZT5Y8,7485
5
- smooth_py-0.2.5.dev20250922.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
6
- smooth_py-0.2.5.dev20250922.dist-info/RECORD,,