supervaizer 0.10.5__py3-none-any.whl → 0.10.6__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.
@@ -5,6 +5,6 @@
5
5
  # https://mozilla.org/MPL/2.0/.
6
6
 
7
7
 
8
- VERSION = "0.10.5"
8
+ VERSION = "0.10.6"
9
9
  API_VERSION = "v1"
10
10
  TELEMETRY_VERSION = "v1"
supervaizer/deploy/cli.py CHANGED
@@ -10,6 +10,7 @@ Deployment CLI Commands
10
10
  This module contains the main CLI commands for the deploy subcommand.
11
11
  """
12
12
 
13
+ import importlib.util
13
14
  import typer
14
15
  from pathlib import Path
15
16
  from rich.console import Console
@@ -168,9 +169,7 @@ def plan(
168
169
  ) -> None:
169
170
  """Plan deployment changes without applying them."""
170
171
  # Check if deploy extras are installed (e.g., docker, cloud SDKs)
171
- try:
172
- import docker
173
- except ImportError:
172
+ if importlib.util.find_spec("docker") is None:
174
173
  console.print(
175
174
  "[bold red]Error:[/] 'deploy' extra requirements are not installed. "
176
175
  "Install them with: [bold]pip install supervaizer[deploy][/]"
@@ -0,0 +1,50 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Supervaizer API</title>
7
+ <!-- Tailwind CSS -->
8
+ <script src="https://cdn.tailwindcss.com"></script>
9
+ </head>
10
+ <body class="bg-gray-50 min-h-screen">
11
+ <main class="max-w-7xl mx-auto py-6 sm:px-6 lg:px-8">
12
+ <div class="px-4 py-6 sm:px-0">
13
+ <h1 class="text-2xl font-bold leading-7 text-gray-900 sm:truncate sm:text-3xl sm:tracking-tight">
14
+ Supervaizer API
15
+ </h1>
16
+ <p class="mt-2 text-sm text-gray-500">
17
+ Controller version {{ version }} · API version {{ api_version }}
18
+ </p>
19
+
20
+ <div class="mt-8">
21
+ <h2 class="text-lg font-medium text-gray-900 mb-4">Links</h2>
22
+ <ul class="space-y-2">
23
+ <li>
24
+ <a href="{{ base }}/docs" class="text-blue-600 hover:text-blue-800 font-medium">
25
+ Swagger UI
26
+ </a>
27
+ </li>
28
+ <li>
29
+ <a href="{{ base }}/redoc" class="text-blue-600 hover:text-blue-800 font-medium">
30
+ ReDoc
31
+ </a>
32
+ </li>
33
+ <li>
34
+ <a href="{{ base }}/openapi.json" class="text-blue-600 hover:text-blue-800 font-medium">
35
+ OpenAPI
36
+ </a>
37
+ </li>
38
+ {% if show_admin %}
39
+ <li>
40
+ <a href="{{ base }}/admin" class="text-blue-600 hover:text-blue-800 font-medium">
41
+ Admin
42
+ </a>
43
+ </li>
44
+ {% endif %}
45
+ </ul>
46
+ </div>
47
+ </div>
48
+ </main>
49
+ </body>
50
+ </html>
supervaizer/server.py CHANGED
@@ -10,6 +10,7 @@ import sys
10
10
  import time
11
11
  import uuid
12
12
  from datetime import datetime
13
+ from pathlib import Path
13
14
  from typing import Any, ClassVar, Dict, List, Optional, TypeVar
14
15
  from urllib.parse import urlunparse
15
16
 
@@ -19,8 +20,9 @@ from cryptography.hazmat.primitives.asymmetric import rsa
19
20
  from cryptography.hazmat.primitives.asymmetric.rsa import RSAPrivateKey, RSAPublicKey
20
21
  from fastapi import FastAPI, HTTPException, Request, Security, status
21
22
  from fastapi.exceptions import RequestValidationError
22
- from fastapi.responses import JSONResponse
23
+ from fastapi.responses import HTMLResponse, JSONResponse
23
24
  from fastapi.security import APIKeyHeader
25
+ from fastapi.templating import Jinja2Templates
24
26
  from pydantic import BaseModel, field_validator, Field
25
27
  from rich import inspect
26
28
 
@@ -377,6 +379,25 @@ class Server(ServerAbstract):
377
379
  # Save server info to storage for admin interface
378
380
  save_server_info_to_storage(self)
379
381
 
382
+ # Home page (template in deploy/templates)
383
+ _home_templates = Jinja2Templates(
384
+ directory=str(Path(__file__).parent / "deploy" / "templates")
385
+ )
386
+
387
+ @self.app.get("/", response_class=HTMLResponse)
388
+ async def home_page(request: Request) -> HTMLResponse:
389
+ base = self.public_url or f"{self.scheme}://{self.host}:{self.port}"
390
+ return _home_templates.TemplateResponse(
391
+ "index.html",
392
+ {
393
+ "request": request,
394
+ "base": base,
395
+ "version": VERSION,
396
+ "api_version": API_VERSION,
397
+ "show_admin": bool(self.api_key and admin_interface),
398
+ },
399
+ )
400
+
380
401
  # Load running entities from storage into memory
381
402
  try:
382
403
  load_running_entities_on_startup()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: supervaizer
3
- Version: 0.10.5
3
+ Version: 0.10.6
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
@@ -1,5 +1,5 @@
1
1
  supervaizer/__init__.py,sha256=eBbGjduMBH-FDjcGlSqeR4Kf4uo60Cf1DrRur8VGkJo,2341
2
- supervaizer/__version__.py,sha256=qlIH8dSecrW9K7OJHX-wf9QuxYRMhfsImO-0ebKqOpM,348
2
+ supervaizer/__version__.py,sha256=v8EJ2DGVFNsFsJ0Q0SzepTZR0GtKIndBvf_raRULqfs,348
3
3
  supervaizer/account.py,sha256=-K1pd590Lp2TncZ2jn442kBLxnm482G3WnQavVFxZ1s,11102
4
4
  supervaizer/account_service.py,sha256=z4lw8qp8XvCrU6Ndf4VHRnQwY_071410ts5_7E8YDAs,3046
5
5
  supervaizer/agent.py,sha256=Clenvdr_v-lV7_v6YCcevp8dj5JUNvpTWrBZBYM82lg,36509
@@ -13,7 +13,7 @@ supervaizer/job_service.py,sha256=22Qe7Z5_u3R28tcNH_21YMIYciWFtJaM7I-MXtIhBMU,46
13
13
  supervaizer/lifecycle.py,sha256=5CunJN7MsM5blyNiFMJMLFDUBmTmmAsPE24QC-gSbYA,13958
14
14
  supervaizer/parameter.py,sha256=sYDuGof_w6mlix0oxjB6odV0sO0QSBL1KwFZa3Y2cOA,8157
15
15
  supervaizer/routes.py,sha256=o3u7pGGLE0MQzWtQNdd5xk1M0G9Y_BR_JiLVmCFtdC4,34319
16
- supervaizer/server.py,sha256=cXwB2XfIBQJ6zFaUde4OTCPgHpb_tpsUy9cRkkXqA-Q,20805
16
+ supervaizer/server.py,sha256=l4fTVTBw7beKI5vl3TzjwmWrBmTotBOnTM8mEoqh1g0,21641
17
17
  supervaizer/server_utils.py,sha256=FMglpADQBJynkR2v-pfwANu6obsaPvR9j0BQc5Otpac,1590
18
18
  supervaizer/storage.py,sha256=WLX8ggwt1AGF07DrfD1K6PyP2-N45c_Ep4CL0iPLVbI,15332
19
19
  supervaizer/telemetry.py,sha256=XSYw8ZwoY8W6C7mhwHU67t7trJzWd7CBkkSNdsDT_HA,2596
@@ -38,7 +38,7 @@ supervaizer/admin/templates/server.html,sha256=m3qIQsEojogXQKTSD6ljKj4_lrwaLJTpT
38
38
  supervaizer/admin/templates/server_status_cards.html,sha256=yJ36hkfgQpscYkiaodFDQPnmJWeb2W7gey09Z3T6JsY,7882
39
39
  supervaizer/admin/templates/supervaize_instructions.html,sha256=LTLla1xgIeLpFf7bond_lxH5qdQQ2ak52Fd7hqChi1I,10225
40
40
  supervaizer/deploy/__init__.py,sha256=DvngGQu8tS_Yz5FU4kKCvPpod11IGCtZWkUNeB5aVHI,557
41
- supervaizer/deploy/cli.py,sha256=SeG2rIT5cKl-I5s4qvpLLl9OXxmzelqKRDKcfH1GsSM,10183
41
+ supervaizer/deploy/cli.py,sha256=6najlZXh_3kSY_sfJdilf-iW5BqaudI2bKKrhzXN09A,10201
42
42
  supervaizer/deploy/docker.py,sha256=FLMKHOnbnjMFTcULdRdgwKJwT-q8JtVwbN1iSemh21w,13810
43
43
  supervaizer/deploy/driver_factory.py,sha256=Qm6DYVUfV3mlRHUglk5YlslGg6JYZ754uKeoiyxXw10,1487
44
44
  supervaizer/deploy/health.py,sha256=vh4SMOxy43QXi1fanQjWfWqoGTy_z1VXwwfy4Fq2bHg,13764
@@ -61,6 +61,7 @@ supervaizer/deploy/templates/debug_env.py,sha256=WFlxfiCAlkxM1NybNvtmmG5zJnoSvjW
61
61
  supervaizer/deploy/templates/docker-compose.yml.template,sha256=ZcW8WyhmqMElaxBpokuZG12n0tFJL8BY7k7Tvdz6tdw,1100
62
62
  supervaizer/deploy/templates/dockerignore.template,sha256=bYFRn6QGsjtRDH-Y7vzWk3-u3jIp90FajV2Ed94ah5M,515
63
63
  supervaizer/deploy/templates/entrypoint.sh,sha256=z079VUotu6DJX92fJiBB3eVwCEgcP6B9D9Fvwv_FL9w,463
64
+ supervaizer/deploy/templates/index.html,sha256=JRYAp5IiMQ6khBL8lI8NtJ-jN4SdOpiLIZWTEbFcy_o,1912
64
65
  supervaizer/examples/controller_template.py,sha256=gAmA3GnDTdYkDk3NpVe-6Adbsl4Oxs-iZKN6mrO3WEg,6419
65
66
  supervaizer/protocol/__init__.py,sha256=00GHbUsLNsf0a1rQrUPpVN2Uy-7rDz72Ps6TUVD91tE,389
66
67
  supervaizer/protocol/a2a/__init__.py,sha256=1ACfPGLzS6XdZPiFxn1nVamvbasqtJJ7U1BBbSmT-nI,625
@@ -69,8 +70,8 @@ supervaizer/protocol/a2a/routes.py,sha256=rkQTNBD1NTYimKCb8iOk4bVf9ldDP1LqHfOsyh
69
70
  supervaizer/utils/__init__.py,sha256=fd0NFwN_cen3QPms2SOnuz4jcetay3f_31dit2As7EA,458
70
71
  supervaizer/utils/version_check.py,sha256=-tsOURpHVh0LNTbpQsyJDJENKszC-NzXDSO_EToEQPE,1893
71
72
  supervaizer/py.typed,sha256=bHhvLx7c6MqrzXVPbdK3qAOcSxzp4wDtTx4QifMC2EY,74
72
- supervaizer-0.10.5.dist-info/METADATA,sha256=PanDorKt110d-c25DnRY995GBEp0upFeCAELBXOL1BE,12647
73
- supervaizer-0.10.5.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
74
- supervaizer-0.10.5.dist-info/entry_points.txt,sha256=vL_IBR_AeEI2u2-6YL4PY9k2Mar4-gprG8-UxERWjmg,52
75
- supervaizer-0.10.5.dist-info/licenses/LICENSE.md,sha256=dmdnt1vfpxNPr8Lt0BnxKE5uzUwK3CWTthTUStgOXjY,15327
76
- supervaizer-0.10.5.dist-info/RECORD,,
73
+ supervaizer-0.10.6.dist-info/METADATA,sha256=a7BdnNaBtFs3POG-bEhEAPEd04D2IZsRC8w5C8ViPfA,12647
74
+ supervaizer-0.10.6.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
75
+ supervaizer-0.10.6.dist-info/entry_points.txt,sha256=vL_IBR_AeEI2u2-6YL4PY9k2Mar4-gprG8-UxERWjmg,52
76
+ supervaizer-0.10.6.dist-info/licenses/LICENSE.md,sha256=dmdnt1vfpxNPr8Lt0BnxKE5uzUwK3CWTthTUStgOXjY,15327
77
+ supervaizer-0.10.6.dist-info/RECORD,,