supervaizer 0.10.17__tar.gz → 0.10.18__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 (79) hide show
  1. {supervaizer-0.10.17 → supervaizer-0.10.18}/PKG-INFO +1 -1
  2. {supervaizer-0.10.17 → supervaizer-0.10.18}/pyproject.toml +1 -1
  3. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/__version__.py +1 -1
  4. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/admin/routes.py +32 -28
  5. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/admin/templates/index.html +7 -2
  6. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/deploy/templates/index.html +2 -2
  7. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/examples/controller_template.py +22 -20
  8. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/server.py +50 -21
  9. {supervaizer-0.10.17 → supervaizer-0.10.18}/.gitignore +0 -0
  10. {supervaizer-0.10.17 → supervaizer-0.10.18}/LICENSE.md +0 -0
  11. {supervaizer-0.10.17 → supervaizer-0.10.18}/README.md +0 -0
  12. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/__init__.py +0 -0
  13. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/account.py +0 -0
  14. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/account_service.py +0 -0
  15. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/admin/static/favicon.ico +0 -0
  16. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/admin/static/js/job-start-form.js +0 -0
  17. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/admin/templates/agent_detail.html +0 -0
  18. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/admin/templates/agents.html +0 -0
  19. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/admin/templates/agents_grid.html +0 -0
  20. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/admin/templates/base.html +0 -0
  21. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/admin/templates/case_detail.html +0 -0
  22. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/admin/templates/cases_list.html +0 -0
  23. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/admin/templates/cases_table.html +0 -0
  24. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/admin/templates/console.html +0 -0
  25. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/admin/templates/dashboard.html +0 -0
  26. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/admin/templates/job_detail.html +0 -0
  27. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/admin/templates/job_start_test.html +0 -0
  28. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/admin/templates/jobs_list.html +0 -0
  29. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/admin/templates/jobs_table.html +0 -0
  30. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/admin/templates/navigation.html +0 -0
  31. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/admin/templates/recent_activity.html +0 -0
  32. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/admin/templates/server.html +0 -0
  33. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/admin/templates/server_status_cards.html +0 -0
  34. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/admin/templates/supervaize_instructions.html +0 -0
  35. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/agent.py +0 -0
  36. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/case.py +0 -0
  37. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/cli.py +0 -0
  38. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/common.py +0 -0
  39. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/deploy/__init__.py +0 -0
  40. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/deploy/cli.py +0 -0
  41. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/deploy/commands/__init__.py +0 -0
  42. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/deploy/commands/clean.py +0 -0
  43. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/deploy/commands/down.py +0 -0
  44. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/deploy/commands/local.py +0 -0
  45. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/deploy/commands/plan.py +0 -0
  46. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/deploy/commands/status.py +0 -0
  47. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/deploy/commands/up.py +0 -0
  48. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/deploy/docker.py +0 -0
  49. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/deploy/driver_factory.py +0 -0
  50. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/deploy/drivers/__init__.py +0 -0
  51. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/deploy/drivers/aws_app_runner.py +0 -0
  52. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/deploy/drivers/base.py +0 -0
  53. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/deploy/drivers/cloud_run.py +0 -0
  54. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/deploy/drivers/do_app_platform.py +0 -0
  55. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/deploy/health.py +0 -0
  56. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/deploy/state.py +0 -0
  57. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/deploy/templates/Dockerfile.template +0 -0
  58. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/deploy/templates/debug_env.py +0 -0
  59. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/deploy/templates/docker-compose.yml.template +0 -0
  60. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/deploy/templates/dockerignore.template +0 -0
  61. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/deploy/templates/entrypoint.sh +0 -0
  62. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/deploy/utils.py +0 -0
  63. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/event.py +0 -0
  64. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/instructions.py +0 -0
  65. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/job.py +0 -0
  66. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/job_service.py +0 -0
  67. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/lifecycle.py +0 -0
  68. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/parameter.py +0 -0
  69. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/protocol/__init__.py +0 -0
  70. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/protocol/a2a/__init__.py +0 -0
  71. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/protocol/a2a/model.py +0 -0
  72. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/protocol/a2a/routes.py +0 -0
  73. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/py.typed +0 -0
  74. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/routes.py +0 -0
  75. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/server_utils.py +0 -0
  76. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/storage.py +0 -0
  77. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/telemetry.py +0 -0
  78. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/utils/__init__.py +0 -0
  79. {supervaizer-0.10.17 → supervaizer-0.10.18}/src/supervaizer/utils/version_check.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: supervaizer
