agentsystems-sdk 0.2.31__tar.gz → 0.3.0__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 (59) hide show
  1. {agentsystems_sdk-0.2.31/agentsystems_sdk.egg-info → agentsystems_sdk-0.3.0}/PKG-INFO +1 -1
  2. {agentsystems_sdk-0.2.31 → agentsystems_sdk-0.3.0}/agentsystems_sdk/commands/init.py +3 -35
  3. {agentsystems_sdk-0.2.31 → agentsystems_sdk-0.3.0}/agentsystems_sdk/deployments_scaffold/compose/local/docker-compose.yml +1 -1
  4. {agentsystems_sdk-0.2.31 → agentsystems_sdk-0.3.0}/agentsystems_sdk/utils.py +1 -1
  5. {agentsystems_sdk-0.2.31 → agentsystems_sdk-0.3.0/agentsystems_sdk.egg-info}/PKG-INFO +1 -1
  6. {agentsystems_sdk-0.2.31 → agentsystems_sdk-0.3.0}/pyproject.toml +1 -1
  7. {agentsystems_sdk-0.2.31 → agentsystems_sdk-0.3.0}/tests/test_cli_init.py +35 -117
  8. {agentsystems_sdk-0.2.31 → agentsystems_sdk-0.3.0}/tests/test_utils.py +1 -1
  9. {agentsystems_sdk-0.2.31 → agentsystems_sdk-0.3.0}/LICENSE +0 -0
  10. {agentsystems_sdk-0.2.31 → agentsystems_sdk-0.3.0}/MANIFEST.in +0 -0
  11. {agentsystems_sdk-0.2.31 → agentsystems_sdk-0.3.0}/NOTICE +0 -0
  12. {agentsystems_sdk-0.2.31 → agentsystems_sdk-0.3.0}/README.md +0 -0
  13. {agentsystems_sdk-0.2.31 → agentsystems_sdk-0.3.0}/agentsystems_sdk/__init__.py +0 -0
  14. {agentsystems_sdk-0.2.31 → agentsystems_sdk-0.3.0}/agentsystems_sdk/cli.py +0 -0
  15. {agentsystems_sdk-0.2.31 → agentsystems_sdk-0.3.0}/agentsystems_sdk/commands/__init__.py +0 -0
  16. {agentsystems_sdk-0.2.31 → agentsystems_sdk-0.3.0}/agentsystems_sdk/commands/artifacts.py +0 -0
  17. {agentsystems_sdk-0.2.31 → agentsystems_sdk-0.3.0}/agentsystems_sdk/commands/clean.py +0 -0
  18. {agentsystems_sdk-0.2.31 → agentsystems_sdk-0.3.0}/agentsystems_sdk/commands/down.py +0 -0
  19. {agentsystems_sdk-0.2.31 → agentsystems_sdk-0.3.0}/agentsystems_sdk/commands/logs.py +0 -0
  20. {agentsystems_sdk-0.2.31 → agentsystems_sdk-0.3.0}/agentsystems_sdk/commands/restart.py +0 -0
  21. {agentsystems_sdk-0.2.31 → agentsystems_sdk-0.3.0}/agentsystems_sdk/commands/run.py +0 -0
  22. {agentsystems_sdk-0.2.31 → agentsystems_sdk-0.3.0}/agentsystems_sdk/commands/status.py +0 -0
  23. {agentsystems_sdk-0.2.31 → agentsystems_sdk-0.3.0}/agentsystems_sdk/commands/up.py +0 -0
  24. {agentsystems_sdk-0.2.31 → agentsystems_sdk-0.3.0}/agentsystems_sdk/config.py +0 -0
  25. {agentsystems_sdk-0.2.31 → agentsystems_sdk-0.3.0}/agentsystems_sdk/deployments_scaffold/.env.example +0 -0
  26. {agentsystems_sdk-0.2.31 → agentsystems_sdk-0.3.0}/agentsystems_sdk/deployments_scaffold/CONTRIBUTING.md +0 -0
  27. {agentsystems_sdk-0.2.31 → agentsystems_sdk-0.3.0}/agentsystems_sdk/deployments_scaffold/LICENSE +0 -0
  28. {agentsystems_sdk-0.2.31 → agentsystems_sdk-0.3.0}/agentsystems_sdk/deployments_scaffold/Makefile +0 -0
  29. {agentsystems_sdk-0.2.31 → agentsystems_sdk-0.3.0}/agentsystems_sdk/deployments_scaffold/NOTICE +0 -0
  30. {agentsystems_sdk-0.2.31 → agentsystems_sdk-0.3.0}/agentsystems_sdk/deployments_scaffold/README.md +0 -0
  31. {agentsystems_sdk-0.2.31 → agentsystems_sdk-0.3.0}/agentsystems_sdk/deployments_scaffold/agentsystems-config.yml +0 -0
  32. {agentsystems_sdk-0.2.31 → agentsystems_sdk-0.3.0}/agentsystems_sdk/deployments_scaffold/compose/langfuse/docker-compose.yml +0 -0
  33. {agentsystems_sdk-0.2.31 → agentsystems_sdk-0.3.0}/agentsystems_sdk/deployments_scaffold/compose/local/db-backup/Dockerfile +0 -0
  34. {agentsystems_sdk-0.2.31 → agentsystems_sdk-0.3.0}/agentsystems_sdk/deployments_scaffold/compose/local/db-backup/entrypoint.sh +0 -0
  35. {agentsystems_sdk-0.2.31 → agentsystems_sdk-0.3.0}/agentsystems_sdk/deployments_scaffold/compose/local/init-artifacts-volume.sh +0 -0
  36. {agentsystems_sdk-0.2.31 → agentsystems_sdk-0.3.0}/agentsystems_sdk/deployments_scaffold/compose/local/postgres-init/audit.sql +0 -0
  37. {agentsystems_sdk-0.2.31 → agentsystems_sdk-0.3.0}/agentsystems_sdk/deployments_scaffold/requirements-dev.txt +0 -0
  38. {agentsystems_sdk-0.2.31 → agentsystems_sdk-0.3.0}/agentsystems_sdk/deployments_scaffold/schema/agentsystems-config.schema.json +0 -0
  39. {agentsystems_sdk-0.2.31 → agentsystems_sdk-0.3.0}/agentsystems_sdk/progress_tracker.py +0 -0
  40. {agentsystems_sdk-0.2.31 → agentsystems_sdk-0.3.0}/agentsystems_sdk.egg-info/SOURCES.txt +0 -0
  41. {agentsystems_sdk-0.2.31 → agentsystems_sdk-0.3.0}/agentsystems_sdk.egg-info/dependency_links.txt +0 -0
  42. {agentsystems_sdk-0.2.31 → agentsystems_sdk-0.3.0}/agentsystems_sdk.egg-info/entry_points.txt +0 -0
  43. {agentsystems_sdk-0.2.31 → agentsystems_sdk-0.3.0}/agentsystems_sdk.egg-info/requires.txt +0 -0
  44. {agentsystems_sdk-0.2.31 → agentsystems_sdk-0.3.0}/agentsystems_sdk.egg-info/top_level.txt +0 -0
  45. {agentsystems_sdk-0.2.31 → agentsystems_sdk-0.3.0}/setup.cfg +0 -0
  46. {agentsystems_sdk-0.2.31 → agentsystems_sdk-0.3.0}/tests/test_cli.py +0 -0
  47. {agentsystems_sdk-0.2.31 → agentsystems_sdk-0.3.0}/tests/test_cli_artifacts.py +0 -0
  48. {agentsystems_sdk-0.2.31 → agentsystems_sdk-0.3.0}/tests/test_cli_clean.py +0 -0
  49. {agentsystems_sdk-0.2.31 → agentsystems_sdk-0.3.0}/tests/test_cli_down.py +0 -0
  50. {agentsystems_sdk-0.2.31 → agentsystems_sdk-0.3.0}/tests/test_cli_logs.py +0 -0
  51. {agentsystems_sdk-0.2.31 → agentsystems_sdk-0.3.0}/tests/test_cli_main.py +0 -0
  52. {agentsystems_sdk-0.2.31 → agentsystems_sdk-0.3.0}/tests/test_cli_restart.py +0 -0
  53. {agentsystems_sdk-0.2.31 → agentsystems_sdk-0.3.0}/tests/test_cli_run.py +0 -0
  54. {agentsystems_sdk-0.2.31 → agentsystems_sdk-0.3.0}/tests/test_cli_status.py +0 -0
  55. {agentsystems_sdk-0.2.31 → agentsystems_sdk-0.3.0}/tests/test_cli_up.py +0 -0
  56. {agentsystems_sdk-0.2.31 → agentsystems_sdk-0.3.0}/tests/test_config.py +0 -0
  57. {agentsystems_sdk-0.2.31 → agentsystems_sdk-0.3.0}/tests/test_config_errors.py +0 -0
  58. {agentsystems_sdk-0.2.31 → agentsystems_sdk-0.3.0}/tests/test_init.py +0 -0
  59. {agentsystems_sdk-0.2.31 → agentsystems_sdk-0.3.0}/tests/test_progress.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agentsystems-sdk
