agentsystems-sdk 0.3.5__tar.gz → 0.4.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.
- {agentsystems_sdk-0.3.5/agentsystems_sdk.egg-info → agentsystems_sdk-0.4.0}/PKG-INFO +1 -1
- {agentsystems_sdk-0.3.5 → agentsystems_sdk-0.4.0}/agentsystems_sdk/cli.py +4 -0
- {agentsystems_sdk-0.3.5 → agentsystems_sdk-0.4.0}/agentsystems_sdk/commands/__init__.py +3 -0
- {agentsystems_sdk-0.3.5 → agentsystems_sdk-0.4.0}/agentsystems_sdk/commands/up.py +70 -0
- agentsystems_sdk-0.4.0/agentsystems_sdk/commands/version.py +86 -0
- {agentsystems_sdk-0.3.5 → agentsystems_sdk-0.4.0/agentsystems_sdk.egg-info}/PKG-INFO +1 -1
- {agentsystems_sdk-0.3.5 → agentsystems_sdk-0.4.0}/agentsystems_sdk.egg-info/SOURCES.txt +1 -0
- {agentsystems_sdk-0.3.5 → agentsystems_sdk-0.4.0}/pyproject.toml +1 -1
- {agentsystems_sdk-0.3.5 → agentsystems_sdk-0.4.0}/tests/test_cli_up.py +16 -0
- {agentsystems_sdk-0.3.5 → agentsystems_sdk-0.4.0}/LICENSE +0 -0
- {agentsystems_sdk-0.3.5 → agentsystems_sdk-0.4.0}/MANIFEST.in +0 -0
- {agentsystems_sdk-0.3.5 → agentsystems_sdk-0.4.0}/NOTICE +0 -0
- {agentsystems_sdk-0.3.5 → agentsystems_sdk-0.4.0}/README.md +0 -0
- {agentsystems_sdk-0.3.5 → agentsystems_sdk-0.4.0}/agentsystems_sdk/__init__.py +0 -0
- {agentsystems_sdk-0.3.5 → agentsystems_sdk-0.4.0}/agentsystems_sdk/commands/artifacts.py +0 -0
- {agentsystems_sdk-0.3.5 → agentsystems_sdk-0.4.0}/agentsystems_sdk/commands/clean.py +0 -0
- {agentsystems_sdk-0.3.5 → agentsystems_sdk-0.4.0}/agentsystems_sdk/commands/down.py +0 -0
- {agentsystems_sdk-0.3.5 → agentsystems_sdk-0.4.0}/agentsystems_sdk/commands/init.py +0 -0
- {agentsystems_sdk-0.3.5 → agentsystems_sdk-0.4.0}/agentsystems_sdk/commands/logs.py +0 -0
- {agentsystems_sdk-0.3.5 → agentsystems_sdk-0.4.0}/agentsystems_sdk/commands/restart.py +0 -0
- {agentsystems_sdk-0.3.5 → agentsystems_sdk-0.4.0}/agentsystems_sdk/commands/run.py +0 -0
- {agentsystems_sdk-0.3.5 → agentsystems_sdk-0.4.0}/agentsystems_sdk/commands/status.py +0 -0
- {agentsystems_sdk-0.3.5 → agentsystems_sdk-0.4.0}/agentsystems_sdk/commands/update.py +0 -0
- {agentsystems_sdk-0.3.5 → agentsystems_sdk-0.4.0}/agentsystems_sdk/config.py +0 -0
- {agentsystems_sdk-0.3.5 → agentsystems_sdk-0.4.0}/agentsystems_sdk/deployments_scaffold/.env.example +0 -0
- {agentsystems_sdk-0.3.5 → agentsystems_sdk-0.4.0}/agentsystems_sdk/deployments_scaffold/CONTRIBUTING.md +0 -0
- {agentsystems_sdk-0.3.5 → agentsystems_sdk-0.4.0}/agentsystems_sdk/deployments_scaffold/LICENSE +0 -0
- {agentsystems_sdk-0.3.5 → agentsystems_sdk-0.4.0}/agentsystems_sdk/deployments_scaffold/Makefile +0 -0
- {agentsystems_sdk-0.3.5 → agentsystems_sdk-0.4.0}/agentsystems_sdk/deployments_scaffold/NOTICE +0 -0
- {agentsystems_sdk-0.3.5 → agentsystems_sdk-0.4.0}/agentsystems_sdk/deployments_scaffold/README.md +0 -0
- {agentsystems_sdk-0.3.5 → agentsystems_sdk-0.4.0}/agentsystems_sdk/deployments_scaffold/agentsystems-config.yml +0 -0
- {agentsystems_sdk-0.3.5 → agentsystems_sdk-0.4.0}/agentsystems_sdk/deployments_scaffold/compose/langfuse/docker-compose.yml +0 -0
- {agentsystems_sdk-0.3.5 → agentsystems_sdk-0.4.0}/agentsystems_sdk/deployments_scaffold/compose/local/db-backup/Dockerfile +0 -0
- {agentsystems_sdk-0.3.5 → agentsystems_sdk-0.4.0}/agentsystems_sdk/deployments_scaffold/compose/local/db-backup/entrypoint.sh +0 -0
- {agentsystems_sdk-0.3.5 → agentsystems_sdk-0.4.0}/agentsystems_sdk/deployments_scaffold/compose/local/docker-compose.yml +0 -0
- {agentsystems_sdk-0.3.5 → agentsystems_sdk-0.4.0}/agentsystems_sdk/deployments_scaffold/compose/local/init-artifacts-volume.sh +0 -0
- {agentsystems_sdk-0.3.5 → agentsystems_sdk-0.4.0}/agentsystems_sdk/deployments_scaffold/compose/local/postgres-init/audit.sql +0 -0
- {agentsystems_sdk-0.3.5 → agentsystems_sdk-0.4.0}/agentsystems_sdk/deployments_scaffold/requirements-dev.txt +0 -0
- {agentsystems_sdk-0.3.5 → agentsystems_sdk-0.4.0}/agentsystems_sdk/deployments_scaffold/schema/agentsystems-config.schema.json +0 -0
- {agentsystems_sdk-0.3.5 → agentsystems_sdk-0.4.0}/agentsystems_sdk/progress_tracker.py +0 -0
- {agentsystems_sdk-0.3.5 → agentsystems_sdk-0.4.0}/agentsystems_sdk/utils.py +0 -0
- {agentsystems_sdk-0.3.5 → agentsystems_sdk-0.4.0}/agentsystems_sdk.egg-info/dependency_links.txt +0 -0
- {agentsystems_sdk-0.3.5 → agentsystems_sdk-0.4.0}/agentsystems_sdk.egg-info/entry_points.txt +0 -0
- {agentsystems_sdk-0.3.5 → agentsystems_sdk-0.4.0}/agentsystems_sdk.egg-info/requires.txt +0 -0
- {agentsystems_sdk-0.3.5 → agentsystems_sdk-0.4.0}/agentsystems_sdk.egg-info/top_level.txt +0 -0
- {agentsystems_sdk-0.3.5 → agentsystems_sdk-0.4.0}/setup.cfg +0 -0
- {agentsystems_sdk-0.3.5 → agentsystems_sdk-0.4.0}/tests/test_cli.py +0 -0
- {agentsystems_sdk-0.3.5 → agentsystems_sdk-0.4.0}/tests/test_cli_artifacts.py +0 -0
- {agentsystems_sdk-0.3.5 → agentsystems_sdk-0.4.0}/tests/test_cli_clean.py +0 -0
- {agentsystems_sdk-0.3.5 → agentsystems_sdk-0.4.0}/tests/test_cli_down.py +0 -0
- {agentsystems_sdk-0.3.5 → agentsystems_sdk-0.4.0}/tests/test_cli_init.py +0 -0
- {agentsystems_sdk-0.3.5 → agentsystems_sdk-0.4.0}/tests/test_cli_logs.py +0 -0
- {agentsystems_sdk-0.3.5 → agentsystems_sdk-0.4.0}/tests/test_cli_main.py +0 -0
- {agentsystems_sdk-0.3.5 → agentsystems_sdk-0.4.0}/tests/test_cli_restart.py +0 -0
- {agentsystems_sdk-0.3.5 → agentsystems_sdk-0.4.0}/tests/test_cli_run.py +0 -0
- {agentsystems_sdk-0.3.5 → agentsystems_sdk-0.4.0}/tests/test_cli_status.py +0 -0
- {agentsystems_sdk-0.3.5 → agentsystems_sdk-0.4.0}/tests/test_config.py +0 -0
- {agentsystems_sdk-0.3.5 → agentsystems_sdk-0.4.0}/tests/test_config_errors.py +0 -0
- {agentsystems_sdk-0.3.5 → agentsystems_sdk-0.4.0}/tests/test_init.py +0 -0
- {agentsystems_sdk-0.3.5 → agentsystems_sdk-0.4.0}/tests/test_progress.py +0 -0
- {agentsystems_sdk-0.3.5 → agentsystems_sdk-0.4.0}/tests/test_utils.py +0 -0
@@ -24,6 +24,8 @@ from agentsystems_sdk.commands import (
|
|
24
24
|
artifacts_path_command,
|
25
25
|
clean_command,
|
26
26
|
update_command,
|
27
|
+
version_command,
|
28
|
+
versions_command,
|
27
29
|
)
|
28
30
|
|
29
31
|
# Load .env before Typer parses env-var options
|
@@ -87,6 +89,8 @@ app.command(name="run")(run_command)
|
|
87
89
|
app.command(name="artifacts-path")(artifacts_path_command)
|
88
90
|
app.command(name="clean")(clean_command)
|
89
91
|
app.command(name="update")(update_command)
|
92
|
+
app.command(name="version")(version_command)
|
93
|
+
app.command(name="versions")(versions_command)
|
90
94
|
|
91
95
|
|
92
96
|
if __name__ == "__main__":
|
@@ -10,6 +10,7 @@ from .run import run_command
|
|
10
10
|
from .artifacts import artifacts_path_command
|
11
11
|
from .clean import clean_command
|
12
12
|
from .update import update_command
|
13
|
+
from .version import version_command, versions_command
|
13
14
|
|
14
15
|
__all__ = [
|
15
16
|
"init_command",
|
@@ -22,4 +23,6 @@ __all__ = [
|
|
22
23
|
"artifacts_path_command",
|
23
24
|
"clean_command",
|
24
25
|
"update_command",
|
26
|
+
"version_command",
|
27
|
+
"versions_command",
|
25
28
|
]
|
@@ -358,6 +358,18 @@ def up_command(
|
|
358
358
|
dir_okay=False,
|
359
359
|
resolve_path=True,
|
360
360
|
),
|
361
|
+
agent_control_plane_version: Optional[str] = typer.Option(
|
362
|
+
None,
|
363
|
+
"--agent-control-plane",
|
364
|
+
"--acp",
|
365
|
+
help="Pin agent-control-plane to specific version (e.g., 0.3.17)",
|
366
|
+
),
|
367
|
+
agentsystems_ui_version: Optional[str] = typer.Option(
|
368
|
+
None,
|
369
|
+
"--agentsystems-ui",
|
370
|
+
"--ui",
|
371
|
+
help="Pin agentsystems-ui to specific version (e.g., 0.1.5)",
|
372
|
+
),
|
361
373
|
) -> None:
|
362
374
|
"""Start the full AgentSystems platform via docker compose.
|
363
375
|
|
@@ -378,6 +390,64 @@ def up_command(
|
|
378
390
|
env_base = os.environ.copy()
|
379
391
|
env_base["DOCKER_CONFIG"] = isolated_cfg.name
|
380
392
|
|
393
|
+
# Validate and set version tags from CLI flags if provided
|
394
|
+
def _validate_version(version_str: str, min_version: str, component: str) -> bool:
|
395
|
+
"""Validate that version meets minimum requirements for version management features."""
|
396
|
+
import re
|
397
|
+
|
398
|
+
# Skip validation for special tags
|
399
|
+
if version_str in ["latest", "main", "development"]:
|
400
|
+
return True
|
401
|
+
|
402
|
+
# Validate semantic version format
|
403
|
+
if not re.match(r"^\d+\.\d+\.\d+$", version_str):
|
404
|
+
console.print(
|
405
|
+
f"[red]❌ Error: {component} version must be semantic version (x.y.z format)[/red]"
|
406
|
+
)
|
407
|
+
console.print(f"[red] You provided: {version_str}[/red]")
|
408
|
+
console.print("[red] Valid examples: 0.4.0, 1.2.3[/red]")
|
409
|
+
return False
|
410
|
+
|
411
|
+
# Simple version comparison (works for our use case)
|
412
|
+
def version_tuple(v):
|
413
|
+
return tuple(map(int, v.split(".")))
|
414
|
+
|
415
|
+
try:
|
416
|
+
if version_tuple(version_str) < version_tuple(min_version):
|
417
|
+
console.print(
|
418
|
+
f"[red]❌ Error: {component} version {version_str} does not support version management[/red]"
|
419
|
+
)
|
420
|
+
console.print(
|
421
|
+
f"[red] Minimum required {component}: {min_version}[/red]"
|
422
|
+
)
|
423
|
+
console.print(
|
424
|
+
"[red] This version introduced /version and /component-versions endpoints[/red]"
|
425
|
+
)
|
426
|
+
return False
|
427
|
+
except Exception:
|
428
|
+
console.print(f"[red]❌ Error: Invalid version format: {version_str}[/red]")
|
429
|
+
return False
|
430
|
+
|
431
|
+
return True
|
432
|
+
|
433
|
+
if agent_control_plane_version:
|
434
|
+
if not _validate_version(
|
435
|
+
agent_control_plane_version, "0.4.0", "agent-control-plane"
|
436
|
+
):
|
437
|
+
raise typer.Exit(1)
|
438
|
+
env_base["ACP_TAG"] = agent_control_plane_version
|
439
|
+
console.print(
|
440
|
+
f"[yellow]📌 Pinning agent-control-plane to version: {agent_control_plane_version}[/yellow]"
|
441
|
+
)
|
442
|
+
|
443
|
+
if agentsystems_ui_version:
|
444
|
+
if not _validate_version(agentsystems_ui_version, "0.2.0", "agentsystems-ui"):
|
445
|
+
raise typer.Exit(1)
|
446
|
+
env_base["UI_TAG"] = agentsystems_ui_version
|
447
|
+
console.print(
|
448
|
+
f"[yellow]📌 Pinning agentsystems-ui to version: {agentsystems_ui_version}[/yellow]"
|
449
|
+
)
|
450
|
+
|
381
451
|
# .env gets loaded later – keep env_base in sync
|
382
452
|
def _sync_env_base() -> None:
|
383
453
|
env_base.update(os.environ)
|
@@ -0,0 +1,86 @@
|
|
1
|
+
"""Version information command for AgentSystems SDK."""
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
|
5
|
+
import importlib.metadata
|
6
|
+
from rich.console import Console
|
7
|
+
from rich.table import Table
|
8
|
+
|
9
|
+
console = Console()
|
10
|
+
|
11
|
+
|
12
|
+
def version_command() -> None:
|
13
|
+
"""Display SDK version information only.
|
14
|
+
|
15
|
+
For all component versions, use 'agentsystems versions'.
|
16
|
+
"""
|
17
|
+
# Just show SDK version
|
18
|
+
try:
|
19
|
+
sdk_version = importlib.metadata.version("agentsystems-sdk")
|
20
|
+
except importlib.metadata.PackageNotFoundError:
|
21
|
+
sdk_version = "unknown (development mode)"
|
22
|
+
console.print(f"AgentSystems SDK: {sdk_version}")
|
23
|
+
|
24
|
+
|
25
|
+
def versions_command() -> None:
|
26
|
+
"""Display version information for all AgentSystems components.
|
27
|
+
|
28
|
+
Queries the running deployment to show current versions and update status.
|
29
|
+
Only works when a deployment is running.
|
30
|
+
"""
|
31
|
+
table = Table(title="AgentSystems Component Versions")
|
32
|
+
table.add_column("Component", style="cyan")
|
33
|
+
table.add_column("Version", style="green")
|
34
|
+
table.add_column("Status", style="yellow")
|
35
|
+
|
36
|
+
# SDK version
|
37
|
+
try:
|
38
|
+
sdk_version = importlib.metadata.version("agentsystems-sdk")
|
39
|
+
table.add_row("AgentSystems SDK", sdk_version, "✓ Installed")
|
40
|
+
except importlib.metadata.PackageNotFoundError:
|
41
|
+
table.add_row("AgentSystems SDK", "unknown", "⚠ Development mode")
|
42
|
+
|
43
|
+
# Try to query running deployment for gateway and UI versions
|
44
|
+
try:
|
45
|
+
import requests
|
46
|
+
|
47
|
+
resp = requests.get("http://localhost:18080/component-versions", timeout=5)
|
48
|
+
if resp.status_code == 200:
|
49
|
+
data = resp.json()
|
50
|
+
components = data.get("components", {})
|
51
|
+
|
52
|
+
# Agent Control Plane
|
53
|
+
acp = components.get("agent-control-plane", {})
|
54
|
+
acp_version = acp.get("current_version", "unknown")
|
55
|
+
acp_update = acp.get("update_available", False)
|
56
|
+
acp_status = "✓ Running" + (
|
57
|
+
" (update available)" if acp_update else " (latest)"
|
58
|
+
)
|
59
|
+
table.add_row("Agent Control Plane", acp_version, acp_status)
|
60
|
+
|
61
|
+
# AgentSystems UI
|
62
|
+
ui = components.get("agentsystems-ui", {})
|
63
|
+
ui_version = ui.get("current_version", "unknown")
|
64
|
+
ui_update = ui.get("update_available", False)
|
65
|
+
ui_status = "✓ Running" + (
|
66
|
+
" (update available)" if ui_update else " (latest)"
|
67
|
+
)
|
68
|
+
table.add_row("AgentSystems UI", ui_version, ui_status)
|
69
|
+
|
70
|
+
else:
|
71
|
+
table.add_row(
|
72
|
+
"Agent Control Plane", "unknown", "⚠ Deployment not accessible"
|
73
|
+
)
|
74
|
+
table.add_row("AgentSystems UI", "unknown", "⚠ Deployment not accessible")
|
75
|
+
|
76
|
+
except Exception:
|
77
|
+
# Deployment not running or not accessible
|
78
|
+
table.add_row("Agent Control Plane", "N/A", "⚠ Deployment not running")
|
79
|
+
table.add_row("AgentSystems UI", "N/A", "⚠ Deployment not running")
|
80
|
+
|
81
|
+
console.print(table)
|
82
|
+
# Note: Simple check since Rich table internals are complex
|
83
|
+
if "⚠" in str(table):
|
84
|
+
console.print(
|
85
|
+
"\n[dim]Note: Start deployment with 'agentsystems up' to check running versions[/dim]"
|
86
|
+
)
|
@@ -25,6 +25,7 @@ agentsystems_sdk/commands/run.py
|
|
25
25
|
agentsystems_sdk/commands/status.py
|
26
26
|
agentsystems_sdk/commands/up.py
|
27
27
|
agentsystems_sdk/commands/update.py
|
28
|
+
agentsystems_sdk/commands/version.py
|
28
29
|
agentsystems_sdk/deployments_scaffold/.env.example
|
29
30
|
agentsystems_sdk/deployments_scaffold/CONTRIBUTING.md
|
30
31
|
agentsystems_sdk/deployments_scaffold/LICENSE
|
@@ -88,6 +88,8 @@ agents:
|
|
88
88
|
agents_mode=AgentStartMode.all,
|
89
89
|
no_langfuse=False,
|
90
90
|
env_file=None,
|
91
|
+
agent_control_plane_version=None,
|
92
|
+
agentsystems_ui_version=None,
|
91
93
|
)
|
92
94
|
|
93
95
|
# Verify
|
@@ -161,6 +163,8 @@ agents:
|
|
161
163
|
agents_mode=AgentStartMode.none,
|
162
164
|
no_langfuse=False,
|
163
165
|
env_file=None,
|
166
|
+
agent_control_plane_version=None,
|
167
|
+
agentsystems_ui_version=None,
|
164
168
|
)
|
165
169
|
|
166
170
|
# Should call setup_agents with none mode
|
@@ -196,6 +200,8 @@ agents:
|
|
196
200
|
no_langfuse=False,
|
197
201
|
agents_mode=AgentStartMode.create,
|
198
202
|
env_file=None,
|
203
|
+
agent_control_plane_version=None,
|
204
|
+
agentsystems_ui_version=None,
|
199
205
|
)
|
200
206
|
|
201
207
|
@patch("agentsystems_sdk.commands.up.subprocess.run")
|
@@ -265,6 +271,8 @@ agents:
|
|
265
271
|
agents_mode=AgentStartMode.none, # Should skip agent setup
|
266
272
|
no_langfuse=False,
|
267
273
|
env_file=None,
|
274
|
+
agent_control_plane_version=None,
|
275
|
+
agentsystems_ui_version=None,
|
268
276
|
)
|
269
277
|
|
270
278
|
# Should call setup_agents with none mode which will skip actual agent setup
|
@@ -339,6 +347,8 @@ agents:
|
|
339
347
|
agents_mode=AgentStartMode.all,
|
340
348
|
no_langfuse=True, # Should pass langfuse=False to compose_args
|
341
349
|
env_file=None,
|
350
|
+
agent_control_plane_version=None,
|
351
|
+
agentsystems_ui_version=None,
|
342
352
|
)
|
343
353
|
|
344
354
|
# Verify compose_args was called with langfuse=False
|
@@ -392,6 +402,8 @@ agents:
|
|
392
402
|
no_langfuse=False,
|
393
403
|
agents_mode=AgentStartMode.create,
|
394
404
|
env_file=None,
|
405
|
+
agent_control_plane_version=None,
|
406
|
+
agentsystems_ui_version=None,
|
395
407
|
)
|
396
408
|
|
397
409
|
@patch("agentsystems_sdk.commands.up.subprocess.run")
|
@@ -460,9 +472,13 @@ agents:
|
|
460
472
|
up_command(
|
461
473
|
project_dir=tmp_path,
|
462
474
|
detach=True,
|
475
|
+
fresh=False,
|
463
476
|
wait_ready=True,
|
464
477
|
agents_mode=AgentStartMode.all,
|
478
|
+
no_langfuse=False,
|
465
479
|
env_file=custom_env, # Use custom env file
|
480
|
+
agent_control_plane_version=None,
|
481
|
+
agentsystems_ui_version=None,
|
466
482
|
)
|
467
483
|
|
468
484
|
# Should succeed even without default .env
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{agentsystems_sdk-0.3.5 → agentsystems_sdk-0.4.0}/agentsystems_sdk/deployments_scaffold/.env.example
RENAMED
File without changes
|
File without changes
|
{agentsystems_sdk-0.3.5 → agentsystems_sdk-0.4.0}/agentsystems_sdk/deployments_scaffold/LICENSE
RENAMED
File without changes
|
{agentsystems_sdk-0.3.5 → agentsystems_sdk-0.4.0}/agentsystems_sdk/deployments_scaffold/Makefile
RENAMED
File without changes
|
{agentsystems_sdk-0.3.5 → agentsystems_sdk-0.4.0}/agentsystems_sdk/deployments_scaffold/NOTICE
RENAMED
File without changes
|
{agentsystems_sdk-0.3.5 → agentsystems_sdk-0.4.0}/agentsystems_sdk/deployments_scaffold/README.md
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{agentsystems_sdk-0.3.5 → agentsystems_sdk-0.4.0}/agentsystems_sdk.egg-info/dependency_links.txt
RENAMED
File without changes
|
{agentsystems_sdk-0.3.5 → agentsystems_sdk-0.4.0}/agentsystems_sdk.egg-info/entry_points.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|