3
- Version: 0.10.17
3
+ Version: 0.10.18
4
4
  Summary: Controller system for Supervaize
5
5
  Project-URL: Homepage, https://supervaize.com
6
6
  Project-URL: Repository, https://github.com/supervaize/supervaizer
@@ -121,7 +121,7 @@ mypy_path = "src"
121
121
  disallow_any_expr = false
122
122
 
123
123
  [tool.bumpversion]
124
- current_version = "0.10.17"
124
+ current_version = "0.10.18"
125
125
  commit = true
126
126
  tag = true
127
127
  tag_name = "v{new_version}"
@@ -5,6 +5,6 @@
5
5
  # https://mozilla.org/MPL/2.0/.
6
6
 
7
7
 
8
- VERSION = "0.10.17"
8
+ VERSION = "0.10.18"
9
9
  API_VERSION = "v1"
10
10
  TELEMETRY_VERSION = "v1"
@@ -931,24 +931,28 @@ def create_admin_routes() -> APIRouter:
931
931
  # Combine and sort by created_at
932
932
  activities = []
933
933
  for job in recent_jobs:
934
- activities.append({
935
- "type": "job",
936
- "id": job.get("id"),
937
- "name": job.get("name"),
938
- "status": job.get("status"),
939
- "created_at": job.get("created_at"),
940
- "agent_name": job.get("agent_name"),
941
- })
934
+ activities.append(
935
+ {
936
+ "type": "job",
937
+ "id": job.get("id"),
938
+ "name": job.get("name"),
939
+ "status": job.get("status"),
940
+ "created_at": job.get("created_at"),
941
+ "agent_name": job.get("agent_name"),
942
+ }
943
+ )
942
944
 
943
945
  for case in recent_cases:
944
- activities.append({
945
- "type": "case",
946
- "id": case.get("id"),
947
- "name": case.get("name"),
948
- "status": case.get("status"),
949
- "created_at": case.get("created_at"),
950
- "job_id": case.get("job_id"),
951
- })
946
+ activities.append(
947
+ {
948
+ "type": "case",
949
+ "id": case.get("id"),
950
+ "name": case.get("name"),
951
+ "status": case.get("status"),
952
+ "created_at": case.get("created_at"),
953
+ "job_id": case.get("job_id"),
954
+ }
955
+ )
952
956
 
953
957
  # Sort by created_at descending
954
958
  activities.sort(key=lambda x: str(x.get("created_at", "")), reverse=True)
@@ -1205,23 +1209,23 @@ def get_dashboard_stats(storage: StorageManager) -> AdminStats:
1205
1209
 
1206
1210
  # Calculate job stats
1207
1211
  job_total = len(all_jobs)
1208
- job_running = len([
1209
- j for j in all_jobs if j.get("status") in ["in_progress", "awaiting"]
1210
- ])
1212
+ job_running = len(
1213
+ [j for j in all_jobs if j.get("status") in ["in_progress", "awaiting"]]
1214
+ )
1211
1215
  job_completed = len([j for j in all_jobs if j.get("status") == "completed"])
1212
- job_failed = len([
1213
- j for j in all_jobs if j.get("status") in ["failed", "cancelled"]
1214
- ])
1216
+ job_failed = len(
1217
+ [j for j in all_jobs if j.get("status") in ["failed", "cancelled"]]
1218
+ )
1215
1219
 
1216
1220
  # Calculate case stats
1217
1221
  case_total = len(all_cases)