3
- Version: 0.2.31
3
+ Version: 0.3.0
4
4
  Summary: AgentSystems Python SDK and CLI
5
5
  Author-email: AgentSystems <support@agentsystems.ai>
6
6
  License-Expression: Apache-2.0
@@ -23,7 +23,6 @@ from dotenv import set_key
23
23
 
24
24
  from ..utils import (
25
25
  ensure_docker_installed,
26
- docker_login_if_needed,
27
26
  run_command,
28
27
  get_required_images,
29
28
  )
@@ -40,12 +39,6 @@ def init_command(
40
39
  writable=True,
41
40
  resolve_path=True,
42
41
  ),
43
- docker_token: Optional[str] = typer.Option(
44
- None,
45
- "--docker-token",
46
- envvar="DOCKER_OAT",
47
- help="Docker Hub Org Access Token for private images",
48
- ),
49
42
  ) -> None:
50
43
  """Initialize a new AgentSystems deployment from the built-in template.
51
44
 
@@ -111,16 +104,6 @@ def init_command(
111
104
  pub_key = f"pk-lf-{uuid.uuid4()}"
112
105
  secret_key = f"sk-lf-{uuid.uuid4()}"
113
106
 
114
- if docker_token is None and sys.stdin.isatty():
115
- docker_token = (
116
- typer.prompt(
117
- "Docker org access token (leave blank if images are public)",
118
- default="",
119
- hide_input=True,
120
- )
121
- or None
122
- )
123
-
124
107
  # Get the path to the scaffold directory
125
108
  import os
126
109
 
@@ -199,16 +182,6 @@ def init_command(
199
182
  ensure_docker_installed()
200
183
  progress.update(docker_task, completed=1)
201
184
 
202
- # Docker login if token provided
203
- if docker_token:
204
- login_task = progress.add_task("Logging into Docker Hub", total=1)
205
- progress.stop() # Stop progress display temporarily
206
- try:
207
- docker_login_if_needed(docker_token)
208
- finally:
209
- progress.start() # Always restart progress
210
- progress.update(login_task, completed=1)
211
-
212
185
  # Pull required images
213
186
  required_images = get_required_images()
214
187
 
@@ -225,14 +198,9 @@ def init_command(
225
198
  try:
226
199
  run_command(["docker", "pull", img])
227
200
  except typer.Exit:
228
- if docker_token is None and sys.stdin.isatty():
229
- docker_token = typer.prompt(
230
- "Pull failed – provide Docker org token", hide_input=True
231
- )
232
- docker_login_if_needed(docker_token)
233
- run_command(["docker", "pull", img])
234
- else:
235
- raise
201
+ # Image pull failed - control-plane is public on ghcr.io
202
+ # This shouldn't happen unless there's a network issue
203
+ raise
236
204
  finally:
237
205
  progress.start() # Always restart progress
238
206
  progress.advance(pull_task)
@@ -10,7 +10,7 @@ services:
10
10
  restart: "no"
11
11
 
12
12
  gateway:
13
- image: agentsystems/agent-control-plane:${ACP_TAG:-latest}
13
+ image: ghcr.io/agentsystems/agent-control-plane:${ACP_TAG:-latest}
14
14
  ports: ["18080:8080"]
15
15
  depends_on: [postgres]
16
16
  environment:
@@ -264,7 +264,7 @@ def get_required_images() -> List[str]:
264
264
  List of Docker image names
265
265
  """
