plato-sdk-v2 2.7.3__py3-none-any.whl → 2.7.4__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.
@@ -1,4 +1,4 @@
1
- """Plato API SDK - v0.37.2"""
1
+ """Plato API SDK - v0.45.11"""
2
2
 
3
3
  from . import api, errors, models
4
4
  from .client import AsyncClient, Client
@@ -7,12 +7,10 @@ from typing import Any
7
7
  import httpx
8
8
 
9
9
  from plato._generated.errors import raise_for_status
10
- from plato._generated.models import ConnectNetworkRequest
11
10
 
12
11
 
13
12
  def _build_request_args(
14
13
  session_id: str,
15
- body: ConnectNetworkRequest,
16
14
  authorization: str | None = None,
17
15
  x_api_key: str | None = None,
18
16
  ) -> dict[str, Any]:
@@ -28,7 +26,6 @@ def _build_request_args(
28
26
  return {
29
27
  "method": "POST",
30
28
  "url": url,
31
- "json": body.model_dump(mode="json", exclude_none=True),
32
29
  "headers": headers,
33
30
  }
34
31
 
@@ -36,22 +33,16 @@ def _build_request_args(
36
33
  def sync(
37
34
  client: httpx.Client,
38
35
  session_id: str,
39
- body: ConnectNetworkRequest,
40
36
  authorization: str | None = None,
41
37
  x_api_key: str | None = None,
42
38
  ) -> dict[str, Any]:
43
39
  """Connect all jobs in a session to a WireGuard network.
44
40
 
45
41
  Must be called after all jobs are ready (have worker assignments).
46
- Pre-generates WireGuard keys and configures full mesh networking.
47
-
48
- Args:
49
- host_only: If True, force WireGuard to run on worker instead of in VM.
50
- Useful for VMs without WireGuard tools or for testing."""
42
+ Pre-generates WireGuard keys and configures full mesh networking."""
51
43
 
52
44
  request_args = _build_request_args(
53
45
  session_id=session_id,
54
- body=body,
55
46
  authorization=authorization,
56
47
  x_api_key=x_api_key,
57
48
  )
@@ -64,22 +55,16 @@ def sync(
64
55
  async def asyncio(
65
56
  client: httpx.AsyncClient,
66
57
  session_id: str,
67
- body: ConnectNetworkRequest,
68
58
  authorization: str | None = None,
69
59
  x_api_key: str | None = None,
70
60
  ) -> dict[str, Any]:
71
61
  """Connect all jobs in a session to a WireGuard network.
72
62
 
73
63
  Must be called after all jobs are ready (have worker assignments).
74
- Pre-generates WireGuard keys and configures full mesh networking.
75
-
76
- Args:
77
- host_only: If True, force WireGuard to run on worker instead of in VM.
78
- Useful for VMs without WireGuard tools or for testing."""
64
+ Pre-generates WireGuard keys and configures full mesh networking."""
79
65
 
80
66
  request_args = _build_request_args(
81
67
  session_id=session_id,
82
- body=body,
83
68
  authorization=authorization,
84
69
  x_api_key=x_api_key,
85
70
  )
@@ -1,6 +1,6 @@
1
1
  # generated by datamodel-codegen:
2
- # filename: tmph5p8qjzo.json
3
- # timestamp: 2026-01-28T09:03:29+00:00
2
+ # filename: tmp3gp2q7hj.json
3
+ # timestamp: 2026-01-29T10:43:35+00:00
4
4
 
5
5
  from __future__ import annotations
6
6
 
@@ -36,18 +36,6 @@ class Outcome(Enum):
36
36
  reject = "reject"
37
37
 
38
38
 
39
- class AddReviewRequest(BaseModel):
40
- model_config = ConfigDict(
41
- extra="allow",
42
- )
43
- review_type: Annotated[ReviewType, Field(title="Review Type")]
44
- outcome: Annotated[Outcome, Field(title="Outcome")]
45
- artifact_id: Annotated[str, Field(title="Artifact Id")]
46
- video_s3_path: Annotated[str | None, Field(title="Video S3 Path")] = None
47
- events_s3_path: Annotated[str | None, Field(title="Events S3 Path")] = None
48
- comments: Annotated[str | None, Field(title="Comments")] = None
49
-
50
-
51
39
  class AddSSHKeyRequest(BaseModel):
52
40
  model_config = ConfigDict(
53
41
  extra="allow",
@@ -630,13 +618,6 @@ class CloseSessionResponse(BaseModel):
630
618
  """
631
619
 
632
620
 
633
- class ConnectNetworkRequest(BaseModel):
634
- model_config = ConfigDict(
635
- extra="allow",
636
- )
637
- host_only: Annotated[bool | None, Field(title="Host Only")] = False
638
-
639
-
640
621
  class ConnectRoutingInfoResult(BaseModel):
641
622
  model_config = ConfigDict(
642
623
  extra="allow",
@@ -855,7 +836,6 @@ class CreateNetworkResponse(BaseModel):
855
836
  )
856
837
  session_id: Annotated[str, Field(title="Session Id")]
857
838
  name: Annotated[str | None, Field(title="Name")] = None
858
- subnet: Annotated[str, Field(title="Subnet")]
859
839
  dns_suffix: Annotated[str, Field(title="Dns Suffix")]
860
840
  status: Annotated[str, Field(title="Status")]
861
841
 
@@ -1774,7 +1754,6 @@ class NetworkResponse(BaseModel):
1774
1754
  )
1775
1755
  session_id: Annotated[str, Field(title="Session Id")]
1776
1756
  name: Annotated[str | None, Field(title="Name")] = None
1777
- subnet: Annotated[str, Field(title="Subnet")]
1778
1757
  dns_suffix: Annotated[str, Field(title="Dns Suffix")]
1779
1758
  status: Annotated[str, Field(title="Status")]
1780
1759
  member_count: Annotated[int, Field(title="Member Count")]
@@ -1885,6 +1864,18 @@ class NodeSessionNetworkConfig(BaseModel):
1885
1864
  """
1886
1865
  Enable session networking (WireGuard-based VM-to-VM communication).
1887
1866
  """
1867
+ gateway_public_key: Annotated[str | None, Field(title="Gateway Public Key")] = None
1868
+ """
1869
+ WireGuard public key of the session network gateway.
1870
+ """
1871
+ gateway_endpoint: Annotated[str | None, Field(title="Gateway Endpoint")] = None
1872
+ """
1873
+ Gateway WireGuard endpoint (ip:port), e.g., '10.0.0.1:51820'.
1874
+ """
1875
+ gateway_ip: Annotated[str | None, Field(title="Gateway Ip")] = "10.255.0.1"
1876
+ """
1877
+ Gateway's WireGuard IP address.
1878
+ """
1888
1879
 
1889
1880
 
1890
1881
  class NodeSnapshotStoreConfig(BaseModel):
@@ -2700,18 +2691,12 @@ class SimResetLogInput(BaseModel):
2700
2691
  """
2701
2692
 
2702
2693
 
2703
- class SimReview(BaseModel):
2694
+ class SimReviewComment(BaseModel):
2704
2695
  model_config = ConfigDict(
2705
2696
  extra="allow",
2706
2697
  )
2707
- timestamp_iso: Annotated[str, Field(title="Timestamp Iso")]
2708
- review_type: Annotated[ReviewType, Field(title="Review Type")]
2709
- outcome: Annotated[Outcome, Field(title="Outcome")]
2710
- artifact_id: Annotated[str, Field(title="Artifact Id")]
2711
- video_s3_path: Annotated[str | None, Field(title="Video S3 Path")] = None
2712
- events_s3_path: Annotated[str | None, Field(title="Events S3 Path")] = None
2713
- comments: Annotated[str | None, Field(title="Comments")] = None
2714
- reviewer_user_id: Annotated[int | None, Field(title="Reviewer User Id")] = None
2698
+ comment: Annotated[str, Field(title="Comment")]
2699
+ s3_path: Annotated[str, Field(title="S3 Path")]
2715
2700
 
2716
2701
 
2717
2702
  class SimStatusHistory(BaseModel):
@@ -2760,27 +2745,6 @@ class Status1(Enum):
2760
2745
  out_of_service = "out_of_service"
2761
2746
 
2762
2747
 
2763
- class SimulatorConfig(BaseModel):
2764
- model_config = ConfigDict(
2765
- extra="allow",
2766
- )
2767
- type: Annotated[Type8, Field(title="Type")]
2768
- cookies: Annotated[list[ChromeCookie] | None, Field(title="Cookies")] = None
2769
- authentication: Authentication | None = None
2770
- default_start_path: Annotated[str | None, Field(title="Default Start Path")] = "/"
2771
- status: Annotated[Status1 | None, Field(title="Status")] = Status1.not_started
2772
- env_assignees: Annotated[list[int] | None, Field(title="Env Assignees")] = None
2773
- env_review_assignees: Annotated[list[int] | None, Field(title="Env Review Assignees")] = None
2774
- data_assignees: Annotated[list[int] | None, Field(title="Data Assignees")] = None
2775
- data_review_assignees: Annotated[list[int] | None, Field(title="Data Review Assignees")] = None
2776
- status_history: Annotated[list[SimStatusHistory] | None, Field(title="Status History")] = None
2777
- reviews: Annotated[list[SimReview] | None, Field(title="Reviews")] = None
2778
- assigned_user_id: Annotated[int | None, Field(title="Assigned User Id")] = None
2779
- base_artifact_id: Annotated[str | None, Field(title="Base Artifact Id")] = None
2780
- data_artifact_id: Annotated[str | None, Field(title="Data Artifact Id")] = None
2781
- notes: Annotated[str | None, Field(title="Notes")] = None
2782
-
2783
-
2784
2748
  class SimulatorIdResponse(BaseModel):
2785
2749
  model_config = ConfigDict(
2786
2750
  extra="allow",
@@ -2804,16 +2768,6 @@ class SimulatorListItem(BaseModel):
2804
2768
  image_uri: Annotated[str | None, Field(title="Image Uri")] = None
2805
2769
 
2806
2770
 
2807
- class SimulatorMetadata(BaseModel):
2808
- model_config = ConfigDict(
2809
- extra="allow",
2810
- )
2811
- id: Annotated[int, Field(title="Id")]
2812
- name: Annotated[str, Field(title="Name")]
2813
- imgUrl: Annotated[str | None, Field(title="Imgurl")] = None
2814
- config: SimulatorConfig | None = None
2815
-
2816
-
2817
2771
  class SimulatorRepositoryResponse(BaseModel):
2818
2772
  model_config = ConfigDict(
2819
2773
  extra="allow",
@@ -3673,23 +3627,6 @@ class AppApiV1EnvRoutesBatchLogRequest(BaseModel):
3673
3627
  count: Annotated[int, Field(title="Count")]
3674
3628
 
3675
3629
 
3676
- class AppApiV1EnvRoutesUpdateSimulatorRequest(BaseModel):
3677
- model_config = ConfigDict(
3678
- extra="allow",
3679
- )
3680
- name: Annotated[str | None, Field(title="Name")] = None
3681
- url: Annotated[str | None, Field(title="Url")] = None
3682
- description: Annotated[str | None, Field(title="Description")] = None
3683
- imgUrl: Annotated[str | None, Field(title="Imgurl")] = None
3684
- config: SimulatorConfig | None = None
3685
- ancestors: Annotated[list[str] | None, Field(title="Ancestors")] = None
3686
- enabled: Annotated[bool | None, Field(title="Enabled")] = None
3687
- simType: Annotated[str | None, Field(title="Simtype")] = None
3688
- jobName: Annotated[str | None, Field(title="Jobname")] = None
3689
- internalAppPort: Annotated[int | None, Field(title="Internalappport")] = None
3690
- supportedProviders: Annotated[list[str] | None, Field(title="Supportedproviders")] = None
3691
-
3692
-
3693
3630
  class AppApiV1PublicBuildRoutesCreateSnapshotRequest(BaseModel):
3694
3631
  model_config = ConfigDict(
3695
3632
  extra="allow",
@@ -4150,6 +4087,19 @@ class ModelsScoringConfigJSONSchemaDraft7(BaseModel):
4150
4087
  """
4151
4088
 
4152
4089
 
4090
+ class AddReviewRequest(BaseModel):
4091
+ model_config = ConfigDict(
4092
+ extra="allow",
4093
+ )
4094
+ review_type: Annotated[ReviewType, Field(title="Review Type")]
4095
+ outcome: Annotated[Outcome, Field(title="Outcome")]
4096
+ artifact_id: Annotated[str, Field(title="Artifact Id")]
4097
+ video_s3_path: Annotated[str | None, Field(title="Video S3 Path")] = None
4098
+ events_s3_path: Annotated[str | None, Field(title="Events S3 Path")] = None
4099
+ comments: Annotated[str | None, Field(title="Comments")] = None
4100
+ sim_comments: Annotated[list[SimReviewComment] | None, Field(title="Sim Comments")] = None
4101
+
4102
+
4153
4103
  class AddSSHKeyResponse(BaseModel):
4154
4104
  model_config = ConfigDict(
4155
4105
  extra="allow",
@@ -4168,18 +4118,6 @@ class AddSSHKeyResponse(BaseModel):
4168
4118
  """
4169
4119
 
4170
4120
 
4171
- class AnnotatorAssignmentListItem(BaseModel):
4172
- model_config = ConfigDict(
4173
- extra="allow",
4174
- )
4175
- assignment_id: Annotated[int, Field(title="Assignment Id")]
4176
- type: AssignmentType
4177
- stage: AssignmentStage
4178
- simulator: SimulatorMetadata | None = None
4179
- createdAt: Annotated[AwareDatetime, Field(title="Createdat")]
4180
- test_case: TestCaseMetadata | None = None
4181
-
4182
-
4183
4121
  class AutoVerifyRequest(BaseModel):
4184
4122
  model_config = ConfigDict(
4185
4123
  extra="allow",
@@ -4293,23 +4231,6 @@ class CreateSessionResponse(BaseModel):
4293
4231
  """
4294
4232
 
4295
4233
 
4296
- class CreateSimulatorRequest(BaseModel):
4297
- model_config = ConfigDict(
4298
- extra="allow",
4299
- )
4300
- name: Annotated[str, Field(title="Name")]
4301
- url: Annotated[str | None, Field(title="Url")] = None
4302
- description: Annotated[str | None, Field(title="Description")] = None
4303
- imgUrl: Annotated[str | None, Field(title="Imgurl")] = None
4304
- config: SimulatorConfig
4305
- ancestors: Annotated[list[str] | None, Field(title="Ancestors")] = None
4306
- enabled: Annotated[bool | None, Field(title="Enabled")] = False
4307
- simType: Annotated[str, Field(title="Simtype")]
4308
- jobName: Annotated[str | None, Field(title="Jobname")] = None
4309
- internalAppPort: Annotated[int | None, Field(title="Internalappport")] = None
4310
- supportedProviders: Annotated[list[str] | None, Field(title="Supportedproviders")] = None
4311
-
4312
-
4313
4234
  class DispatchersResponse(BaseModel):
4314
4235
  model_config = ConfigDict(
4315
4236
  extra="allow",
@@ -4618,6 +4539,42 @@ class SetDateResponse(BaseModel):
4618
4539
  results: Annotated[dict[str, SetDateResult], Field(title="Results")]
4619
4540
 
4620
4541
 
4542
+ class SimReview(BaseModel):
4543
+ model_config = ConfigDict(
4544
+ extra="allow",
4545
+ )
4546
+ timestamp_iso: Annotated[str, Field(title="Timestamp Iso")]
4547
+ review_type: Annotated[ReviewType, Field(title="Review Type")]
4548
+ outcome: Annotated[Outcome, Field(title="Outcome")]
4549
+ artifact_id: Annotated[str, Field(title="Artifact Id")]
4550
+ reviewer_user_id: Annotated[int | None, Field(title="Reviewer User Id")] = None
4551
+ sim_comments: Annotated[list[SimReviewComment] | None, Field(title="Sim Comments")] = None
4552
+
4553
+
4554
+ class SimulatorConfigInput(BaseModel):
4555
+ model_config = ConfigDict(
4556
+ extra="allow",
4557
+ )
4558
+ type: Annotated[Type8, Field(title="Type")]
4559
+ cookies: Annotated[list[ChromeCookie] | None, Field(title="Cookies")] = None
4560
+ authentication: Authentication | None = None
4561
+ default_start_path: Annotated[str | None, Field(title="Default Start Path")] = "/"
4562
+ status: Annotated[Status1 | None, Field(title="Status")] = Status1.not_started
4563
+ env_assignees: Annotated[list[int] | None, Field(title="Env Assignees")] = None
4564
+ env_review_assignees: Annotated[list[int] | None, Field(title="Env Review Assignees")] = None
4565
+ data_assignees: Annotated[list[int] | None, Field(title="Data Assignees")] = None
4566
+ data_review_assignees: Annotated[list[int] | None, Field(title="Data Review Assignees")] = None
4567
+ status_history: Annotated[list[SimStatusHistory] | None, Field(title="Status History")] = None
4568
+ reviews: Annotated[list[SimReview] | None, Field(title="Reviews")] = None
4569
+ assigned_user_id: Annotated[int | None, Field(title="Assigned User Id")] = None
4570
+ base_artifact_id: Annotated[str | None, Field(title="Base Artifact Id")] = None
4571
+ data_artifact_id: Annotated[str | None, Field(title="Data Artifact Id")] = None
4572
+ notes: Annotated[str | None, Field(title="Notes")] = None
4573
+
4574
+
4575
+ SimulatorConfigOutput = SimulatorConfigInput
4576
+
4577
+
4621
4578
  class SimulatorInfoResponse(BaseModel):
4622
4579
  model_config = ConfigDict(
4623
4580
  extra="allow",
@@ -4627,6 +4584,16 @@ class SimulatorInfoResponse(BaseModel):
4627
4584
  tags: Annotated[list[SimulatorTagInfo], Field(title="Tags")]
4628
4585
 
4629
4586
 
4587
+ class SimulatorMetadata(BaseModel):
4588
+ model_config = ConfigDict(
4589
+ extra="allow",
4590
+ )
4591
+ id: Annotated[int, Field(title="Id")]
4592
+ name: Annotated[str, Field(title="Name")]
4593
+ imgUrl: Annotated[str | None, Field(title="Imgurl")] = None
4594
+ config: SimulatorConfigOutput | None = None
4595
+
4596
+
4630
4597
  class SnapshotStatusResponse(BaseModel):
4631
4598
  model_config = ConfigDict(
4632
4599
  extra="allow",
@@ -4715,6 +4682,23 @@ class WaitForReadyResponse(BaseModel):
4715
4682
  """
4716
4683
 
4717
4684
 
4685
+ class AppApiV1EnvRoutesUpdateSimulatorRequest(BaseModel):
4686
+ model_config = ConfigDict(
4687
+ extra="allow",
4688
+ )
4689
+ name: Annotated[str | None, Field(title="Name")] = None
4690
+ url: Annotated[str | None, Field(title="Url")] = None
4691
+ description: Annotated[str | None, Field(title="Description")] = None
4692
+ imgUrl: Annotated[str | None, Field(title="Imgurl")] = None
4693
+ config: SimulatorConfigInput | None = None
4694
+ ancestors: Annotated[list[str] | None, Field(title="Ancestors")] = None
4695
+ enabled: Annotated[bool | None, Field(title="Enabled")] = None
4696
+ simType: Annotated[str | None, Field(title="Simtype")] = None
4697
+ jobName: Annotated[str | None, Field(title="Jobname")] = None
4698
+ internalAppPort: Annotated[int | None, Field(title="Internalappport")] = None
4699
+ supportedProviders: Annotated[list[str] | None, Field(title="Supportedproviders")] = None
4700
+
4701
+
4718
4702
  class AppApiV2SchemasArtifactSimConfigDataset(BaseModel):
4719
4703
  model_config = ConfigDict(
4720
4704
  extra="allow",
@@ -4766,6 +4750,18 @@ class AppSchemasBuildModelsSimConfigDataset(BaseModel):
4766
4750
  """
4767
4751
 
4768
4752
 
4753
+ class AnnotatorAssignmentListItem(BaseModel):
4754
+ model_config = ConfigDict(
4755
+ extra="allow",
4756
+ )
4757
+ assignment_id: Annotated[int, Field(title="Assignment Id")]
4758
+ type: AssignmentType
4759
+ stage: AssignmentStage
4760
+ simulator: SimulatorMetadata | None = None
4761
+ createdAt: Annotated[AwareDatetime, Field(title="Createdat")]
4762
+ test_case: TestCaseMetadata | None = None
4763
+
4764
+
4769
4765
  class Envs(RootModel[EnvFromSimulator | EnvFromArtifact | EnvFromResource]):
4770
4766
  root: Annotated[
4771
4767
  EnvFromSimulator | EnvFromArtifact | EnvFromResource,
@@ -4799,6 +4795,23 @@ class CreateSessionFromEnvs(BaseModel):
4799
4795
  """
4800
4796
 
4801
4797
 
4798
+ class CreateSimulatorRequest(BaseModel):
4799
+ model_config = ConfigDict(
4800
+ extra="allow",
4801
+ )
4802
+ name: Annotated[str, Field(title="Name")]
4803
+ url: Annotated[str | None, Field(title="Url")] = None
4804
+ description: Annotated[str | None, Field(title="Description")] = None
4805
+ imgUrl: Annotated[str | None, Field(title="Imgurl")] = None
4806
+ config: SimulatorConfigInput
4807
+ ancestors: Annotated[list[str] | None, Field(title="Ancestors")] = None
4808
+ enabled: Annotated[bool | None, Field(title="Enabled")] = False
4809
+ simType: Annotated[str, Field(title="Simtype")]
4810
+ jobName: Annotated[str | None, Field(title="Jobname")] = None
4811
+ internalAppPort: Annotated[int | None, Field(title="Internalappport")] = None
4812
+ supportedProviders: Annotated[list[str] | None, Field(title="Supportedproviders")] = None
4813
+
4814
+
4802
4815
  class CreateVMRequest(BaseModel):
4803
4816
  model_config = ConfigDict(
4804
4817
  extra="allow",
plato/v1/cli/sandbox.py CHANGED
@@ -59,7 +59,6 @@ from plato._generated.models import (
59
59
  AppSchemasBuildModelsSimConfigCompute,
60
60
  AppSchemasBuildModelsSimConfigDataset,
61
61
  AppSchemasBuildModelsSimConfigMetadata,
62
- ConnectNetworkRequest,
63
62
  CreateCheckpointRequest,
64
63
  ExecuteCommandRequest,
65
64
  Flow,
@@ -498,10 +497,6 @@ def sandbox_start(
498
497
  console.print(f" [cyan]Public URL:[/cyan] {display_url}")
499
498
  if ssh_private_key_path:
500
499
  console.print(" [cyan]SSH:[/cyan] plato sandbox ssh")
501
- # Warn if using host-only routing (no VM-to-VM mesh)
502
- if connect_network and hasattr(session, "network_host_only") and session.network_host_only:
503
- console.print("\n[yellow]Warning: WireGuard not available in VM - using host-only routing[/yellow]")
504
- console.print("[yellow] SSH from outside works, but VM-to-VM networking is disabled[/yellow]")
505
500
  console.print(f"\n[dim]State saved to {SANDBOX_FILE}[/dim]")
506
501
 
507
502
  except Exception as e:
@@ -732,7 +727,6 @@ def sandbox_connect_network(
732
727
  result = sessions_connect_network.sync(
733
728
  client=client,
734
729
  session_id=session_id,
735
- body=ConnectNetworkRequest(),
736
730
  x_api_key=api_key,
737
731
  )
738
732
 
@@ -45,7 +45,6 @@ from plato._generated.models import (
45
45
  AppApiV2SchemasSessionHeartbeatResponse,
46
46
  AppApiV2SchemasSessionSetupSandboxRequest,
47
47
  AppApiV2SchemasSessionSetupSandboxResponse,
48
- ConnectNetworkRequest,
49
48
  CreateDiskSnapshotRequest,
50
49
  CreateDiskSnapshotResponse,
51
50
  CreateSessionFromEnvs,
@@ -148,15 +147,6 @@ class Session:
148
147
  self._heartbeat_task: asyncio.Task | None = None
149
148
  self._heartbeat_interval = 30
150
149
  self._envs: list[Environment] | None = None
151
- self._network_host_only: bool = False # True if WireGuard not available (no VM-to-VM mesh)
152
-
153
- @property
154
- def network_host_only(self) -> bool:
155
- """True if network is using host-only routing (WireGuard not available in VM).
156
-
157
- When True, external SSH access works but VM-to-VM mesh networking does not.
158
- """
159
- return self._network_host_only
160
150
 
161
151
  @property
162
152
  def session_id(self) -> str:
@@ -762,18 +752,13 @@ class Session:
762
752
 
763
753
  return urls
764
754
 
765
- async def connect_network(self, host_only: bool = False) -> dict:
755
+ async def connect_network(self) -> dict:
766
756
  """Connect all VMs in this session to a WireGuard network.
767
757
 
768
758
  Creates a full mesh WireGuard network between all VMs in the session.
769
759
  Must be called after all environments are ready. This method is idempotent -
770
760
  calling it multiple times will not reconnect already-connected VMs.
771
761
 
772
- Args:
773
- host_only: If True, force WireGuard to run on the worker instead of
774
- inside the VM. Useful for VMs without WireGuard tools or
775
- for testing worker-side WireGuard.
776
-
777
762
  Returns:
778
763
  Dict with:
779
764
  - success: bool - True if all VMs connected successfully
@@ -790,13 +775,9 @@ class Session:
790
775
  result = await sessions_connect_network.asyncio(
791
776
  client=self._http,
792
777
  session_id=self.session_id,
793
- body=ConnectNetworkRequest(host_only=host_only),
794
778
  x_api_key=self._api_key,
795
779
  )
796
780
 
797
- # Track if any VMs are using host-only routing (no VM-to-VM mesh)
798
- self._network_host_only = result.get("host_only", False)
799
-
800
781
  return result
801
782
 
802
783
  async def cleanup_databases(self) -> SessionCleanupResult:
plato/v2/sync/session.py CHANGED
@@ -43,7 +43,6 @@ from plato._generated.models import (
43
43
  AppApiV2SchemasSessionHeartbeatResponse,
44
44
  AppApiV2SchemasSessionSetupSandboxRequest,
45
45
  AppApiV2SchemasSessionSetupSandboxResponse,
46
- ConnectNetworkRequest,
47
46
  CreateDiskSnapshotRequest,
48
47
  CreateDiskSnapshotResponse,
49
48
  CreateSessionFromEnvs,
@@ -127,15 +126,6 @@ class Session:
127
126
  self._heartbeat_stop = threading.Event()
128
127
  self._heartbeat_interval = 30
129
128
  self._envs: list[Environment] | None = None
130
- self._network_host_only: bool = False # True if WireGuard not available (no VM-to-VM mesh)
131
-
132
- @property
133
- def network_host_only(self) -> bool:
134
- """True if network is using host-only routing (WireGuard not available in VM).
135
-
136
- When True, external SSH access works but VM-to-VM mesh networking does not.
137
- """
138
- return self._network_host_only
139
129
 
140
130
  @property
141
131
  def session_id(self) -> str:
@@ -672,18 +662,13 @@ class Session:
672
662
  x_api_key=self._api_key,
673
663
  )
674
664
 
675
- def connect_network(self, host_only: bool = False) -> dict:
665
+ def connect_network(self) -> dict:
676
666
  """Connect all VMs in this session to a WireGuard network.
677
667
 
678
668
  Creates a full mesh WireGuard network between all VMs in the session.
679
669
  Must be called after all environments are ready. This method is idempotent -
680
670
  calling it multiple times will not reconnect already-connected VMs.
681
671
 
682
- Args:
683
- host_only: If True, force WireGuard to run on the worker instead of
684
- inside the VM. Useful for VMs without WireGuard tools or
685
- for testing worker-side WireGuard.
686
-
687
672
  Returns:
688
673
  Dict with:
689
674
  - success: bool - True if all VMs connected successfully
@@ -700,13 +685,9 @@ class Session:
700
685
  result = sessions_connect_network.sync(
701
686
  client=self._http,
702
687
  session_id=self.session_id,
703
- body=ConnectNetworkRequest(host_only=host_only),
704
688
  x_api_key=self._api_key,
705
689
  )
706
690
 
707
- # Track if any VMs are using host-only routing (no VM-to-VM mesh)
708
- self._network_host_only = result.get("host_only", False)
709
-
710
691
  return result
711
692
 
712
693
  def login(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: plato-sdk-v2
3
- Version: 2.7.3
3
+ Version: 2.7.4
4
4
  Summary: Python SDK for the Plato API
5
5
  Author-email: Plato <support@plato.so>
6
6
  License-Expression: MIT
@@ -1,6 +1,6 @@
1
1
  plato/__init__.py,sha256=a9E0KS1602GWHHStnf7wDEuvPCvh2GpPh0Sf8oKZx5Q,1795
2
2
  plato/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
- plato/_generated/__init__.py,sha256=ArsWKBXOUO2pG4Aw-LwyGEbT7Ho0xuFvEQtiQeT1FSw,738
3
+ plato/_generated/__init__.py,sha256=vlyA6E0oAKORVSYaFIcPTzHX6n4ZWNWf_cRnaokAc8Q,739
4
4
  plato/_generated/client.py,sha256=_oMKXyAShQVddCaIKnfB2zPkRsDlCwLp-N3RFoKq_v8,5489
5
5
  plato/_generated/errors.py,sha256=goTGrZ4rrujGZ-BoOonoyaGwdGDkGO6GyeubIkQVv9E,4197
6
6
  plato/_generated/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -263,7 +263,7 @@ plato/_generated/api/v2/sessions/__init__.py,sha256=zH6GgESh7WyjauJh1FVHCeTZXeLJ
263
263
  plato/_generated/api/v2/sessions/add_ssh_key.py,sha256=JDaw5B1hHodH43DUoZ7FrO1_ECWacjinia4-DbU0jGo,2198
264
264
  plato/_generated/api/v2/sessions/checkpoint.py,sha256=Kd8NSIeuC41cRB4Y3j_L0yNIU_WVRjkBIL72pRqoRTc,2933
265
265
  plato/_generated/api/v2/sessions/close.py,sha256=cPA4HhPULg9EEKdBcMjRJ64NUI474BcztHPCGk8W3Z0,1718
266
- plato/_generated/api/v2/sessions/connect_network.py,sha256=CorUkSBoDOgUelYmt2ohrDjXLksiDR5u0n1BKqVFHOY,2489
266
+ plato/_generated/api/v2/sessions/connect_network.py,sha256=Z3D5dh_A_Q-QJw_fvyrC8lHS889OMHYeObLcFsUTyX0,1901
267
267
  plato/_generated/api/v2/sessions/disk_snapshot.py,sha256=nHMXEPctQgiCqziXlvhw2FxgPKOC6VVvKEPXzVGWk5Y,2875
268
268
  plato/_generated/api/v2/sessions/evaluate.py,sha256=X1JU1m4MLbHXk_2kjQ_QezBol63o80zKIb0OlDaNkmI,2077
269
269
  plato/_generated/api/v2/sessions/execute.py,sha256=_jHXYeSsuYnOItZLdCeJ5Fxx5YNEAA7jWRcrXndA880,1979
@@ -293,7 +293,7 @@ plato/_generated/api/v2/user/__init__.py,sha256=yMh1Gn9VpKHQMQCmJdpeDPA9Ek9PBgP0
293
293
  plato/_generated/api/v2/user/get_current_user.py,sha256=tvamtbWTEkeeNUBLSPqZIcCGqKVadQM3DVcezsWP22U,1814
294
294
  plato/_generated/api/version/__init__.py,sha256=dQXTYrXjD1RZcvWwnlqXWAZ-eAV-V-6JSNuY7uaca7o,70
295
295
  plato/_generated/api/version/check.py,sha256=HTVNw0oi9gbvX4pOVoH4y4JywCxdl1pJTCk2PjJFwJ4,778
296
- plato/_generated/models/__init__.py,sha256=r3iq2AruILqV7k_okJt2JHBRYKKRByLsFOaKuJB91VQ,159482
296
+ plato/_generated/models/__init__.py,sha256=_93xBsEc-k7_Igpee96y4s_5Nx_egKV7ApEFqVnLdCM,159900
297
297
  plato/_sims_generator/__init__.py,sha256=Km4QOl9wxjQ5dgpdhk9QnBFJFFc9eq3rPbMWIQRjIn0,1602
298
298
  plato/_sims_generator/cli.py,sha256=mzolN-dxfMkVAdA-vC0esnai-cGg-i4ozOw8dACefV4,2709
299
299
  plato/_sims_generator/instruction.py,sha256=Na9M-jIdBPhp_fLuBPTicoFnWriRyi8YiZ-eQBj64HI,6644
@@ -427,7 +427,7 @@ plato/v1/cli/chronos.py,sha256=lzFY0nomP1AY14i8oc8OvWOdq9ydCiE3dN2XrSupvA4,27827
427
427
  plato/v1/cli/main.py,sha256=Yqy1vn4sGyAWKNpDVcLl9pbzkMn89tYVBIxFU30ZtPk,6905
428
428
  plato/v1/cli/pm.py,sha256=Q6HFTb8ZO_aB0EtAO6-OOsnVv3SoC8hL7UHpawBz46Y,55520
429
429
  plato/v1/cli/proxy.py,sha256=WmCt0R9Gos1q0FZTQSsbloNC3-Cnx6Yb60RZF1BzC18,12178
430
- plato/v1/cli/sandbox.py,sha256=SQb5XCdYvTHEyZxOv9ECtafTdkxpjfq45pYd-m1z7k0,101506
430
+ plato/v1/cli/sandbox.py,sha256=3TkXBTdYNV45XvnG4F4QzETz908i3vuSswTVCaBY-WU,101035
431
431
  plato/v1/cli/ssh.py,sha256=9ypjn5kQuaTcVjsWMDIUDyehXRH9fauk_z-C3mXzYJ8,2381
432
432
  plato/v1/cli/utils.py,sha256=ba7Crv4OjDmgCv4SeB8UeZDin-iOdQw_3N6fd-g5XVk,4572
433
433
  plato/v1/cli/verify.py,sha256=D-hyiCBPL_G_9uTIEugUsq_B9y6mRVAUWILpfUx4YAo,22814
@@ -485,14 +485,14 @@ plato/v2/async_/chronos.py,sha256=WeqYF3HIKs7hV9LNZb2GlDS1yP6b422DZKtNuPxdL34,12
485
485
  plato/v2/async_/client.py,sha256=IhiEiwbLNPBr9JJilw4uz7MLKXY_rUZpYGYC1dX-UfA,5186
486
486
  plato/v2/async_/environment.py,sha256=M5IeWYLwREOIyuS2zqgBSqHE_x66_OZXrevA9Rkc8Is,5825
487
487
  plato/v2/async_/flow_executor.py,sha256=Tl4nRu1ZPWJFNNxyTGy-PxvebZEUD18ZDaz8T2chtzU,14188
488
- plato/v2/async_/session.py,sha256=sXNmHXU9MU9H4_eNd-pRfBjEZh96SOWREPJh5JpyB84,38775
488
+ plato/v2/async_/session.py,sha256=0zErrTEm9-xxIz6pzp_y2stzn498KXVle7n51HVhyhc,37910
489
489
  plato/v2/sync/__init__.py,sha256=6Hzc5k34WnHTUMPWrIefnL4P5YEoJMRLOmYDO7LxGg8,405
490
490
  plato/v2/sync/artifact.py,sha256=wTLC-tugG128wLvh-JqNPb0zsw5FXEJlZNahurSWink,1169
491
491
  plato/v2/sync/chronos.py,sha256=ChXpasjRzAZjoYTimpPqYydnwEk-IgdxR0SDXDOZbUM,12078
492
492
  plato/v2/sync/client.py,sha256=cA2ifI8BMlB-WAOog6G0BxuFEnDqnEXi5CIUJXEHBnE,4829
493
493
  plato/v2/sync/environment.py,sha256=WnDzbyEHpwCSEP8XnfNSjIYS7rt7lYR4HGJjzprZmTQ,5066
494
494
  plato/v2/sync/flow_executor.py,sha256=N41-WCWIJVcCR2UmPUEiK7roNacYoeONkRXpR7lUgT8,13941
495
- plato/v2/sync/session.py,sha256=okXqF-CjMmA82WRy2zPXaGidbovgjAENSqiuvE4_jKE,30420
495
+ plato/v2/sync/session.py,sha256=NL_qEXnXjZfAsuFgpq72pVmHa9ouo8W3HkJ5vYaNSQU,29555
496
496
  plato/v2/utils/__init__.py,sha256=XLeFFsjXkm9g2raMmo7Wt4QN4hhCrNZDJKnpffJ4LtM,38
497
497
  plato/v2/utils/db_cleanup.py,sha256=JMzAAJz0ZnoUXtd8F4jpQmBpJpos2__RkgN_cuEearg,8692
498
498
  plato/v2/utils/gateway_tunnel.py,sha256=eWgwf4VV8-jx6iCuHFgCISsAOVmNOOjCB56EuZLsnOA,7171
@@ -504,7 +504,7 @@ plato/worlds/base.py,sha256=-RR71bSxEFI5yydtrtq-AAbuw98CIjvmrbztqzB9oIc,31041
504
504
  plato/worlds/build_hook.py,sha256=KSoW0kqa5b7NyZ7MYOw2qsZ_2FkWuz0M3Ru7AKOP7Qw,3486
505
505
  plato/worlds/config.py,sha256=O1lUXzxp-Z_M7izslT8naXgE6XujjzwYFFrDDzUOueI,12736
506
506
  plato/worlds/runner.py,sha256=r9B2BxBae8_dM7y5cJf9xhThp_I1Qvf_tlPq2rs8qC8,4013
507
- plato_sdk_v2-2.7.3.dist-info/METADATA,sha256=XmAi4ZSPth7U15myiaNzNL98AIPMnCJjtkTsWWXMUjI,8652
508
- plato_sdk_v2-2.7.3.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
509
- plato_sdk_v2-2.7.3.dist-info/entry_points.txt,sha256=upGMbJCx6YWUTKrPoYvYUYfFCqYr75nHDwhA-45m6p8,136
510
- plato_sdk_v2-2.7.3.dist-info/RECORD,,
507
+ plato_sdk_v2-2.7.4.dist-info/METADATA,sha256=7-8E4JnliLL5ubIAB3DbANtKg5hT9zpURimB0gj6DjI,8652
508
+ plato_sdk_v2-2.7.4.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
509
+ plato_sdk_v2-2.7.4.dist-info/entry_points.txt,sha256=upGMbJCx6YWUTKrPoYvYUYfFCqYr75nHDwhA-45m6p8,136
510
+ plato_sdk_v2-2.7.4.dist-info/RECORD,,