1218
- case_running = len([
1219
- c for c in all_cases if c.get("status") in ["in_progress", "awaiting"]
1220
- ])
1222
+ case_running = len(
1223
+ [c for c in all_cases if c.get("status") in ["in_progress", "awaiting"]]
1224
+ )
1221
1225
  case_completed = len([c for c in all_cases if c.get("status") == "completed"])
1222
- case_failed = len([
1223
- c for c in all_cases if c.get("status") in ["failed", "cancelled"]
1224
- ])
1226
+ case_failed = len(
1227
+ [c for c in all_cases if c.get("status") in ["failed", "cancelled"]]
1228
+ )
1225
1229
 
1226
1230
  # TinyDB collections count (tables)
1227
1231
  collections_count = len(storage._db.tables())
@@ -18,6 +18,11 @@
18
18
  </p>
19
19
  <p class="mt-1 text-xs text-gray-400 font-mono">Server ID: {{ server_id }}</p>
20
20
 
21
+ <div class="mt-6 p-4 rounded-lg bg-amber-50 border border-amber-200 text-amber-800">
22
+ <p class="font-semibold">⚠️ Do not use in production with network access enabled.</p>
23
+ <p class="mt-1 text-sm">This interface is for development and local use only. Exposing it over the network in production may allow unauthorized access.</p>
24
+ </div>
25
+
21
26
  <div class="mt-8">
22
27
  <h2 class="text-lg font-medium text-gray-900 mb-4">Links</h2>
23
28
  <ul class="space-y-2">
@@ -36,14 +41,14 @@
36
41
  OpenAPI
37
42
  </a>
38
43
  </li>
39
- <li><strong>BASE:</strong> {{ base }}
44
+ <li><strong>BASE:</strong> {{ base }}
40
45
  <br>
41
46
  <strong>PUBLIC_URL:</strong> {{ public_url }}
42
47
  <br>
43
48
  <strong>FULL_URL:</strong> {{ full_url }}
44
49
  <br>
45
50
  </li>
46
-
51
+
47
52
  {% if show_admin %}
48
53
  <li>
49
54
  <a href="{{ base }}/admin" class="text-blue-600 hover:text-blue-800 font-medium">
@@ -46,8 +46,8 @@
46
46
  <a href="/console" class="text-blue-600 hover:text-blue-800 font-medium">
47
47
  Console
48
48
  </a>
49
- </li>
50
- <li> BASE: {{ base }}
49
+ </li>
50
+ <li> BASE: {{ base }}
51
51
  </li>
52
52
  </ul>
53
53
  </div>
@@ -34,26 +34,28 @@ DEV_PUBLIC_URL = "https://myagent-dev.loca.lt"
34
34
  PROD_PUBLIC_URL = "https://myagent.cloud-hosting.net:8001"
35
35
 
36
36
  # Define the parameters and secrets expected by the agent
37
- agent_parameters: ParametersSetup | None = ParametersSetup.from_list([
38
- Parameter(
39
- name="OPEN_API_KEY",
40
- description="OpenAPI Key",
41
- is_environment=True,
42
- is_secret=True,
43
- ),
44
- Parameter(
45
- name="SERPER_API",
46
- description="Server API key updated",
47
- is_environment=True,
48
- is_secret=True,
49
- ),
50
- Parameter(
51
- name="COMPETITOR_SUMMARY_URL",
52
- description="Competitor Summary URL",
53
- is_environment=True,
54
- is_secret=False,
55
- ),
56
- ])
37
+ agent_parameters: ParametersSetup | None = ParametersSetup.from_list(
38
+ [
39
+ Parameter(
40
+ name="OPEN_API_KEY",
41
+ description="OpenAPI Key",
42
+ is_environment=True,
43
+ is_secret=True,
44
+ ),
45
+ Parameter(
46
+ name="SERPER_API",
47
+ description="Server API key updated",
48
+ is_environment=True,
49
+ is_secret=True,
50
+ ),
51
+ Parameter(
52
+ name="COMPETITOR_SUMMARY_URL",
53
+ description="Competitor Summary URL",
54
+ is_environment=True,
55
+ is_secret=False,
56
+ ),
57
+ ]
58
+ )
57
59
 