266
266
  return [
267
- "agentsystems/agent-control-plane:latest",
267
+ "ghcr.io/agentsystems/agent-control-plane:latest",
268
268
  ]
269
269
 
270
270
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agentsystems-sdk
3
- Version: 0.2.31
3
+ Version: 0.3.0
4
4
  Summary: AgentSystems Python SDK and CLI
5
5
  Author-email: AgentSystems <support@agentsystems.ai>
6
6
  License-Expression: Apache-2.0
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "agentsystems-sdk"
3
- version = "0.2.31"
3
+ version = "0.3.0"
4
4
  description = "AgentSystems Python SDK and CLI"
5
5
  readme = "README.md"
6
6
  authors = [ { name = "AgentSystems", email = "support@agentsystems.ai" } ]
@@ -12,7 +12,6 @@ class TestInitCommand:
12
12
  """Tests for the init command with local scaffold."""
13
13
 
14
14
  @patch("agentsystems_sdk.commands.init.get_required_images")
15
- @patch("agentsystems_sdk.commands.init.docker_login_if_needed")
16
15
  @patch("agentsystems_sdk.commands.init.ensure_docker_installed")
17
16
  @patch("agentsystems_sdk.commands.init.set_key")
18
17
  @patch("agentsystems_sdk.commands.init.shutil.copy")
