plato-sdk-v2 2.4.1__py3-none-any.whl → 2.4.2__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.
plato/v1/cli/agent.py CHANGED
@@ -757,8 +757,8 @@ def agent_schema(
757
757
  console.print(json.dumps(schema, indent=2))
758
758
 
759
759
 
760
- @agent_app.command(name="push")
761
- def agent_push(
760
+ @agent_app.command(name="publish")
761
+ def agent_publish(
762
762
  target: str = typer.Argument(".", help="Path to agent directory OR Harbor agent name"),
763
763
  all_agents: bool = typer.Option(False, "--all", "-a", help="Publish all agents in directory"),
764
764
  dry_run: bool = typer.Option(False, "--dry-run", help="Build without pushing to ECR"),
@@ -776,10 +776,10 @@ def agent_push(
776
776
  - Harbor agents: from installed Harbor package version
777
777
 
778
778
  Examples:
779
- plato agent push ./agents/my-agent # Custom agent
780
- plato agent push claude-code # Harbor built-in
781
- plato agent push --all ./agents # All agents in directory
782
- plato agent push claude-code --dry-run # Dry run
779
+ plato agent publish ./agents/my-agent # Custom agent
780
+ plato agent publish claude-code # Harbor built-in
781
+ plato agent publish --all ./agents # All agents in directory
782
+ plato agent publish claude-code --dry-run # Dry run
783
783
  """
784
784
 
785
785
  # Handle --all flag with directory
@@ -964,7 +964,7 @@ def agent_images():
964
964
  agents = data.get("agents", [])
965
965
  if not agents:
966
966
  console.print("[yellow]No published agents found[/yellow]")
967
- console.print("\n[dim]Publish with: plato agent push <path-or-name>[/dim]")
967
+ console.print("\n[dim]Publish with: plato agent publish <path-or-name>[/dim]")
968
968
  return
969
969
 
970
970
  console.print("[bold]Published Agent Images:[/bold]\n")
plato/v1/cli/chronos.py CHANGED
@@ -51,41 +51,27 @@ def launch(
51
51
  """
52
52
  Launch a Chronos job from a config file.
53
53
 
54
- The config file should be a JSON file with the following structure:
55
-
56
54
  \b
57
- {
58
- "world_package": "plato-world-structured-execution",
59
- "world_version": "0.1.13", // optional, uses latest if not specified
60
- "world_config": { ... },
61
- "agent_configs": {
62
- "skill_runner": {
63
- "agent_id": "claude-code:2.1.5",
64
- "config": { ... }
55
+ Config format:
56
+ {
57
+ "world": {
58
+ "package": "plato-world-structured-execution:0.1.17",
59
+ "config": {
60
+ "skill_runner": {
61
+ "image": "computer-use:1.1.0",
62
+ "config": { ... }
63
+ },
64
+ "secrets": { ... }
65
+ }
66
+ },
67
+ "runtime": {
68
+ "artifact_id": "..." // optional
69
+ }
65
70
  }
66
- },
67
- "secret_ids": [1, 2, 3] // IDs of secrets from Chronos
68
- }
69
71
 
70
72
  Examples:
71
73
  plato chronos launch config.json
72
74
  plato chronos launch config.json --wait
73
- plato chronos launch config.json --url https://chronos.example.com
74
-
75
- Config format (simplified - agents/secrets embedded in world_config):
76
- {
77
- "world_package": "plato-world-structured-execution",
78
- "world_version": "latest", // optional
79
- "world_config": {
80
- "skill_runner": {
81
- "image": "claude-code:2.1.5",
82
- "config": { ... }
83
- },
84
- "plato_api_key": "pk_xxx", // secrets embedded
85
- ...
86
- },
87
- "runtime_artifact_id": "..." // optional
88
- }
89
75
  """
90
76
  import httpx
91
77
 
@@ -107,22 +93,19 @@ def launch(
107
93
  raise typer.Exit(1)
108
94
 
109
95
  # Validate required fields
110
- if "world_package" not in job_config:
111
- console.print("[red]❌ Missing required field: world_package[/red]")
96
+ if "world" not in job_config or "package" not in job_config.get("world", {}):
97
+ console.print("[red]❌ Missing required field: world.package[/red]")
112
98
  raise typer.Exit(1)
113
99
 
114
- # Build request - simplified format (agents/secrets in world_config)
100
+ # Build request
115
101
  request_body = {
116
- "world_package": job_config["world_package"],
117
- "world_version": job_config.get("world_version"),
118
- "world_config": job_config.get("world_config", {}),
119
- "runtime_artifact_id": job_config.get("runtime_artifact_id"),
102
+ "world": job_config["world"],
103
+ "runtime": job_config.get("runtime", {}),
120
104
  }
121
105
 
106
+ world_package = job_config["world"]["package"]
122
107
  console.print("[blue]🚀 Launching job...[/blue]")
123
- console.print(f" World: {request_body['world_package']}")
124
- if request_body.get("world_version"):
125
- console.print(f" Version: {request_body['world_version']}")
108
+ console.print(f" World: {world_package}")
126
109
 
127
110
  try:
128
111
  with httpx.Client(timeout=60) as client:
@@ -489,22 +472,22 @@ async def _run_dev_impl(
489
472
  with open(config_path) as f:
490
473
  raw_config = json.load(f)
491
474
 
492
- # Handle Chronos-style config format
493
- if "world_config" in raw_config:
494
- config_data = raw_config["world_config"].copy()
495
- top_level_secrets = raw_config.get("secrets", {})
496
- if top_level_secrets:
497
- config_data.setdefault("secrets", {})
498
- config_data["secrets"].update(top_level_secrets)
499
- else:
500
- config_data = raw_config.copy()
475
+ # Validate config format: { world: { package, config }, runtime: { artifact_id } }
476
+ if "world" not in raw_config or "package" not in raw_config.get("world", {}):
477
+ raise ValueError("Invalid config: missing world.package")
501
478
 
502
- # Determine world name from config
503
- world_package = raw_config.get("world_package", "")
504
- if world_package.startswith("plato-world-"):
505
- world_name = world_package[len("plato-world-") :]
479
+ world_package = raw_config["world"]["package"]
480
+ config_data = raw_config["world"].get("config", {}).copy()
481
+ runtime_artifact_id = raw_config.get("runtime", {}).get("artifact_id")
482
+ if runtime_artifact_id:
483
+ config_data["runtime_artifact_id"] = runtime_artifact_id
484
+
485
+ # Parse world name from package (e.g., "plato-world-structured-execution:0.1.17")
486
+ world_package_name = world_package.split(":")[0] if ":" in world_package else world_package
487
+ if world_package_name.startswith("plato-world-"):
488
+ world_name = world_package_name[len("plato-world-") :]
506
489
  else:
507
- world_name = world_package or "unknown"
490
+ world_name = world_package_name or "unknown"
508
491
 
509
492
  # Build local agent images if agents_dir is provided
510
493
  if agents_dir:
@@ -748,27 +731,23 @@ def dev(
748
731
  \b
749
732
  Config format (same as Chronos launch):
750
733
  {
751
- "world_package": "plato-world-structured-execution",
752
- "world_config": {
753
- "sim_name": "my-task",
754
- "steps": [...],
755
- "agents": {
734
+ "world": {
735
+ "package": "plato-world-structured-execution:0.1.17",
736
+ "config": {
756
737
  "skill_runner": {
757
- "image": "computer-use:latest",
758
- "config": {"model_name": "..."}
759
- }
738
+ "image": "computer-use:1.1.0",
739
+ "config": { ... }
740
+ },
741
+ "secrets": { ... }
760
742
  }
761
743
  },
762
- "secrets": {
763
- "gemini_api_key": "...",
764
- "plato_api_key": "..."
744
+ "runtime": {
745
+ "artifact_id": "..."
765
746
  }
766
747
  }
767
748
 
768
- Examples:
769
- plato chronos dev config.json --world-dir ~/worlds/my-world
770
- plato chronos dev config.json -w ~/worlds/my-world -a ~/agents
771
- plato chronos dev config.json -w ~/worlds/my-world --platform linux/amd64
749
+ Example:
750
+ plato chronos dev config.json -w ~/worlds/my-world -a ~/agents --platform linux/amd64
772
751
  """
773
752
  logging.basicConfig(
774
753
  level=logging.INFO,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: plato-sdk-v2
3
- Version: 2.4.1
3
+ Version: 2.4.2
4
4
  Summary: Python SDK for the Plato API
5
5
  Author-email: Plato <support@plato.so>
6
6
  License-Expression: MIT
@@ -386,8 +386,8 @@ plato/v1/sync_env.py,sha256=UIfDpx3nPHBNWzahSddvol0SvfK9vU4mr3MOIOPCGr8,24878
386
386
  plato/v1/sync_flow_executor.py,sha256=kgvNYOtA9FHeNfP7qb8ZPUIlTsfIss_Z98W8uX5veck,19233
387
387
  plato/v1/sync_sdk.py,sha256=2sedg1QJiSxr1I3kCyfaLAnlAgHlbblc3QQP_47O30k,25697
388
388
  plato/v1/cli/__init__.py,sha256=om4b7PxgsoI7rEwuQelmQkqPdhMVn53_5qEN8kvksYw,105
389
- plato/v1/cli/agent.py,sha256=G6TV3blG_BqMDBWS-CG7GwzqoqcJTMsIKQ88jvLXb4k,43745
390
- plato/v1/cli/chronos.py,sha256=u0qJwZsV-me8P8GML2MzVO8KPhhN31KMIKoQL2gx9_8,26336
389
+ plato/v1/cli/agent.py,sha256=EbmEKWCMC5DJjmVDrYuwGenhIDgPjie8hdwrDOTSXaY,43766
390
+ plato/v1/cli/chronos.py,sha256=VLsvh34R7dusV5BckYTZAIsCBihQkO5cxZDBq8S2x3I,25532
391
391
  plato/v1/cli/main.py,sha256=iKUz6Mu-4-dgr29qOUmDqBaumOCzNQKZsHAalVtaH0Q,6932
392
392
  plato/v1/cli/pm.py,sha256=TIvXBIWFDjr4s1girMMCuvHWQJkjpmsS-igAamddIWE,49746
393
393
  plato/v1/cli/sandbox.py,sha256=jhTney-Pr8bGmWIXOjVIMtZJ7v7uIoRnuh3wfG7weRg,98718
@@ -464,7 +464,7 @@ plato/worlds/base.py,sha256=1O3iKilXlr56mUPVovHY_BjM3S8T57FrotF4895qv5Y,30675
464
464
  plato/worlds/build_hook.py,sha256=KSoW0kqa5b7NyZ7MYOw2qsZ_2FkWuz0M3Ru7AKOP7Qw,3486
465
465
  plato/worlds/config.py,sha256=a5frj3mt06rSlT25kE-L8Q2b2MTWkR-8cUoBKpC8tG4,11036
466
466
  plato/worlds/runner.py,sha256=r9B2BxBae8_dM7y5cJf9xhThp_I1Qvf_tlPq2rs8qC8,4013
467
- plato_sdk_v2-2.4.1.dist-info/METADATA,sha256=OH0RaQpDqg8_mtZ98cw5FuYZDWEuS68fzYqYs1K1W8s,8652
468
- plato_sdk_v2-2.4.1.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
469
- plato_sdk_v2-2.4.1.dist-info/entry_points.txt,sha256=upGMbJCx6YWUTKrPoYvYUYfFCqYr75nHDwhA-45m6p8,136
470
- plato_sdk_v2-2.4.1.dist-info/RECORD,,
467
+ plato_sdk_v2-2.4.2.dist-info/METADATA,sha256=1D5uBnPNi-3B2f5qSsi7WVQ0ezOEBNik0xHr5b0-YFc,8652
468
+ plato_sdk_v2-2.4.2.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
469
+ plato_sdk_v2-2.4.2.dist-info/entry_points.txt,sha256=upGMbJCx6YWUTKrPoYvYUYfFCqYr75nHDwhA-45m6p8,136
470
+ plato_sdk_v2-2.4.2.dist-info/RECORD,,