58
60
  # Define the method used to start a job
59
61
  job_start_method: AgentMethod = AgentMethod(
@@ -65,6 +65,35 @@ def _get_or_create_server_id() -> str:
65
65
  return new_id
66
66
 
67
67
 
68
+ def _get_or_create_private_key() -> RSAPrivateKey:
69
+ """Use SUPERVAIZER_PRIVATE_KEY from env if set; else create key and set env."""
70
+ pem = os.getenv("SUPERVAIZER_PRIVATE_KEY")
71
+ if pem:
72
+ try:
73
+ return serialization.load_pem_private_key(
74
+ pem.encode("utf-8"),
75
+ password=None,
76
+ backend=default_backend(),
77
+ )
78
+ except Exception as e:
79
+ log.warning(
80
+ f"[Server] Invalid SUPERVAIZER_PRIVATE_KEY, generating new key: {e}"
81
+ )
82
+ private_key = rsa.generate_private_key(
83
+ public_exponent=65537,
84
+ key_size=2048,
85
+ backend=default_backend(),
86
+ )
87
+ pem_bytes = private_key.private_bytes(
88
+ encoding=serialization.Encoding.PEM,
89
+ format=serialization.PrivateFormat.PKCS8,
90
+ encryption_algorithm=serialization.NoEncryption(),
91
+ )
92
+ os.environ["SUPERVAIZER_PRIVATE_KEY"] = pem_bytes.decode("utf-8")
93
+ log.info("[Server] Generated new RSA private key and set SUPERVAIZER_PRIVATE_KEY")
94
+ return private_key
95
+
96
+
68
97
  class ServerInfo(BaseModel):
69
98
  """Complete server information for storage."""
70
99
 
@@ -88,14 +117,16 @@ def save_server_info_to_storage(server_instance: "Server") -> None:
88
117
  agents = []
89
118
  if hasattr(server_instance, "agents") and server_instance.agents:
90
119
  for agent in server_instance.agents:
91
- agents.append({
92
- "name": agent.name,
93
- "description": agent.description,
94
- "version": agent.version,
95
- "api_path": agent.path,
96
- "slug": agent.slug,
97
- "instructions_path": agent.instructions_path,
98
- })
120
+ agents.append(
121
+ {
122
+ "name": agent.name,
123
+ "description": agent.description,
124
+ "version": agent.version,
125
+ "api_path": agent.path,
126
+ "slug": agent.slug,
127
+ "instructions_path": agent.instructions_path,
128
+ }
129
+ )
99
130
 
100
131
  # Create server info
101
132
  server_info = ServerInfo(
@@ -136,14 +167,16 @@ def get_server_info_from_live(server_instance: "Server") -> ServerInfo:
136
167
  agents = []
137
168
  if hasattr(server_instance, "agents") and server_instance.agents:
138
169
  for agent in server_instance.agents:
139
- agents.append({
140
- "name": agent.name,
141
- "description": agent.description,
142
- "version": agent.version,
143
- "api_path": agent.path,
144
- "slug": agent.slug,
145
- "instructions_path": agent.instructions_path,
146
- })
170
+ agents.append(
171
+ {
172
+ "name": agent.name,
173
+ "description": agent.description,
174
+ "version": agent.version,
175
+ "api_path": agent.path,
176
+ "slug": agent.slug,
177
+ "instructions_path": agent.instructions_path,
178
+ }
179
+ )
147
180
  start_time = getattr(server_instance, "_start_time", time.time())
148
181
  return ServerInfo(
149
182
  host=getattr(server_instance, "host", "N/A"),
@@ -317,11 +350,7 @@ class Server(ServerAbstract):
317
350
  )
318
351
 
319
352
  if private_key is None:
320
- private_key = rsa.generate_private_key(
321
- public_exponent=65537,
322
- key_size=2048,
323
- backend=default_backend(),
324
- )
353
+ private_key = _get_or_create_private_key()
325
354
 
326
355
  public_key = private_key.public_key()
327
356
 
File without changes
File without changes
File without changes