@@ -29,7 +28,6 @@ class TestInitCommand:
29
28
  mock_shutil_copy,
30
29
  mock_set_key,
31
30
  mock_ensure_docker,
32
- mock_docker_login,
33
31
  mock_get_images,
34
32
  tmp_path,
35
33
  ):
@@ -43,19 +41,17 @@ class TestInitCommand:
43
41
  "TestOrg", # Organization name
44
42
  "admin@test.com", # Email
45
43
  "password123", # Password
46
- "docker-token-123", # Docker token
47
44
  ]
48
45
 
49
46
  # Mock required images
50
47
  mock_get_images.return_value = [
51
- "agentsystems/agent-control-plane:latest",
48
+ "ghcr.io/agentsystems/agent-control-plane:latest",
52
49
  "langfuse/langfuse:latest",
53
50
  ]
54
51
 
55
52
  # Execute
56
53
  init_command(
57
54
  project_dir=None, # Will prompt for directory
58
- docker_token=None,
59
55
  )
60
56
 
61
57
  # Verify scaffold was copied
@@ -65,17 +61,13 @@ class TestInitCommand:
65
61
  # Verify Docker was checked
66
62
  mock_ensure_docker.assert_called_once()
67
63
 
68
- # Verify Docker login
69
- mock_docker_login.assert_called_once_with("docker-token-123")
70
-
71
- # Verify images were pulled
64
+ # Verify images were pulled (no Docker login needed for public images)
72
65
  assert any(
73
66
  "docker" in str(call) and "pull" in str(call)
74
67
  for call in mock_run_command.call_args_list
75
68
  )
76
69
 
77
70
  @patch("agentsystems_sdk.commands.init.get_required_images")
78
- @patch("agentsystems_sdk.commands.init.docker_login_if_needed")
79
71
  @patch("agentsystems_sdk.commands.init.ensure_docker_installed")
80
72
  @patch("agentsystems_sdk.commands.init.set_key")
81
73
  @patch("agentsystems_sdk.commands.init.shutil.copy")
