supervaizer 0.10.4__tar.gz → 0.10.5__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.
- {supervaizer-0.10.4 → supervaizer-0.10.5}/PKG-INFO +1 -1
- {supervaizer-0.10.4 → supervaizer-0.10.5}/pyproject.toml +1 -1
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/__version__.py +1 -1
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/cli.py +10 -1
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/deploy/cli.py +9 -0
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/storage.py +39 -13
- {supervaizer-0.10.4 → supervaizer-0.10.5}/.gitignore +0 -0
- {supervaizer-0.10.4 → supervaizer-0.10.5}/LICENSE.md +0 -0
- {supervaizer-0.10.4 → supervaizer-0.10.5}/README.md +0 -0
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/__init__.py +0 -0
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/account.py +0 -0
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/account_service.py +0 -0
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/admin/routes.py +0 -0
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/admin/static/js/job-start-form.js +0 -0
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/admin/templates/agent_detail.html +0 -0
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/admin/templates/agents.html +0 -0
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/admin/templates/agents_grid.html +0 -0
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/admin/templates/base.html +0 -0
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/admin/templates/case_detail.html +0 -0
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/admin/templates/cases_list.html +0 -0
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/admin/templates/cases_table.html +0 -0
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/admin/templates/console.html +0 -0
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/admin/templates/dashboard.html +0 -0
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/admin/templates/job_detail.html +0 -0
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/admin/templates/job_start_test.html +0 -0
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/admin/templates/jobs_list.html +0 -0
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/admin/templates/jobs_table.html +0 -0
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/admin/templates/navigation.html +0 -0
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/admin/templates/recent_activity.html +0 -0
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/admin/templates/server.html +0 -0
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/admin/templates/server_status_cards.html +0 -0
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/admin/templates/supervaize_instructions.html +0 -0
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/agent.py +0 -0
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/case.py +0 -0
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/common.py +0 -0
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/deploy/__init__.py +0 -0
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/deploy/commands/__init__.py +0 -0
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/deploy/commands/clean.py +0 -0
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/deploy/commands/down.py +0 -0
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/deploy/commands/local.py +0 -0
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/deploy/commands/plan.py +0 -0
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/deploy/commands/status.py +0 -0
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/deploy/commands/up.py +0 -0
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/deploy/docker.py +0 -0
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/deploy/driver_factory.py +0 -0
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/deploy/drivers/__init__.py +0 -0
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/deploy/drivers/aws_app_runner.py +0 -0
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/deploy/drivers/base.py +0 -0
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/deploy/drivers/cloud_run.py +0 -0
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/deploy/drivers/do_app_platform.py +0 -0
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/deploy/health.py +0 -0
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/deploy/state.py +0 -0
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/deploy/templates/Dockerfile.template +0 -0
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/deploy/templates/debug_env.py +0 -0
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/deploy/templates/docker-compose.yml.template +0 -0
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/deploy/templates/dockerignore.template +0 -0
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/deploy/templates/entrypoint.sh +0 -0
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/deploy/utils.py +0 -0
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/event.py +0 -0
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/examples/controller_template.py +0 -0
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/instructions.py +0 -0
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/job.py +0 -0
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/job_service.py +0 -0
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/lifecycle.py +0 -0
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/parameter.py +0 -0
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/protocol/__init__.py +0 -0
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/protocol/a2a/__init__.py +0 -0
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/protocol/a2a/model.py +0 -0
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/protocol/a2a/routes.py +0 -0
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/py.typed +0 -0
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/routes.py +0 -0
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/server.py +0 -0
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/server_utils.py +0 -0
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/telemetry.py +0 -0
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/utils/__init__.py +0 -0
- {supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/utils/version_check.py +0 -0
|
@@ -95,7 +95,9 @@ def main_callback(
|
|
|
95
95
|
|
|
96
96
|
# Add deploy subcommand
|
|
97
97
|
app.add_typer(
|
|
98
|
-
deploy_app,
|
|
98
|
+
deploy_app,
|
|
99
|
+
name="deploy",
|
|
100
|
+
help="Deploy Supervaizer agents to cloud platforms (requires deploy extras: pip install supervaizer[deploy])",
|
|
99
101
|
)
|
|
100
102
|
|
|
101
103
|
# Create scaffold subcommand group
|
|
@@ -131,6 +133,12 @@ def start(
|
|
|
131
133
|
environment: str = typer.Option(
|
|
132
134
|
os.environ.get("SUPERVAIZER_ENVIRONMENT", "dev"), help="Environment name"
|
|
133
135
|
),
|
|
136
|
+
persist: bool = typer.Option(
|
|
137
|
+
(os.environ.get("SUPERVAIZER_PERSISTENCE") or "false").lower()
|
|
138
|
+
in ("true", "1", "yes"),
|
|
139
|
+
"--persist/--no-persist",
|
|
140
|
+
help="Persist data to file (default: off; set for self-hosted, off for Vercel/serverless)",
|
|
141
|
+
),
|
|
134
142
|
script_path: Optional[str] = typer.Argument(
|
|
135
143
|
None,
|
|
136
144
|
help="Path to the supervaizer_control.py script",
|
|
@@ -152,6 +160,7 @@ def start(
|
|
|
152
160
|
os.environ["SUPERVAIZER_HOST"] = host
|
|
153
161
|
os.environ["SUPERVAIZER_PORT"] = str(port)
|
|
154
162
|
os.environ["SUPERVAIZER_ENVIRONMENT"] = environment
|
|
163
|
+
os.environ["SUPERVAIZER_PERSISTENCE"] = str(persist).lower()
|
|
155
164
|
os.environ["SUPERVAIZER_LOG_LEVEL"] = log_level
|
|
156
165
|
os.environ["SUPERVAIZER_DEBUG"] = str(debug)
|
|
157
166
|
os.environ["SUPERVAIZER_RELOAD"] = str(reload)
|
|
@@ -167,6 +167,15 @@ def plan(
|
|
|
167
167
|
verbose: bool = verbose_option,
|
|
168
168
|
) -> None:
|
|
169
169
|
"""Plan deployment changes without applying them."""
|
|
170
|
+
# Check if deploy extras are installed (e.g., docker, cloud SDKs)
|
|
171
|
+
try:
|
|
172
|
+
import docker
|
|
173
|
+
except ImportError:
|
|
174
|
+
console.print(
|
|
175
|
+
"[bold red]Error:[/] 'deploy' extra requirements are not installed. "
|
|
176
|
+
"Install them with: [bold]pip install supervaizer[deploy][/]"
|
|
177
|
+
)
|
|
178
|
+
raise typer.Exit(1)
|
|
170
179
|
_check_platform_required(platform, "plan")
|
|
171
180
|
source_dir = _check_pyproject_toml()
|
|
172
181
|
plan_deployment(platform, name, env, region, project_id, verbose, source_dir)
|
|
@@ -16,19 +16,37 @@ from pathlib import Path
|
|
|
16
16
|
from typing import TYPE_CHECKING, Any, Dict, Generic, List, Optional, TypeVar
|
|
17
17
|
|
|
18
18
|
from tinydb import Query, TinyDB
|
|
19
|
+
from tinydb.storages import MemoryStorage
|
|
19
20
|
|
|
20
21
|
from supervaizer.common import log, singleton
|
|
21
22
|
from supervaizer.lifecycle import WorkflowEntity
|
|
22
23
|
|
|
24
|
+
|
|
25
|
+
class _MemoryStorage(MemoryStorage):
|
|
26
|
+
"""MemoryStorage that accepts TinyDB's sort_keys/indent kwargs (ignored)."""
|
|
27
|
+
|
|
28
|
+
def __init__(self, *args: Any, **kwargs: Any) -> None:
|
|
29
|
+
super().__init__(*args)
|
|
30
|
+
|
|
31
|
+
|
|
23
32
|
if TYPE_CHECKING:
|
|
24
33
|
from supervaizer.case import Case
|
|
25
34
|
from supervaizer.job import Job
|
|
26
35
|
from supervaizer.lifecycle import EntityEvents, EntityStatus
|
|
27
36
|
|
|
37
|
+
|
|
28
38
|
T = TypeVar("T", bound=WorkflowEntity)
|
|
29
39
|
|
|
30
40
|
DATA_STORAGE_PATH = os.getenv("DATA_STORAGE_PATH", "./data")
|
|
31
41
|
|
|
42
|
+
# When False (default), use in-memory storage only (e.g. Vercel, serverless).
|
|
43
|
+
# Set SUPERVAIZER_PERSISTENCE=true to persist to file.
|
|
44
|
+
PERSISTENCE_ENABLED = os.getenv("SUPERVAIZER_PERSISTENCE", "false").lower() in (
|
|
45
|
+
"true",
|
|
46
|
+
"1",
|
|
47
|
+
"yes",
|
|
48
|
+
)
|
|
49
|
+
|
|
32
50
|
|
|
33
51
|
@singleton
|
|
34
52
|
class StorageManager:
|
|
@@ -37,28 +55,36 @@ class StorageManager:
|
|
|
37
55
|
|
|
38
56
|
Stores entities in separate tables by type, with foreign key relationships
|
|
39
57
|
represented as ID references (Job.case_ids, Case.job_id).
|
|
58
|
+
|
|
59
|
+
When SUPERVAIZER_PERSISTENCE is false (default), uses in-memory storage only.
|
|
40
60
|
"""
|
|
41
61
|
|
|
42
|
-
def __init__(self, db_path: str =
|
|
62
|
+
def __init__(self, db_path: Optional[str] = None):
|
|
43
63
|
"""
|
|
44
64
|
Initialize the storage manager.
|
|
45
65
|
|
|
46
66
|
Args:
|
|
47
|
-
db_path: Path to the TinyDB JSON file
|
|
67
|
+
db_path: Path to the TinyDB JSON file, or None to use env-based
|
|
68
|
+
persistence (file if SUPERVAIZER_PERSISTENCE=true, else memory).
|
|
48
69
|
"""
|
|
49
|
-
self.db_path: Path = Path(db_path)
|
|
50
70
|
self._lock = threading.Lock()
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
# Initialize TinyDB without caching middleware for immediate persistence
|
|
56
|
-
# Note: Thread safety is handled by our own threading lock
|
|
57
|
-
self._db = TinyDB(
|
|
58
|
-
db_path,
|
|
59
|
-
sort_keys=True,
|
|
60
|
-
indent=2,
|
|
71
|
+
# Explicit file path (e.g. tests) uses file; else file only if persistence enabled
|
|
72
|
+
use_file = (db_path is not None and db_path != ":memory:") or (
|
|
73
|
+
db_path is None and PERSISTENCE_ENABLED
|
|
61
74
|
)
|
|
75
|
+
if use_file:
|
|
76
|
+
path = (
|
|
77
|
+
db_path
|
|
78
|
+
if (db_path and db_path != ":memory:")
|
|
79
|
+
else f"{DATA_STORAGE_PATH}/entities.json"
|
|
80
|
+
)
|
|
81
|
+
self.db_path = Path(path)
|
|
82
|
+
Path(path).parent.mkdir(parents=True, exist_ok=True)
|
|
83
|
+
self._db = TinyDB(path, sort_keys=True, indent=2)
|
|
84
|
+
else:
|
|
85
|
+
# In-memory only (default for Vercel/serverless)
|
|
86
|
+
self.db_path = Path(":memory:")
|
|
87
|
+
self._db = TinyDB(storage=_MemoryStorage, sort_keys=True, indent=2)
|
|
62
88
|
|
|
63
89
|
# log.debug(
|
|
64
90
|
# f"[StorageManager] 🗃️ Local DB initialized at {self.db_path.absolute()}"
|
|
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
|
{supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/admin/templates/job_start_test.html
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/admin/templates/recent_activity.html
RENAMED
|
File without changes
|
|
File without changes
|
{supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/admin/templates/server_status_cards.html
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/deploy/templates/Dockerfile.template
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{supervaizer-0.10.4 → supervaizer-0.10.5}/src/supervaizer/deploy/templates/dockerignore.template
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
|
|
File without changes
|
|
File without changes
|