@@ -90,7 +82,6 @@ class TestInitCommand:
90
82
  mock_shutil_copy,
91
83
  mock_set_key,
92
84
  mock_ensure_docker,
93
- mock_docker_login,
94
85
  mock_get_images,
95
86
  tmp_path,
96
87
  ):
@@ -100,12 +91,13 @@ class TestInitCommand:
100
91
  project_dir = tmp_path / "test-project"
101
92
 
102
93
  # Mock required images
103
- mock_get_images.return_value = ["agentsystems/agent-control-plane:latest"]
94
+ mock_get_images.return_value = [
95
+ "ghcr.io/agentsystems/agent-control-plane:latest"
96
+ ]
104
97
 
105
98
  # Execute
106
99
  init_command(
107
100
  project_dir=project_dir,
108
- docker_token="docker-token-123",
109
101
  )
110
102
 
111
103
  # Verify scaffold was copied
@@ -185,7 +177,6 @@ class TestInitCommand:
185
177
  # Execute
186
178
  init_command(
187
179
  project_dir=project_dir,
188
- docker_token=None,
189
180
  )
190
181
 
191
182
  # Verify set_key was called to populate the .env file
@@ -211,76 +202,6 @@ class TestInitCommand:
211
202
  for var in langfuse_vars:
212
203
  assert var in set_keys
213
204
 
214
- @patch("agentsystems_sdk.commands.init.get_required_images")
215
- @patch("agentsystems_sdk.commands.init.docker_login_if_needed")
216
- @patch("agentsystems_sdk.commands.init.ensure_docker_installed")
217
- @patch("agentsystems_sdk.commands.init.set_key")
218
- @patch("agentsystems_sdk.commands.init.shutil.copytree")
219
- @patch("agentsystems_sdk.commands.init.run_command")
220
- @patch("agentsystems_sdk.commands.init.typer.prompt")
221
- @patch("agentsystems_sdk.commands.init.sys.stdin")
222
- def test_init_command_docker_pull_failure_retry(
223
- self,
224
- mock_stdin,
225
- mock_prompt,
226
- mock_run_command,
227
- mock_copytree,
228
- mock_set_key,
229
- mock_ensure_docker,
230
- mock_docker_login,
231
- mock_get_images,
232
- tmp_path,
233
- ):
234
- """Test init command retries docker pull with token on failure."""
235
- # Setup
236
- mock_stdin.isatty.return_value = True
237
- project_dir = tmp_path / "test-project"
238
-
239
- # Mock user inputs
240
- mock_prompt.side_effect = [
241
- str(project_dir), # Directory prompt
242
- "TestOrg", # Organization name
243
- "admin@test.com", # Email
244
- "password123", # Password
245
- "", # No initial docker token
246
- "docker-token-retry", # Docker token prompt after pull failure
247
- ]
248
-
249
- # Mock required images
250
- mock_get_images.return_value = ["private/image:latest"]
251
-
252
- # Mock copytree to create directory
253
- def create_project_structure(src, dst):
254
- dst.mkdir(parents=True)
255
- (dst / ".env.example").write_text("")
256
-
257
- mock_copytree.side_effect = create_project_structure
258
-
259
- # Mock run_command to fail on first docker pull, succeed on retry
260
- pull_attempts = 0
261
-
262
- def mock_run_side_effect(cmd):
263
- nonlocal pull_attempts
264
- if "docker" in cmd and "pull" in cmd:
265
- pull_attempts += 1
266
- if pull_attempts == 1:
267
- raise typer.Exit(code=1)
268
- # Success on second attempt
269
-
270
- mock_run_command.side_effect = mock_run_side_effect
271
-
272
- # Execute
273
- init_command(
274
- project_dir=None,
275
- docker_token=None, # No initial docker token
276
- )
277
-
278
- # Verify docker login was called after failure
279
- mock_docker_login.assert_called_with("docker-token-retry")
280
-
281
- # Verify pull was attempted twice
282
- assert pull_attempts == 2
283
-
284
205
  @patch("agentsystems_sdk.commands.init.get_required_images")
285
206
  @patch("agentsystems_sdk.commands.init.ensure_docker_installed")
286
207
  @patch("agentsystems_sdk.commands.init.set_key")
@@ -312,7 +233,6 @@ class TestInitCommand:
312
233
  # Execute
313
234
  init_command(
314
235
  project_dir=project_dir,
315
- docker_token=None,
316
236
  )
317
237
 
318
238
  # Verify no docker pull commands were executed
@@ -346,22 +266,21 @@ class TestInitCommand:
346
266
  # Mock other dependencies to avoid actual execution
347
267
  with patch("agentsystems_sdk.commands.init.shutil.copytree"):
348
268
  with patch("agentsystems_sdk.commands.init.ensure_docker_installed"):
349
- with patch("agentsystems_sdk.commands.init.docker_login_if_needed"):
350
- with patch(
351
- "agentsystems_sdk.commands.init.get_required_images",
352
- return_value=[],
353
- ):
354
- with patch("agentsystems_sdk.commands.init.set_key"):
355
- # Execute
356
- init_command(project_dir=None)
357
-
358
- # Verify email prompt was called twice (invalid, then valid)
359
- email_calls = [
360
- call
361
- for call in mock_prompt.call_args_list
362
- if "email" in str(call).lower()
363
- ]
364
- assert len(email_calls) >= 2
269
+ with patch(
270
+ "agentsystems_sdk.commands.init.get_required_images",
271
+ return_value=[],
272
+ ):
273
+ with patch("agentsystems_sdk.commands.init.set_key"):
274
+ # Execute
275
+ init_command(project_dir=None)
276
+
277
+ # Verify email prompt was called twice (invalid, then valid)
278
+ email_calls = [
279
+ call
280
+ for call in mock_prompt.call_args_list
281
+ if "email" in str(call).lower()
282
+ ]
283
+ assert len(email_calls) >= 2
365
284
 
366
285
  @patch("agentsystems_sdk.commands.init.typer.prompt")
367
286
  @patch("agentsystems_sdk.commands.init.sys.stdin")
@@ -388,19 +307,18 @@ class TestInitCommand:
388
307
  # Mock other dependencies to avoid actual execution
389
308
  with patch("agentsystems_sdk.commands.init.shutil.copytree"):
390
309
  with patch("agentsystems_sdk.commands.init.ensure_docker_installed"):
391
- with patch("agentsystems_sdk.commands.init.docker_login_if_needed"):
392
- with patch(
393
- "agentsystems_sdk.commands.init.get_required_images",
394
- return_value=[],
395
- ):
396
- with patch("agentsystems_sdk.commands.init.set_key"):
397
- # Execute
398
- init_command(project_dir=None)
399
-
400
- # Verify password prompt was called twice (short, then valid)
401
- password_calls = [
402
- call
403
- for call in mock_prompt.call_args_list
404
- if "password" in str(call).lower()
405
- ]
406
- assert len(password_calls) >= 2
310
+ with patch(
311
+ "agentsystems_sdk.commands.init.get_required_images",
312
+ return_value=[],
313
+ ):
314
+ with patch("agentsystems_sdk.commands.init.set_key"):
315
+ # Execute
316
+ init_command(project_dir=None)
317
+
318
+ # Verify password prompt was called twice (short, then valid)
319
+ password_calls = [
320
+ call
321
+ for call in mock_prompt.call_args_list
322
+ if "password" in str(call).lower()
323
+ ]
324
+ assert len(password_calls) >= 2
@@ -320,7 +320,7 @@ EQUALS_IN_VALUE=key=value
320
320
  images = get_required_images()
321
321
 
322
322
  assert isinstance(images, list)
323
- assert "agentsystems/agent-control-plane:latest" in images
323
+ assert "ghcr.io/agentsystems/agent-control-plane:latest" in images
324
324
 
325
325
  def test_cleanup_langfuse_init_vars_first_time(self, tmp_path):
326
326
  """Test cleanup_langfuse_init_vars on first cleanup."""